This file contains hidden or 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_seo_alerts_sitemap_args', 'sp_seo_alerts_sitemap_args'); | |
| function sp_seo_alerts_sitemap_args($args) { | |
| // default args | |
| $args = [ | |
| 'blocking' => true, | |
| 'timeout' => 10, | |
| 'redirection' => 1, | |
| ]; | |
| return $args; | |
| } | 
  
    
      This file contains hidden or 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_seo_alerts_robots_args', 'sp_seo_alerts_robots_args'); | |
| function sp_seo_alerts_robots_args($args) { | |
| // default args | |
| $args = [ | |
| 'blocking' => true, | |
| 'timeout' => 10, | |
| 'redirection' => 1, | |
| ]; | |
| return $args; | |
| } | 
  
    
      This file contains hidden or 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_seo_alerts_homepage_args', 'sp_seo_alerts_homepage_args'); | |
| function sp_seo_alerts_homepage_args($args) { | |
| // default args | |
| $args = [ | |
| 'blocking' => true, | |
| 'timeout' => 10, | |
| 'redirection' => 1, | |
| ]; | |
| return $args; | |
| } | 
  
    
      This file contains hidden or 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
    
  
  
    
  | <?php | |
| //Add "MerchantReturnPolicy" and "deliveryTime" to each product offer (simple and variable) for the automatic product schema with SEOPress PRO | |
| add_filter('seopress_schemas_auto_product_json', 'sp_schemas_auto_product_json'); | |
| function sp_schemas_auto_product_json($json) { | |
| // Returns schema as an array with 'property' => 'value' | |
| // Check if 'offers' exists in the JSON | |
| if (!isset($json['offers'])) { | |
| return $json; | |
| } | 
  
    
      This file contains hidden or 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
    
  
  
    
  | // This snippet will retrieve the votes from the current post handled by KK Star Ratings plugin | |
| add_filter('seopress_schemas_auto_recipe_json', 'sp_schemas_auto_recipe_json'); | |
| function sp_schemas_auto_recipe_json($json) { | |
| $post_id = get_the_ID(); | |
| $rating_data = get_post_meta($post_id, '_kksr_avg_default', true); | |
| $count = get_post_meta($post_id, '_kksr_count_default', true); | |
| if (!empty($rating_data) && !empty($count)) { | |
| $json['aggregateRating'] = [ | 
  
    
      This file contains hidden or 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
    
  
  
    
  | <?php | |
| add_filter('seopress_schemas_mapping_select', 'sp_schemas_mapping_select'); | |
| function sp_schemas_mapping_select($select) { | |
| //Add the new group option + option to the list | |
| $select['Jet Engine'] = [ | |
| 'my_new_dynamic_variable_key' => __('My new dynamic variable title', 'wp-seopress-pro'), | |
| ]; | |
| return $select; | |
| } | 
  
    
      This file contains hidden or 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
    
  
  
    
  | <?php | |
| function sp_titles_template_variables_array($array) { | |
| $array[] = '%%my-custom-global-variable%%'; | |
| return $array; | |
| } | |
| add_filter('seopress_titles_template_variables_array', 'sp_titles_template_variables_array'); | |
| function sp_titles_template_replace_array($array) { | |
| // Replace my_jetengine_custom_field with the name of your meta field (to be used with custom database storage) | |
| $array[] = esc_attr(wp_strip_all_tags( jet_engine()->listings->data->get_meta( 'my_jetengine_custom_field' ) )); | |
| return $array; | 
  
    
      This file contains hidden or 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('seopress_site_audit_after_processs', 'sp_site_audit_after_processs'); | |
| function sp_site_audit_after_processs() { | |
| //do something | |
| } | 
  
    
      This file contains hidden or 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_instant_indexing_permalink', 'sp_instant_indexing_permalink', 10, 2); | |
| function sp_instant_indexing_permalink($permalink, $post) { | |
| $cpt = get_post_type( $post ) ? get_post_type( $post ) : ''; | |
| if ($cpt === 'test') { | |
| return false; | |
| } | |
| return $permalink; | |
| } | 
  
    
      This file contains hidden or 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_dashboard_site_overview_tabs', 'sp_dashboard_site_overview_tabs'); | |
| function sp_dashboard_site_overview_tabs($tabs) { | |
| //Default array | |
| // $tabs = [ | |
| // 'tab_seopress_analytics' => esc_html__('Google Analytics', 'wp-seopress-pro'), | |
| // 'tab_seopress_matomo' => esc_html__('Matomo Analytics', 'wp-seopress-pro'), | |
| // 'tab_seopress_ps' => esc_html__('PageSpeed', 'wp-seopress-pro'), | |
| // 'tab_seopress_gsc' => esc_html__('Search Console', 'wp-seopress-pro'), | |
| // ]; |