Skip to content

Instantly share code, notes, and snippets.

@aliciaduffy
Created November 6, 2019 19:53
Show Gist options
  • Save aliciaduffy/37549747d94d0fdcfb9b67594ef88556 to your computer and use it in GitHub Desktop.
Save aliciaduffy/37549747d94d0fdcfb9b67594ef88556 to your computer and use it in GitHub Desktop.
add_action( 'admin_init', 'do_something_152677' );
function do_something_152677 () {
// Global object containing current admin page
global $pagenow;
if ( 'edit.php' === $pagenow && ) && ( isset($_GET['post_type']) && 'heroes' == $_GET['post_type'] ) ) )
// update vote counts postmeta
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment