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[] = '%%_acf_options_my_field_name%%'; | |
$array[] = '%%_acf_options_my_field_name_2%%'; | |
return $array; | |
} | |
add_filter('seopress_titles_template_variables_array', 'sp_titles_template_variables_array'); | |
function sp_titles_template_replace_array($array) { | |
$array[] = esc_attr(wp_strip_all_tags(get_field('my_field_name', 'option'))); |
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_action('wp_dashboard_setup', 'sp_remove_dashboard_widgets' ); | |
function sp_remove_dashboard_widgets() { | |
remove_meta_box( 'seopress_ga_dashboard_widget', 'dashboard', 'normal' ); | |
remove_meta_box( 'seopress_insights_dashboard_rankings_widget', 'dashboard', 'normal' ); | |
remove_meta_box( 'seopress_matomo_dashboard_widget', 'dashboard', 'normal' ); | |
} |
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_export_404_query', 'sp_export_404_query'); | |
function sp_export_404_query($args) { | |
$args = [ | |
'post_type' => 'seopress_404', | |
'posts_per_page' => '-1', | |
'meta_query' => [ | |
[ | |
'key' => '_seopress_redirections_type', | |
'compare' => 'NOT EXISTS', | |
], |
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_ai_openai_request_args_alt', 'sp_ai_openai_request_args_alt'); | |
function sp_ai_openai_request_args_alt($args) { | |
//do your stuff, this is just an example | |
//var_dump($body) | |
$args = [ | |
'body' => json_encode($body), | |
'timeout' => '30', | |
'redirection' => '5', |
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_video_regeneration_total_count_posts($sql) { | |
global $wpdb; | |
$sql = (int) $wpdb->get_var("SELECT count(*) FROM {$wpdb->posts} WHERE post_status IN ('pending', 'draft', 'publish', 'future') AND post_type IN ( 'your_cpt_name' ) "); | |
return $sql; | |
} | |
add_filter('seopress_video_regeneration_total_count_posts', 'sp_video_regeneration_total_count_posts'); | |
function sp_video_regeneration_increment($increment) { | |
//default: 1 |
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_product_price_currency($currency) { | |
return $currency; | |
} | |
add_filter('seopress_product_price_currency', 'sp_product_price_currency'); |
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_product_price_amount($price) { | |
return $price; | |
} | |
add_filter('seopress_product_price_amount', 'sp_product_price_amount'); |
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_stop_counter_redirects', '__return_true'); | |
add_filter('seopress_stop_last_date_request_redirects', '__return_true'); |
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_sitemaps_html_post_title($post_title) { | |
//do your sutff | |
return $post_title; | |
} | |
add_filter('seopress_sitemaps_html_post_title', 'sp_sitemaps_html_post_title'); |
NewerOlder