private function parse_method_name( $name ){
		if ( preg_match( '|^(_?[^_]+_)(.*)$|', $name, $matches ) ) {
			$hook_type = trim( $matches[1], '_' ); //Methods prefixed with _ are always hooked
			$hook_name = $matches[2];

			if ( ! in_array( $hook_type , array( 'theme', 'action', 'filter', 'shortcode' ) ) ) {
				return false;
			}

			return compact( 'hook_type', 'hook_name' );
		}

		return false;
	}
private function parse_method_name( $name ){
		if ( preg_match( '|^(_?[^_]+_)(.*)$|', $name, $matches ) ) {
			$hook_type = trim( $matches[1], '_' ); //Methods prefixed with _ are always hooked
			$hook_name = $matches[2];

			if ( ! in_array( $hook_type , array( 'theme', 'action', 'filter', 'shortcode' ) ) ) {
				return false;
			}

			return compact( 'hook_type', 'hook_name' );
		}

		return false;
	}
private function parse_method_name ( $ name ) { if ( preg_match ( '|^(_?[^_]+_)(.*)$|' , $ name , $ matches ) ) { $ hook_type = trim ( $ matches [ 1 ] , '_' ) ; //Methods prefixed with _ are always hooked $ hook_name = $ matches [ 2 ] ; if ( ! in_array ( $ hook_type , array ( 'theme' , 'action' , 'filter' , 'shortcode' ) ) ) { return false ; } return compact ( 'hook_type' , 'hook_name' ) ; } return false ; }
Parse the method name to determine how to handle it
@param  string $name Method name
@return mixed        Array of hook type (action/filter/theme/shortcode)
or false if not a valid hook method
Parse the method name to determine how to handle it