Skip to content

Instantly share code, notes, and snippets.

@szepeviktor
Last active May 18, 2024 01:03
Show Gist options
  • Save szepeviktor/6ac0cc9c2f0c492249b8d14012f5078c to your computer and use it in GitHub Desktop.
Save szepeviktor/6ac0cc9c2f0c492249b8d14012f5078c to your computer and use it in GitHub Desktop.
List missing WordPress Cron hook names
<?php
array_map(
function ($cron) {
$hook = array_key_first($cron);
if (!has_action($hook)) {
echo $hook, "\n";
}
},
_get_cron_array()
);
@szepeviktor
Copy link
Author

wp eval 'array_map(function($c){$h=array_key_first($c);if(!has_action($h))echo $h,"\n";},_get_cron_array());'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment