Skip to content

Instantly share code, notes, and snippets.

@eduardozulian
eduardozulian / featured-sticky-posts.php
Last active December 11, 2015 15:38
Uses sticky posts as featured posts in the front page.
@eduardozulian
eduardozulian / wp-unprotected-meta.php
Last active February 21, 2024 11:01
WordPress filter to replace the default "_" (underscore) with "-" (hyphen) in protected custom fields for debugging purposes
<?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 ) {