Description
Attach the handler for this post_typeIf it's a valid post type object then find the handler and attach our filter functions
Usage
oiksc_404_handler::attach_post_type_handler();Parameters
Returns
voidSource
File name: oik-shortcodes/classes/class-oiksc-404-handler.phpLines:
1 to 18 of 18
function attach_post_type_handler() { if ( $this->get_post_type_object() ) { $handlers = $this->handlers(); $handler = bw_array_get( $handlers, $this->post_type_object->name, null ); if ( $handler ) { if ( method_exists( $this, $handler ) ) { add_filter( "genesis_404_entry_content", array( $this, $handler ) ); } else { bw_trace2( $handler, "Using default handler method", false, BW_TRACE_ERROR ); add_filter( "genesis_404_entry_content", array( $this, "handle_post_type" ) ); } add_filter( "genesis_404_entry_title", array( $this, "entry_title" ) ); } else { // No handler method for this post_type_object } } }View on GitHub
Called by
Invoked by
Calls
1 to 4 of 4
- bw_array_get() – Return the array[index] or array->index (for an object) or a default value if not set
- bw_trace2() – Trace $value to the trace log file if tracing is active
- oiksc_404_handler::get_post_type_object() – Find the post_type_object
- oiksc_404_handler::handlers() – Return the handler for each post type
