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 | |
/** | |
* Plugin Name: Disable Pinterest rich pins. | |
* Description: This plugin adds a meta tag to your site header that tells Pinterest to disable rich pins for your WordPress site. | |
* Version: 1.0.0 | |
* Author: Sybre Waaijer | |
* Author URI: https://theseoframework.com/ | |
* License: GPLv3 | |
*/ |
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 | |
// Example! | |
/** | |
* Adjust SEO Bar interpreter and builder items here. | |
* | |
* The only use we can think of here is removing items from `$builder::$tests`, | |
* and reading `$interpreter::$query`. Do not add tests here. Do not alter the query. | |
* |
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 | |
// Example! | |
/** | |
* Add or adjust SEO Bar items here. | |
* | |
* @since 4.0.0 | |
* @param string $interpreter The interpreter class name. | |
*/ |
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 | |
// The PHP tag starts PHP. Don't implement it if it's already there. | |
/** | |
* Get the current query description: [tsf-description] | |
* Get another query description, page: [tsf-description id=42] | |
* Get another query description, term: [tsf-description id=42 taxonomy=category] | |
*/ | |
add_shortcode( 'tsf-description', function( $atts ) { |
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 | |
// Do not include this PHP opening tag if PHP is already opened... | |
// Ref: https://theseoframework.com/docs/using-filters/ | |
add_filter( 'the_seo_framework_image_generation_params', 'my_tsf_custom_image_generation_args', 10, 3 ); | |
/** | |
* Adjusts image generation parameters. | |
* | |
* @link https://theseoframework.com/docs/api/filters/#append-image-generators-for-social-images |
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 | |
// Do not include this PHP opening tag if PHP is already opened... | |
// Ref: https://theseoframework.com/docs/using-filters/ | |
add_filter( 'the_seo_framework_image_generation_params', 'my_tsf_custom_image_generation_args', 10, 3 ); | |
/** | |
* Adjusts image generation parameters. | |
* | |
* @link https://theseoframework.com/docs/api/filters/#append-image-generators-for-social-images |
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 | |
// Do not include this PHP opening tag if PHP is already opened... | |
// Ref: https://theseoframework.com/docs/using-filters/ | |
// Ref: https://gist.github.com/sybrew/938092feb87f821b054a59c72c1d3daa | |
add_filter( 'the_seo_framework_image_generation_params', 'my_tsf_custom_image_generation_args', 10, 3 ); | |
/** | |
* Adjusts image generation parameters. | |
* |
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 | |
// Don't include the PHP tag if PHP is already active... | |
/** | |
* Adjusts image generation parameters to exclude content-images for Schema-type generators. | |
* | |
* @param array $params : [ | |
* string size: The image size to use. | |
* boolean multi: Whether to allow multiple images to be returned. |
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 | |
// Don't include the PHP tag is PHP is already active | |
add_filter( 'the_seo_framework_image_generation_params', function( $args ) { | |
if ( isset( $args['cbs']['content'] ) ) { | |
$args['cbs']['content'] = 'my_content_image_generator'; | |
} |