wp/wp-content/plugins/option-tree/includes/ot-post-formats-api.php
changeset 7 cf61fcea0001
parent 5 5e2f62d02dcd
equal deleted inserted replaced
6:490d5cc509ed 7:cf61fcea0001
    36      *
    36      *
    37      * @access  private
    37      * @access  private
    38      * @since   2.3.0
    38      * @since   2.3.0
    39      */
    39      */
    40     private function setup_actions() {
    40     private function setup_actions() {
    41       
    41 
    42       // Initialize the meta boxes
    42       // Initialize the meta boxes
    43       add_action( 'admin_init',                             array( $this, 'meta_boxes'                   ), 2 );
    43       add_action( 'admin_init', array( $this, 'meta_boxes'          ), 2 );
    44       
    44 
    45       // Setup pings for the link & quote URLs
    45       // Setup pings for the link & quote URLs
    46       add_filter( 'pre_ping',                               array( $this, 'pre_ping_post_links'      ), 10, 3 );
    46       add_filter( 'pre_ping',   array( $this, 'pre_ping_post_links' ), 10, 3 );
    47   
    47 
    48     }
    48     }
    49   
    49   
    50     /**
    50     /**
    51      * Builds the default Meta Boxes.
    51      * Builds the default Meta Boxes.
    52      *
    52      *
    54      *
    54      *
    55      * @access    private
    55      * @access    private
    56      * @since     2.3.0
    56      * @since     2.3.0
    57      */
    57      */
    58     public function meta_boxes() {
    58     public function meta_boxes() {
    59       
    59 
    60       // Exit if called outside of WP admin
    60       // Exit if called outside of WP admin
    61       if ( ! is_admin() )
    61       if ( ! is_admin() )
    62         return false;
    62         return false;
    63           
    63 
    64       $meta_boxes = array(
    64       /**
       
    65        * Filter the post formats meta boxes.
       
    66        *
       
    67        * @since 2.6.0
       
    68        *
       
    69        * @param array $meta_boxes The meta boxes being registered.
       
    70        * @return array
       
    71        */
       
    72       $meta_boxes = apply_filters( 'ot_recognized_post_format_meta_boxes', array(
    65         ot_meta_box_post_format_gallery(),
    73         ot_meta_box_post_format_gallery(),
    66         ot_meta_box_post_format_link(),
    74         ot_meta_box_post_format_link(),
    67         ot_meta_box_post_format_quote(),
    75         ot_meta_box_post_format_quote(),
    68         ot_meta_box_post_format_video(),
    76         ot_meta_box_post_format_video(),
    69         ot_meta_box_post_format_audio()
    77         ot_meta_box_post_format_audio(),
    70       );
    78       ) );
    71       
    79 
    72       /**
    80       /**
    73        * Register our meta boxes using the 
    81        * Register our meta boxes using the 
    74        * ot_register_meta_box() function.
    82        * ot_register_meta_box() function.
    75        */
    83        */
    76       foreach( $meta_boxes as $meta_box ) {
    84       foreach( $meta_boxes as $meta_box ) {
    77       
    85 
    78         ot_register_meta_box( $meta_box );
    86         ot_register_meta_box( $meta_box );
    79         
    87 
    80       }
    88       }
    81       
    89 
    82     }
    90     }
    83     
    91     
    84     /**
    92     /**
    85      * Setup pings for the link & quote URLs
    93      * Setup pings for the link & quote URLs
    86      * 
    94      *