This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('seopress_titles_user_meta', 'sp_titles_user_meta', 10, 2); | |
function sp_titles_user_meta($user_meta_value, $user_meta_key) { | |
//do your stuff | |
//$user_meta_value = esc_attr(get_user_meta(get_current_user_id(), $user_meta_key, true)); | |
return $user_meta_value; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('seopress_titles_custom_field', 'sp_titles_custom_field', 10, 2); | |
function sp_titles_custom_field($custom_field_value, $custom_field_key) { | |
//do your stuff | |
//$custom_field_value = esc_attr(get_post_meta(get_the_ID(), $custom_field_key, true)); | |
return $custom_field_value; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('seopress_search_console_end_date', 'sp_search_console_end_date'); | |
function sp_search_console_end_date($endDate) { | |
//var_dump($endDate) to know the correct format to return | |
return $endDate; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('seopress_search_console_start_date', 'sp_search_console_start_date'); | |
function sp_search_console_start_date($startDate) { | |
//var_dump($startDate) to know the correct format to return | |
return $startDate; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('seopress_search_console_date_range', 'sp_search_console_date_range'); | |
function sp_search_console_date_range($dateRange) { | |
//default values | |
//- 7 days,- 28 days,- 3 months,- 6 months,- 12 months,- 16 months'; | |
$dateRange = '- 28 days'; | |
return $dateRange; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//By default, we don't run shortcodes to find significant keywords for internal linking suggestions | |
add_filter('seopress_pro_significant_kw_disable_shortcode', '__return_true'); | |
//__return_false will run shortcodes, can prevent some page builders to work as expected | |
add_filter('seopress_pro_significant_kw_disable_shortcode', '__return_false'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('seopress_pro_video_sitemap_content', 'sp_pro_video_sitemap_content'); | |
function sp_pro_video_sitemap_content($content) { | |
//eg. to add a custom field, replace 'my_custom_field_name' by your own | |
$content .= get_post_meta(get_the_ID(), 'my_custom_field_name', true); | |
return $content; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use SEOPress\Models\GetTagValue; | |
class SEOPressCustomTags implements GetTagValue { | |
const NAME = 'my-custom-global-variable'; | |
public static function getDescription() { | |
return __('My custom global variable', 'my-text-domain'); | |
} | |
public function getValue($args = null) { |