Skip to content

Instantly share code, notes, and snippets.

@DarioBF
Created June 13, 2019 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DarioBF/247f7bbaa59fbf564aa8433d53bad247 to your computer and use it in GitHub Desktop.
Save DarioBF/247f7bbaa59fbf564aa8433d53bad247 to your computer and use it in GitHub Desktop.
/** Función que elimina todo rastro de fechas en los artículos */
function bf_remove_dates() {
add_filter('the_time', '__return_false');
add_filter('get_the_time', '__return_false');
add_filter('the_modified_time', '__return_false');
add_filter('get_the_modified_time', '__return_false');
add_filter('the_date', '__return_false');
add_filter('get_the_date', '__return_false');
add_filter('the_modified_date', '__return_false');
add_filter('get_the_modified_date', '__return_false');
add_filter('get_comment_date', '__return_false');
add_filter('get_comment_time', '__return_false');
}
add_action('loop_start', 'bf_remove_dates');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment