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_pro_wc_schema_shipping_details', 'sp_wc_schema_shipping_details', 10, 2); | |
| function sp_wc_schema_shipping_details($shipping_offers, $wc_product) { | |
| // Example: add/override a shipping destination + delivery times. | |
| $shipping_offers['shippingDestination'] = [ | |
| '@type' => 'DefinedRegion', | |
| 'addressCountry' => 'US', | |
| ]; | |
| $shipping_offers['deliveryTime'] = [ |
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
| // Enable shipping details | |
| add_filter( 'seopress_pro_wc_schema_shipping_details_enabled', '__return_true' ); | |
| // Disable shipping details | |
| add_filter( 'seopress_pro_wc_schema_shipping_details_enabled', '__return_false' ); |
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_sitemaps_cache_duration', 'sp_sitemaps_cache_duration', 10, 1 ); | |
| function sp_sitemaps_cache_duration( $duration ) { | |
| // default duration is 1 hour (3600 seconds) | |
| return HOUR_IN_SECONDS; | |
| } |
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
| LB Widget: | |
| add_filter('seopress_lb_widget_opening_hours_separator', 'sp_lb_widget_opening_hours_separator'); | |
| function sp_lb_widget_opening_hours_separator($separator) { | |
| // apply your custom logic here | |
| return $separator; | |
| }; | |
| LB Block: | |
| add_filter('seopress_lb_block_opening_hours_separator', 'sp_lb_block_opening_hours_separator'); | |
| function sp_lb_block_opening_hours_separator($separator) { |
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_sitemaps_index_post_types_query','sp_sitemaps_index_post_types_query', 10, 2); | |
| function sp_sitemaps_index_post_types_query($args, $cpt_key){ | |
| $args = [ | |
| 'posts_per_page' => 10000, | |
| ]; | |
| 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_watch_taxonomy_for_redirects', 'sp_watch_taxonomy_for_redirects', 10, 3); | |
| function sp_watch_taxonomy_for_redirects($should_watch, $taxonomy_name, $taxonomy_object) { | |
| // Only watch 'category' and 'post_tag' taxonomies | |
| $allowed_taxonomies = ['category', 'post_tag']; | |
| return in_array($taxonomy_name, $allowed_taxonomies); | |
| } |
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_sitemaps_html_display_terms_only', 'sp_sitemaps_html_display_terms_only', 10, 2); | |
| function sp_sitemaps_html_display_terms_only($display_terms_only, $cpt_key) { | |
| // Display terms only for products | |
| if ($cpt_key == 'product') { | |
| return true; | |
| } | |
| return $display_terms_only; | |
| } |
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", |
NewerOlder