Making WordPress.org


Ignore:
Timestamp:
02/24/2015 07:58:53 PM (9 years ago)
Author:
iandunn
Message:

Multi Event Sponsors: Refactor the Regions taxonomy into its own class.

There was arguably already enough code to warrant putting it in its own file, and I'm going to be adding more soon.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/multi-event-sponsors/classes/mes-sponsorship-level.php

    r716 r1302  
    1616    public function __construct() {
    1717        add_action( 'init',                                   array( $this, 'create_post_type' ) );
    18         add_action( 'add_meta_boxes_' . self::POST_TYPE_SLUG, array( $this, 'remove_meta_boxes' ) );
    1918        add_action( 'admin_init',                             array( $this, 'add_meta_boxes' ) );
    2019        add_action( 'save_post',                              array( $this, 'save_post' ), 10, 2 );
    2120        add_filter( 'the_content',                            array( $this, 'add_header_footer_text' ) );
     21
     22        // todo readjust whitepsace after this commit
    2223    }
    2324
     
    5859            'query_var'       => true,
    5960            'supports'        => array( 'title', 'editor', 'author', 'excerpt', 'revisions' ),
    60             'taxonomies'      => array( MES_Sponsor::REGIONS_SLUG ),
     61            'taxonomies'      => array( MES_Region::TAXONOMY_SLUG ),
    6162        );
    6263
    6364        register_post_type( self::POST_TYPE_SLUG, $post_type_params );
    64     }
    65 
    66     /**
    67      * Remove the taxonomy meta boxes, since we don't assign them directly.
    68      *
    69      * @param WP_Post $post
    70      */
    71     public function remove_meta_boxes( $post ) {
    72         remove_meta_box( 'mes-regionsdiv', null, 'side' );
    7365    }
    7466
Note: See TracChangeset for help on using the changeset viewer.