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 | |
/** | |
* @param string $post_type | |
* | |
* @return \ACP\Layout[] | |
*/ | |
function acp_get_layouts_by_post_type( string $post_type ) : array { | |
$list_screen = new \ACP\ListScreen\Post( $post_type ); | |
$layouts = new \ACP\Layouts( $list_screen ); |
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 | |
/** | |
* @param string $post_type | |
* @param string|null $layout | |
* | |
* @return \AC\Column[] | |
*/ | |
function acp_get_columns_by_post_type( string $post_type, string $layout = null ): array { | |
$list_screen = new \ACP\ListScreen\Post( $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 | |
/** | |
* Media Library Assistant Admin Columns (plugin) Support | |
* | |
* @package Media Library Assistant | |
* @since 2.50 | |
*/ | |
defined( 'ABSPATH' ) or die(); | |
if ( class_exists( 'ACP_Editing_Strategy' ) ) { |
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 custom fields for users to the search in the wp-admin | |
*/ | |
function codepress_search_user_custom_fields( $user_query ) { | |
// Fill in the custom fields you want to add to the search | |
$custom_fields = array( | |
'my_custom_field_1', | |
'my_custom_field_2' |
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 custom fields for users to the search in the wp-admin | |
*/ | |
function codepress_search_post_custom_fields( $wp ) { | |
global $pagenow, $wpdb; | |
// Fill in the post types that should be used | |
$post_types = array( | |
'post', |
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 | |
/** | |
* Send Mail through Mandrill with Template | |
* | |
* See https://mandrillapp.com/api/docs/index.php.html | |
* | |
* @param string $to_email Email Reciever | |
* @param string $to_name Name Receiver | |
* @param string $subject Mail subject | |
* @param string $message HTML message ( allowed ul, p, h1 ) |
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
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
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 | |
// source: http://www.wprecipes.com/list-all-hooked-wordpress-functions | |
function list_hooked_functions($tag=false){ | |
global $wp_filter; | |
if ($tag) { | |
$hook[$tag]=$wp_filter[$tag]; | |
if (!is_array($hook[$tag])) { | |
trigger_error("Nothing found for '$tag' hook", E_USER_WARNING); | |
return; | |
} |