yit_cptu_register_post_type_args

Retrieve the values configured inside the custom post type.

Description

(array) apply_filters( 'yit_cptu_register_post_type_args', (callback) $this__args_label_item_sing, (string) $this_name, (unknown) $post ); 

Returns (array)

Parameters (3)

0. $this__args_label_item_sing — Optional. (callback) => array( 'layout' => get_post_meta( $post->ID, $this->_args['layout_option'], true ), 'rewrite' => get_post_meta( $post->ID, '_rewrite', true ), 'label_singular' => ! empty( $this->_args['label_item_sing'] ) ? $this->_args['label_item_sing'] : get_post_meta( $post->ID, '_label_singular', true ), 'label_plural' => ! empty( $this->_args['label_item_plur'] ) ? $this->_args['label_item_plur'] : get_post_meta( $post->ID, '_label_plural', true ), 'taxonomy' => get_post_meta( $post->ID, '_taxonomy', true ), 'taxonomy_rewrite' => get_post_meta( $post->ID, '_taxonomy_rewrite', true ), )
The array.
1. $this_name (string)
The this name.
2. $post (unknown)
The post.

Usage

To run the hook, copy the example below.
  1. $this__args_label_item_sing = apply_filters( 'yit_cptu_register_post_type_args', $this__args_label_item_sing, $this_name, $post ); 
  2.  
  3. if ( !empty( $this__args_label_item_sing ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the yit_cptu_register_post_type_args callback 
  2. function filter_yit_cptu_register_post_type_args( $this__args_label_item_sing, $this_name, $post ) { 
  3. // make filter magic happen here... 
  4. return $this__args_label_item_sing
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'yit_cptu_register_post_type_args', 'filter_yit_cptu_register_post_type_args', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'yit_cptu_register_post_type_args', 'filter_yit_cptu_register_post_type_args', 10, 3 ); 

Defined (1)

The filter is defined in the following location(s).

/plugin-fw/lib/yit-cpt-unlimited.php  
  1. $args = apply_filters( 'yit_cptu_register_post_type_args', array(