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
#!/usr/bin/env bash | |
# =============================================================================== | |
# Script to install PHPUnit in the Local by Flywheel Mac app | |
# These packages are installed | |
# | |
# PHPUnit, git, subversion, composer, curl and wget | |
# | |
# WordPress and the WP_UnitTestCase are installed in the /tmp directory | |
# The $WP_CORE_DIR and $WP_TESTS_DIR variables are added to the .bashrc file |
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 | |
/** | |
* Display taxonomy selection as radios | |
* | |
* @param WP_Post $post | |
* @param array $box | |
*/ | |
if( !function_exists('wearewp_taxonomy_radio_meta_box') ) { | |
function wearewp_taxonomy_radio_meta_box($post, $box) { |
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_filter('wp_terms_checklist_args','tp_wp_terms_checklist_args'); | |
function tp_wp_terms_checklist_args($args) { | |
$args['checked_ontop'] = false; | |
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 | |
/* | |
* Dans cet exemple mon Custom Post Type est "revendeurs" | |
*/ | |
add_filter('posts_join', 'revendeurs_search_join' ); | |
function revendeurs_search_join ($join){ | |
global $pagenow, $wpdb; | |
// I want the filter only when performing a search on edit page of Custom Post Type named "revendeurs" | |
if ( is_admin() && $pagenow=='edit.php' && $_GET['post_type']=='revendeurs' && $_GET['s'] != '') |