関数 did_action()
定義ファイル :/blog/wp-includes/plugin.php
did_action()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | /** * Retrieve the number of times an action is fired. * * @since 2.1.0 * * @global array $wp_actions Increments the amount of times action was triggered. * * @param string $tag The name of the action hook. * @return int The number of times action hook $tag is fired. */ function did_action($tag) { global $wp_actions; if ( ! isset( $wp_actions[ $tag ] ) ) return 0; return $wp_actions[$tag]; } |