Submit
Path:
~
/
home
/
getwphos
/
www
/
radkingpanels
/
wp-content
/
plugins
/
wordpress-seo
/
src
/
helpers
/
File Content:
options-helper.php
<?php namespace Yoast\WP\SEO\Helpers; use WPSEO_Option_Llmstxt; use WPSEO_Option_Social; use WPSEO_Option_Titles; use WPSEO_Option_Tracking_Only; use WPSEO_Options; /** * A helper object for options. */ class Options_Helper { /** * Retrieves a single field from any option for the SEO plugin. Keys are always unique. * * @codeCoverageIgnore We have to write test when this method contains own code. * * @param string $key The key it should return. * @param mixed $default_value The default value that should be returned if the key isn't set. * * @return mixed|null Returns value if found, $default_value if not. */ public function get( $key, $default_value = null ) { return WPSEO_Options::get( $key, $default_value ); } /** * Sets a single field to the options. * * @param string $key The key to set. * @param mixed $value The value to set. * @param string $option_group The lookup table which represents the option_group where the key is stored. * * @return mixed|null Returns value if found. */ public function set( $key, $value, $option_group = '' ) { return WPSEO_Options::set( $key, $value, $option_group ); } /** * Get a specific default value for an option. * * @param string $option_name The option for which you want to retrieve a default. * @param string $key The key within the option who's default you want. * * @return mixed The default value. */ public function get_default( $option_name, $key ) { return WPSEO_Options::get_default( $option_name, $key ); } /** * Retrieves the title separator. * * @return string The title separator. */ public function get_title_separator() { $default = $this->get_default( 'wpseo_titles', 'separator' ); // Get the titles option and the separator options. $separator = $this->get( 'separator' ); $seperator_options = $this->get_separator_options(); // This should always be set, but just to be sure. if ( isset( $seperator_options[ $separator ] ) ) { // Set the new replacement. $replacement = $seperator_options[ $separator ]; } elseif ( isset( $seperator_options[ $default ] ) ) { $replacement = $seperator_options[ $default ]; } else { $replacement = \reset( $seperator_options ); } /** * Filter: 'wpseo_replacements_filter_sep' - Allow customization of the separator character(s). * * @param string $replacement The current separator. */ return \apply_filters( 'wpseo_replacements_filter_sep', $replacement ); } /** * Retrieves a default value from the option titles. * * @param string $option_titles_key The key of the option title you wish to get. * * @return string The option title. */ public function get_title_default( $option_titles_key ) { $default_titles = $this->get_title_defaults(); if ( ! empty( $default_titles[ $option_titles_key ] ) ) { return $default_titles[ $option_titles_key ]; } return ''; } /** * Retrieves the default option titles. * * @codeCoverageIgnore We have to write test when this method contains own code. * * @return array The title defaults. */ protected function get_title_defaults() { return WPSEO_Option_Titles::get_instance()->get_defaults(); } /** * Retrieves the tracking only options. * * @codeCoverageIgnore We have to write test when this method contains own code. * * @return string[] The tracking only options. */ public function get_tracking_only_options() { return \array_keys( WPSEO_Option_Tracking_Only::get_instance()->get_defaults() ); } /** * Get the available separator options. * * @return array */ protected function get_separator_options() { return WPSEO_Option_Titles::get_instance()->get_separator_options(); } /** * Checks whether a social URL is valid, with empty strings being valid social URLs. * * @param string $url The url to be checked. * * @return bool Whether the URL is valid. */ public function is_social_url_valid( $url ) { return $url === '' || WPSEO_Option_Social::get_instance()->validate_social_url( $url ); } /** * Checks whether a twitter id is valid, with empty strings being valid twitter id. * * @param string $twitter_id The twitter id to be checked. * * @return bool Whether the twitter id is valid. */ public function is_twitter_id_valid( $twitter_id ) { return empty( $twitter_id ) || WPSEO_Option_Social::get_instance()->validate_twitter_id( $twitter_id, false ); } /** * Gets the limit for the other included pages. * * @return int The limit for the other included pages. */ public function get_other_included_pages_limit() { return WPSEO_Option_Llmstxt::get_instance()->get_other_included_pages_limit(); } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
open-graph
---
0755
schema
---
0755
twitter
---
0755
aioseo-helper.php
1266 bytes
0644
asset-helper.php
2572 bytes
0644
attachment-cleanup-helper.php
2294 bytes
0644
author-archive-helper.php
5375 bytes
0644
blocks-helper.php
2378 bytes
0644
capability-helper.php
2116 bytes
0644
crawl-cleanup-helper.php
8293 bytes
0644
curl-helper.php
655 bytes
0644
current-page-helper.php
16018 bytes
0644
date-helper.php
3208 bytes
0644
environment-helper.php
793 bytes
0644
first-time-configuration-notice-helper.php
5486 bytes
0644
home-url-helper.php
770 bytes
0644
image-helper.php
11972 bytes
0644
import-cursor-helper.php
1392 bytes
0644
import-helper.php
716 bytes
0644
indexable-helper.php
9459 bytes
0644
indexable-to-postmeta-helper.php
6913 bytes
0644
indexing-helper.php
12991 bytes
0644
language-helper.php
2716 bytes
0644
meta-helper.php
2982 bytes
0644
notification-helper.php
2056 bytes
0644
options-helper.php
4758 bytes
0644
pagination-helper.php
5815 bytes
0644
permalink-helper.php
1286 bytes
0644
post-helper.php
5553 bytes
0644
post-type-helper.php
7349 bytes
0644
primary-term-helper.php
1398 bytes
0644
product-helper.php
1103 bytes
0644
redirect-helper.php
1764 bytes
0644
require-file-helper.php
326 bytes
0644
robots-helper.php
1777 bytes
0644
robots-txt-helper.php
2722 bytes
0644
route-helper.php
694 bytes
0644
sanitization-helper.php
1056 bytes
0644
score-icon-helper.php
2846 bytes
0644
short-link-helper.php
3607 bytes
0644
site-helper.php
566 bytes
0644
social-profiles-helper.php
10990 bytes
0644
string-helper.php
1218 bytes
0644
taxonomy-helper.php
5100 bytes
0644
url-helper.php
8357 bytes
0644
user-helper.php
4026 bytes
0644
wincher-helper.php
2569 bytes
0644
woocommerce-helper.php
1312 bytes
0644
wordpress-helper.php
512 bytes
0644
wpdb-helper.php
937 bytes
0644
N4ST4R_ID | Naxtarrr