-
-
Save wplit/95d13d3c6a4561eb61e8f447f5d0934d to your computer and use it in GitHub Desktop.
seopress
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
function sp_titles_template_variables_array($array) { | |
$array[] = '%%oxygen%%'; | |
return $array; | |
} | |
add_filter('seopress_titles_template_variables_array', 'sp_titles_template_variables_array'); | |
function sp_titles_template_replace_array($array) { | |
if (class_exists('OxygenElement')) { | |
$array[] = substr(strip_tags(wp_filter_nohtml_kses(do_shortcode(get_post_meta(get_the_ID(), 'ct_builder_shortcodes', true), true))), 0, 160); | |
} | |
return $array; | |
} | |
add_filter('seopress_titles_template_replace_array', 'sp_titles_template_replace_array'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how do you use this?