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_action( 'category_add_form_fields', 'baw_new_term_color_field' ); | |
function baw_new_term_color_field() { | |
wp_nonce_field( 'add_term_meta_color', 'add_term_meta_color_nonce' ); | |
?> | |
<div class="form-field"> | |
<label for="baw_term_color"><?php _e( 'Front Color', 'baw' ); ?></label> | |
<input type="text" name="baw_term_color" id="baw_term_color" data-default-color="#ffffff" /> | |
</div> | |
<?php |
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_action( 'after_setup_theme', 'my_square_size' ); | |
function my_square_size() { | |
add_image_size( 'square', 320, 320, true ); | |
} | |
add_filter( 'embed_thumbnail_image_size', '__return_square' ); | |
add_filter( 'embed_thumbnail_image_shape', '__return_square' ); | |
function __return_square() { | |
return 'square'; |
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
remove_action( 'embed_footer', 'print_embed_sharing_dialog' ); | |
remove_action( 'embed_content_share', 'print_embed_sharing_button' ); |
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( 'get_comment_text', 'add_post_oembed_comment_support', 0 ); | |
function add_post_oembed_comment_support( $comment_text ) { | |
if ( ! class_exists( 'WP_oEmbed' ) ) { | |
include( ABSPATH . WPINC . '/class-oembed.php' ); | |
} | |
$WP_oEmbed = new WP_oEmbed(); | |
if ( $WP_oEmbed->get_provider( $comment_text, array( 'discover' => false ) ) ) { | |
return $comment_text; | |
} | |
return $GLOBALS['wp_embed']->autoembed( $comment_text ); |
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( 'get_comment_text', 'add_post_oembed_comment_support', 0 ); | |
function add_post_oembed_comment_support( $comment_text ) { | |
return $GLOBALS['wp_embed']->autoembed( $comment_text ); | |
} |
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( 'embed_content_meta', 'the_date' ); |
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
// MY_PLUGIN_FOLDER est une constante imaginaire correspondant au dossier de votre plugin qui contient ce template | |
add_filter( 'template_include', 'my_plugin_embed_template_include' ); | |
function my_plugin_embed_template_include( $template ) { | |
if ( basename( $template ) == 'embed-template.php' ) { | |
return MY_PLUGIN_FOLDER . '/embed-template.php'; | |
} | |
return $template; | |
} |
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: Empty Embeds cache | |
* Description: You already read it | |
* Version: 1.0 | |
* Author: Julio Potier | |
* Author URI: https://wp-rocket.me | |
* License: GPLv2+ | |
* | |
*/ |
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 Embeds Cache | |
* Description: Don't like the 1 day embed cache? | |
* Version: 1.0 | |
* Author: Julio Potier | |
* Author URI: https://wp-rocket.me | |
* License: GPLv2+ | |
* | |
*/ |
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 Thumbnails Embeds | |
* Description: Don't like the thumbnails embed? | |
* Version: 1.0 | |
* Author: Julio Potier | |
* Author URI: https://wp-rocket.me | |
* License: GPLv2+ | |
* | |
*/ |