This file contains 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( 'tiny_mce_before_init', 'add_frame_style' ); | |
/* | |
* Add the new tinyMCE style | |
*/ | |
public static function add_frame_style( $params ) { | |
$style_formats = json_decode( $params['style_formats'] ); | |
$style_formats[] = array( | |
'title' => 'Notes', | |
'block' => 'div', |
This file contains 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
# Pour l'archive diff | |
git archive -o diff.zip Num_Ver $(git diff --name-only --diff-filter=ACMRT Num_Ver_Old) | |
# Pour la liste des fichiers supprimés | |
git diff --name-status --diff-filter=D Num_Ver_Old Num_Ver -- > file-deleted.txt |
This file contains 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( 'restrict_manage_posts' , 'filter_taxonomy_columns' ); | |
/** | |
* Allow admin to filter CPT by custom taxonomies in CPT list view | |
* | |
* @author Florian Tiar | |
*/ | |
function filter_taxonomy_columns( $post_type ) { | |
if ( 'my_cpt' !== $post_type ) { |
This file contains 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 | |
//defining the filter that will be used to select pages by 'top level pages' | |
add_action('restrict_manage_posts','add_post_formats_filter_to_post_administration'); | |
function add_post_formats_filter_to_post_administration(){ | |
//execute only on the 'post' content type | |
global $post_type; | |
if( $post_type == 'page' ){ | |
$pages_arg = array( |