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 | |
// Número de posts em destaque | |
$n = 5; | |
// Recebe os sticky posts e os ordena por ID de forma decrescente | |
$sticky_posts = get_option( 'sticky_posts' ); | |
rsort( $sticky_posts ); | |
// Verifica se há sticky posts |
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 | |
/** | |
* Replace the default "_" (underscore) with "-" (hyphen) in protected custom fields for debugging purposes | |
* | |
* @param bool $protected The default value | |
* @param string $meta_key The meta key | |
* @return bool True for meta keys starting with "-" (hyphen), false otherwise | |
*/ | |
function unprotected_meta( $protected, $meta_key ) { |
NewerOlder