).
* - in Premium it's available as long as the version is 21.8-RC0 or above.
*
* @return bool Whether the highlighting functionality is available.
*/
private function is_highlighting_available() {
$is_premium = \YoastSEO()->helpers->product->is_premium();
$premium_version = \YoastSEO()->helpers->product->get_premium_version();
return ! $is_premium || \version_compare( $premium_version, '21.8-RC0', '>=' );
}
/**
* Prepares the replace vars for localization.
*
* @return array Replace vars.
*/
protected function get_replace_vars() {
$cached_replacement_vars = [];
$vars_to_cache = [
'date',
'id',
'sitename',
'sitedesc',
'sep',
'page',
'currentyear',
'currentdate',
'currentmonth',
'currentday',
'tag',
'category',
'category_title',
'primary_category',
'pt_single',
'pt_plural',
'modified',
'name',
'user_description',
'pagetotal',
'pagenumber',
'post_year',
'post_month',
'post_day',
'author_first_name',
'author_last_name',
'permalink',
'post_content',
];
foreach ( $vars_to_cache as $var ) {
$cached_replacement_vars[ $var ] = \wpseo_replace_vars( '%%' . $var . '%%', $this->get_metabox_post() );
}
// Merge custom replace variables with the WordPress ones.
return \array_merge( $cached_replacement_vars, $this->get_custom_replace_vars( $this->get_metabox_post() ) );
}
/**
* Prepares the recommended replace vars for localization.
*
* @return array Recommended replacement variables.
*/
protected function get_recommended_replace_vars() {
$recommended_replace_vars = new WPSEO_Admin_Recommended_Replace_Vars();
// What is recommended depends on the current context.
$post_type = $recommended_replace_vars->determine_for_post( $this->get_metabox_post() );
return $recommended_replace_vars->get_recommended_replacevars_for( $post_type );
}
/**
* Returns the list of replace vars that should be hidden inside the editor.
*
* @return string[] The hidden replace vars.
*/
protected function get_hidden_replace_vars() {
return ( new WPSEO_Replace_Vars() )->get_hidden_replace_vars();
}
/**
* Gets the custom replace variables for custom taxonomies and fields.
*
* @param WP_Post $post The post to check for custom taxonomies and fields.
*
* @return array Array containing all the replacement variables.
*/
protected function get_custom_replace_vars( $post ) {
return [
'custom_fields' => $this->get_custom_fields_replace_vars( $post ),
'custom_taxonomies' => $this->get_custom_taxonomies_replace_vars( $post ),
];
}
/**
* Gets the custom replace variables for custom taxonomies.
*
* @param WP_Post $post The post to check for custom taxonomies.
*
* @return array Array containing all the replacement variables.
*/
protected function get_custom_taxonomies_replace_vars( $post ) {
$taxonomies = \get_object_taxonomies( $post, 'objects' );
$custom_replace_vars = [];
foreach ( $taxonomies as $taxonomy_name => $taxonomy ) {
if ( \is_string( $taxonomy ) ) { // If attachment, see https://core.trac.wordpress.org/ticket/37368 .
$taxonomy_name = $taxonomy;
$taxonomy = \get_taxonomy( $taxonomy_name );
}
if ( $taxonomy->_builtin && $taxonomy->public ) {
continue;
}
$custom_replace_vars[ $taxonomy_name ] = [
'name' => $taxonomy->name,
'description' => $taxonomy->description,
];
}
return $custom_replace_vars;
}
/**
* Gets the custom replace variables for custom fields.
*
* @param WP_Post $post The post to check for custom fields.
*
* @return array Array containing all the replacement variables.
*/
protected function get_custom_fields_replace_vars( $post ) {
$custom_replace_vars = [];
// If no post object is passed, return the empty custom_replace_vars array.
if ( ! \is_object( $post ) ) {
return $custom_replace_vars;
}
$custom_fields = \get_post_custom( $post->ID );
// Simply concatenate all fields containing replace vars so we can handle them all with a single regex find.
$replace_vars_fields = \implode(
' ',
[
\YoastSEO()->meta->for_post( $post->ID )->presentation->title,
\YoastSEO()->meta->for_post( $post->ID )->presentation->meta_description,
]
);
\preg_match_all( '/%%cf_([A-Za-z0-9_]+)%%/', $replace_vars_fields, $matches );
$fields_to_include = $matches[1];
foreach ( $custom_fields as $custom_field_name => $custom_field ) {
// Skip private custom fields.
if ( \substr( $custom_field_name, 0, 1 ) === '_' ) {
continue;
}
// Skip custom fields that are not used, new ones will be fetched dynamically.
if ( ! \in_array( $custom_field_name, $fields_to_include, true ) ) {
continue;
}
// Skip custom field values that are serialized.
if ( \is_serialized( $custom_field[0] ) ) {
continue;
}
$custom_replace_vars[ $custom_field_name ] = $custom_field[0];
}
return $custom_replace_vars;
}
/**
* Determines the scope based on the post type.
* This can be used by the replacevar plugin to determine if a replacement needs to be executed.
*
* @return string String describing the current scope.
*/
protected function determine_scope() {
if ( $this->get_metabox_post()->post_type === 'page' ) {
return 'page';
}
return 'post';
}
/**
* Determines whether or not the current post type has registered taxonomies.
*
* @return bool Whether the current post type has taxonomies.
*/
protected function current_post_type_has_taxonomies() {
$post_taxonomies = \get_object_taxonomies( $this->get_metabox_post()->post_type );
return ! empty( $post_taxonomies );
}
/**
* Returns an array with shortcode tags for all registered shortcodes.
*
* @return array
*/
protected function get_valid_shortcode_tags() {
$shortcode_tags = [];
foreach ( $GLOBALS['shortcode_tags'] as $tag => $description ) {
$shortcode_tags[] = $tag;
}
return $shortcode_tags;
}
}
Be the first to review “Degtukų dėžutė” Cancel reply
No more offers for this product!
Shipping Policy
Prekės išsiunčiamos per 1-2 darbo dienas registruota LP siunta.
Siuntos kaina priklauso nuo daikto svorio ir siunčiami LP registruota siunta. Iki 2kg kaina 2 €. Iki 4kg kaina 3€. iki 10kg - 8€. Sunkesni - 14€ (Sunkesni nei 10kg siuntiniai, bus siunčiami per kurjerį)
Perkant kelias prekes, prekių svoris sumuojasi ir nereikia mokėti siuntimo už kiekvieną prekę
Jei netinka siuntimas per Lietuvos paštą, ar norite gauti siuntą į užsienį, susisiekite naudodami "INQUIRIES" arba el paštu deividas.ostrauskas@gmail.com, arba per tiesioginį chatbox puslapyje, dėl kitų siuntimo galimybių
Refund Policy
Prekių atitinkančių aprašymą ir nuotraukas atgal nepriemame
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Cookie settingsACCEPT
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
Reviews
There are no reviews yet.