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_after_create_404', 'sp_after_create_404'); | |
function sp_after_create_404($id) { | |
//do your stuff here | |
return $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
{ | |
"repositories": [ | |
{ | |
"type": "package", | |
"package": { | |
"name": "wp-seopress-pro/wp-seopress-pro", | |
"version": "8.6.1", | |
"type": "wordpress-plugin", | |
"dist": { | |
"url": "https://www.seopress.org/?edd_composer_download=1&license_key=xxxxxxxxxxxx&version=8.6.1&lang=en&url=https://example.com", |
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
function sp_adminbar_counter($counter, $total) { | |
// Default counter | |
$counter = '<div class="wp-core-ui wp-ui-notification seopress-menu-notification-counter">' . $total . '</div>'; | |
return $counter; | |
} | |
add_filter('seopress_adminbar_counter', 'sp_adminbar_counter', 10, 2); |
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
function sp_dashboard_rankings_widget_cap($cap){ | |
//default: 'edit_dashboard' capability | |
return 'edit_posts'; | |
} | |
add_filter('seopress_insights_dashboard_rankings_widget_cap','sp_dashboard_rankings_widget_cap'); |
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
function sp_titles_paged_rel($html, $paged) { | |
$html = ''; | |
if ($paged) { | |
$html .= '<link rel="prev" href="' . get_pagenum_link($paged - 1) . '">'; | |
$html .= '<link rel="next" href="' . get_pagenum_link($paged + 1) . '">'; | |
} | |
return $html; | |
} | |
add_filter('seopress_titles_paged_rel', 'sp_titles_paged_rel', 9, 2); |
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'] = [ |
NewerOlder