"false"
x="0px" y="0px" viewBox="0 0 30 47" enable-background="new 0 0 30 47" xml:space="preserve">
SVG;
}
/**
* Checks if the WP-REST-API is available.
*
* @since 3.6
* @since 3.7 Introduced the $minimum_version parameter.
*
* @param string $minimum_version The minimum version the API should be.
*
* @return bool Returns true if the API is available.
*/
public static function is_api_available( $minimum_version = '2.0' ) {
return ( defined( 'REST_API_VERSION' )
&& version_compare( REST_API_VERSION, $minimum_version, '>=' ) );
}
/**
* Checks if the content endpoints are available.
*
* @return bool Returns true if the content endpoints are available
*/
public static function are_content_endpoints_available() {
if ( function_exists( 'rest_get_server' ) ) {
$namespaces = rest_get_server()->get_namespaces();
return in_array( 'wp/v2', $namespaces );
}
return false;
}
/**
* Determine whether or not the metabox should be displayed for a post type.
*
* @param string|null $post_type Optional. The post type to check the visibility of the metabox for.
*
* @return bool Whether or not the metabox should be displayed.
*/
protected static function display_post_type_metabox( $post_type = null ) {
if ( ! isset( $post_type ) ) {
$post_type = get_post_type();
}
if ( ! isset( $post_type ) || ! WPSEO_Post_Type::is_post_type_accessible( $post_type ) ) {
return false;
}
if ( $post_type === 'attachment' && WPSEO_Options::get( 'disable-attachment' ) ) {
return false;
}
return WPSEO_Options::get( 'display-metabox-pt-' . $post_type );
}
/**
* Determine whether or not the metabox should be displayed for a taxonomy.
*
* @param string|null $taxonomy Optional. The post type to check the visibility of the metabox for.
*
* @return bool Whether or not the metabox should be displayed.
*/
protected static function display_taxonomy_metabox( $taxonomy = null ) {
if ( ! isset( $taxonomy ) || ! in_array( $taxonomy, get_taxonomies( [ 'public' => true ], 'names' ), true ) ) {
return false;
}
return WPSEO_Options::get( 'display-metabox-tax-' . $taxonomy );
}
/**
* Determines whether the metabox is active for the given identifier and type.
*
* @param string $identifier The identifier to check for.
* @param string $type The type to check for.
*
* @return bool Whether or not the metabox is active.
*/
public static function is_metabox_active( $identifier, $type ) {
if ( $type === 'post_type' ) {
return self::display_post_type_metabox( $identifier );
}
if ( $type === 'taxonomy' ) {
return self::display_taxonomy_metabox( $identifier );
}
return false;
}
/**
* Determines whether or not WooCommerce is active.
*
* @return bool Whether or not WooCommerce is active.
*/
public static function is_woocommerce_active() {
return class_exists( 'Woocommerce' );
}
/**
* Determines whether the plugin is active for the entire network.
*
* @return bool Whether or not the plugin is network-active.
*/
public static function is_plugin_network_active() {
static $network_active = null;
if ( ! is_multisite() ) {
return false;
}
// If a cached result is available, bail early.
if ( $network_active !== null ) {
return $network_active;
}
$network_active_plugins = wp_get_active_network_plugins();
// Consider MU plugins and network-activated plugins as network-active.
$network_active = strpos( wp_normalize_path( WPSEO_FILE ), wp_normalize_path( WPMU_PLUGIN_DIR ) ) === 0
|| in_array( WP_PLUGIN_DIR . '/' . WPSEO_BASENAME, $network_active_plugins, true );
return $network_active;
}
/**
* Getter for the Adminl10n array. Applies the wpseo_admin_l10n filter.
*
* @return array The Adminl10n array.
*/
public static function get_admin_l10n() {
$wpseo_admin_l10n = [];
$additional_entries = apply_filters( 'wpseo_admin_l10n', [] );
if ( is_array( $additional_entries ) ) {
$wpseo_admin_l10n = array_merge( $wpseo_admin_l10n, $additional_entries );
}
return $wpseo_admin_l10n;
}
/**
* Retrieves the analysis worker log level. Defaults to errors only.
*
* Uses bool YOAST_SEO_DEBUG as flag to enable logging. Off equals ERROR.
* Uses string YOAST_SEO_DEBUG_ANALYSIS_WORKER as log level for the Analysis
* Worker. Defaults to INFO.
* Can be: TRACE, DEBUG, INFO, WARN or ERROR.
*
* @return string The log level to use.
*/
public static function get_analysis_worker_log_level() {
if ( defined( 'YOAST_SEO_DEBUG' ) && YOAST_SEO_DEBUG ) {
return defined( 'YOAST_SEO_DEBUG_ANALYSIS_WORKER' ) ? YOAST_SEO_DEBUG_ANALYSIS_WORKER : 'INFO';
}
return 'ERROR';
}
/**
* Returns the unfiltered home URL.
*
* In case WPML is installed, returns the original home_url and not the WPML version.
* In case of a multisite setup we return the network_home_url.
*
* @return string The home url.
*/
/**
* Returns the unfiltered home URL.
*
* In case WPML is installed, returns the original home_url and not the WPML version.
* In case of a multisite setup we return the network_home_url.
*
* @return string The home url.
*
* @codeCoverageIgnore
*/
public static function get_home_url() {
/**
* Action: 'wpseo_home_url' - Allows overriding of the home URL.
*/
do_action( 'wpseo_home_url' );
// If the plugin is network-activated, use the network home URL.
if ( WPSEO_Utils::is_plugin_network_active() ) {
return network_home_url();
}
return home_url();
}
/**
* Checks if the current installation supports MyYoast access tokens.
*
* @codeCoverageIgnore
*
* @return bool True if access_tokens are supported.
*/
public static function has_access_token_support() {
return class_exists( 'WPSEO_MyYoast_Client' );
}
/**
* Prepares data for outputting as JSON.
*
* @param array $data The data to format.
*
* @return false|string The prepared JSON string.
*/
public static function format_json_encode( $data ) {
$flags = JSON_UNESCAPED_SLASHES;
if ( self::is_development_mode() ) {
$flags = ( $flags | JSON_PRETTY_PRINT );
/**
* Filter the Yoast SEO development mode.
*
* @api array $data Allows filtering of the JSON data for debug purposes.
*/
$data = apply_filters( 'wpseo_debug_json_data', $data );
}
return wp_json_encode( $data, $flags );
}
/**
* Output a Schema blob.
*
* @param array $graph The Schema graph array to output.
* @param string $class The (optional) class to add to the script tag.
*
* @return bool
*/
public static function schema_output( $graph, $class = 'yoast-schema-graph' ) {
if ( ! is_array( $graph ) || empty( $graph ) ) {
return false;
}
// phpcs:ignore WordPress.Security.EscapeOutput -- Escaping happens in WPSEO_Utils::schema_tag, which should be whitelisted.
echo self::schema_tag( $graph, $class );
return true;
}
/**
* Returns a script tag with Schema blob.
*
* @param array $graph The Schema graph array to output.
* @param string $class The (optional) class to add to the script tag.
*
* @return false|string A schema blob with script tags.
*/
public static function schema_tag( $graph, $class = 'yoast-schema-graph' ) {
if ( ! is_array( $graph ) || empty( $graph ) ) {
return false;
}
$output = [
'@context' => 'https://schema.org',
'@graph' => $graph,
];
return "' . "\n";
}
/**
* Extends the allowed post tags with accessibility-related attributes.
*
* @param array $allowed_post_tags The allowed post tags.
* @codeCoverageIgnore
*
* @return array The allowed tags including post tags, input tags and select tags.
*/
public static function extend_kses_post_with_a11y( $allowed_post_tags ) {
static $a11y_tags;
if ( isset( $a11y_tags ) === false ) {
$a11y_tags = [
'button' => [
'aria-expanded' => true,
'aria-controls' => true,
],
'div' => [
'tabindex' => true,
],
// Below are attributes that are needed for backwards compatibility (WP < 5.1).
'span' => [
'aria-hidden' => true,
],
'input' => [
'aria-describedby' => true,
],
'select' => [
'aria-describedby' => true,
],
'textarea' => [
'aria-describedby' => true,
],
];
// Add the global allowed attributes to each html element.
$a11y_tags = array_map( '_wp_add_global_attributes', $a11y_tags );
}
return array_merge_recursive( $allowed_post_tags, $a11y_tags );
}
/**
* Extends the allowed post tags with input, select and option tags.
*
* @param array $allowed_post_tags The allowed post tags.
* @codeCoverageIgnore
*
* @return array The allowed tags including post tags, input tags, select tags and option tags.
*/
public static function extend_kses_post_with_forms( $allowed_post_tags ) {
static $input_tags;
if ( isset( $input_tags ) === false ) {
$input_tags = [
'input' => [
'accept' => true,
'accesskey' => true,
'align' => true,
'alt' => true,
'autocomplete' => true,
'autofocus' => true,
'checked' => true,
'contenteditable' => true,
'dirname' => true,
'disabled' => true,
'draggable' => true,
'dropzone' => true,
'form' => true,
'formaction' => true,
'formenctype' => true,
'formmethod' => true,
'formnovalidate' => true,
'formtarget' => true,
'height' => true,
'hidden' => true,
'lang' => true,
'list' => true,
'max' => true,
'maxlength' => true,
'min' => true,
'multiple' => true,
'name' => true,
'pattern' => true,
'placeholder' => true,
'readonly' => true,
'required' => true,
'size' => true,
'spellcheck' => true,
'src' => true,
'step' => true,
'tabindex' => true,
'translate' => true,
'type' => true,
'value' => true,
'width' => true,
/*
* Below are attributes that are needed for backwards compatibility (WP < 5.1).
* They are used for the social media image in the metabox.
* These can be removed once we move to the React versions of the social previews.
*/
'data-target' => true,
'data-target-id' => true,
],
'select' => [
'accesskey' => true,
'autofocus' => true,
'contenteditable' => true,
'disabled' => true,
'draggable' => true,
'dropzone' => true,
'form' => true,
'hidden' => true,
'lang' => true,
'multiple' => true,
'name' => true,
'onblur' => true,
'onchange' => true,
'oncontextmenu' => true,
'onfocus' => true,
'oninput' => true,
'oninvalid' => true,
'onreset' => true,
'onsearch' => true,
'onselect' => true,
'onsubmit' => true,
'required' => true,
'size' => true,
'spellcheck' => true,
'tabindex' => true,
'translate' => true,
],
'option' => [
'class' => true,
'disabled' => true,
'id' => true,
'label' => true,
'selected' => true,
'value' => true,
],
];
// Add the global allowed attributes to each html element.
$input_tags = array_map( '_wp_add_global_attributes', $input_tags );
}
return array_merge_recursive( $allowed_post_tags, $input_tags );
}
/**
* Gets an array of enabled features.
*
* @return string[] The array of enabled features.
*/
public static function retrieve_enabled_features() {
$enabled_features = [];
if ( defined( 'YOAST_SEO_ENABLED_FEATURES' ) ) {
$enabled_features = preg_split( '/,\W*/', YOAST_SEO_ENABLED_FEATURES );
}
// Make the array of enabled features filterable, so features can be enabled at will.
$enabled_features = apply_filters( 'wpseo_enable_feature', $enabled_features );
return $enabled_features;
}
/* ********************* DEPRECATED METHODS ********************* */
/**
* Returns the language part of a given locale, defaults to english when the $locale is empty.
*
* @see WPSEO_Language_Utils::get_language()
*
* @deprecated 9.5
* @codeCoverageIgnore
*
* @param string $locale The locale to get the language of.
*
* @return string The language part of the locale.
*/
public static function get_language( $locale ) {
_deprecated_function( __METHOD__, 'WPSEO 9.5', 'WPSEO_Language_Utils::get_language' );
return WPSEO_Language_Utils::get_language( $locale );
}
/**
* Returns the user locale for the language to be used in the admin.
*
* WordPress 4.7 introduced the ability for users to specify an Admin language
* different from the language used on the front end. This checks if the feature
* is available and returns the user's language, with a fallback to the site's language.
* Can be removed when support for WordPress 4.6 will be dropped, in favor
* of WordPress get_user_locale() that already fallbacks to the site's locale.
*
* @see WPSEO_Language_Utils::get_user_locale()
*
* @deprecated 9.5
* @codeCoverageIgnore
*
* @return string The locale.
*/
public static function get_user_locale() {
_deprecated_function( __METHOD__, 'WPSEO 9.5', 'WPSEO_Language_Utils::get_user_locale' );
return WPSEO_Language_Utils::get_user_locale();
}
}
{"version":"1.0","provider_name":"\u041c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430\u0448\u0438\u0432\u043e\u043a - \u0426\u0435\u043d\u0442\u0440 \u0412\u044b\u0448\u0438\u0432\u043a\u0438 \u0410\u0442\u043b\u0430\u0441 \u0414","provider_url":"https:\/\/www.atlas.in.ua\/shop","title":"\u0420\u043e\u0437\u0430 \u043d\u0430\u0448\u0438\u0432\u043a\u0430 60x56 \u043c\u043c - \u041c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430\u0448\u0438\u0432\u043e\u043a","type":"rich","width":600,"height":338,"html":"
\u0420\u043e\u0437\u0430 \u043d\u0430\u0448\u0438\u0432\u043a\u0430 60×56 \u043c\u043c<\/a><\/blockquote>