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
/** | |
* Prints all actions and filters hooked to a given hook. | |
* | |
* Prints all actions and filters hooked to a given hook. | |
* Inspired by answers in this WordPress Stackexchange question: https://wordpress.stackexchange.com/questions/17394/how-to-know-what-functions-are-hooked-to-an-action-filter | |
*/ | |
function what_is_hooked(){ | |
$hook_name = current_filter(); | |
global $wp_filter; |
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 | |
/** | |
* Export WordPress post data to CSV | |
* Based on <http://stackoverflow.com/a/3474698> and <http://ran.ge/2009/10/27/howto-create-stream-csv-php/> | |
*/ | |
/** | |
********************************************************************* | |
* Configuration | |
********************************************************************* |
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
// opção 1: função do_shortcode | |
// veja https://developer.wordpress.org/reference/functions/do_shortcode/ | |
echo do_shortcode( $content, false ); | |
// opção 2: o filtro the_content | |
// veja https://developer.wordpress.org/reference/hooks/the_content/ | |
echo apply_filters('the_content', $content); | |
// pega um campo customizado em post e passa para do_shortcode | |
// veja https://developer.wordpress.org/reference/functions/get_post_meta/ |
NewerOlder