Plugin Directory

Changeset 917226


Ignore:
Timestamp:
05/19/2014 03:01:42 PM (12 years ago)
Author:
jawittdesigns
Message:

changed cmb_Meta_Box class name to WP_Admin_Dir_cmb_Meta_Box to avoid conflicts

Location:
wp-admin-directory/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • wp-admin-directory/trunk/README.txt

    r917130 r917226  
    55Requires at least: 3.7.0
    66Tested up to: 3.9.1
    7 Stable tag: 1.0.0
     7Stable tag: 1.0.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • wp-admin-directory/trunk/admin/assets/metaboxes/helpers/cmb_Meta_Box_Sanitize.php

    r917130 r917226  
    2828        $this->field       = $field;
    2929        $this->value       = $value;
    30         $this->object_id   = cmb_Meta_Box::get_object_id();
    31         $this->object_type = cmb_Meta_Box::get_object_type();
     30        $this->object_id   = WP_Admin_Dir_cmb_Meta_box::get_object_id();
     31        $this->object_type = WP_Admin_Dir_cmb_Meta_box::get_object_type();
    3232    }
    3333
     
    226226
    227227        if ( empty( $tzstring ) )
    228             $tzstring = cmb_Meta_Box::timezone_string();
    229 
    230         $offset = cmb_Meta_Box::timezone_offset( $tzstring, true );
     228            $tzstring = WP_Admin_Dir_cmb_Meta_box::timezone_string();
     229
     230        $offset = WP_Admin_Dir_cmb_Meta_box::timezone_offset( $tzstring, true );
    231231
    232232        if ( substr( $tzstring, 0, 3 ) === 'UTC' )
     
    292292        // If there is no ID saved yet, try to get it from the url
    293293        if ( $value && ! $id_val ) {
    294             $id_val = cmb_Meta_Box::image_id_from_url( $value );
     294            $id_val = WP_Admin_Dir_cmb_Meta_box::image_id_from_url( $value );
    295295        }
    296296
  • wp-admin-directory/trunk/admin/assets/metaboxes/helpers/cmb_Meta_Box_Show_Filters.php

    r917130 r917226  
    2424            return $display;
    2525
    26         $object_id = is_admin() ? cmb_Meta_Box::get_object_id() : @get_the_id();
     26        $object_id = is_admin() ? WP_Admin_Dir_cmb_Meta_box::get_object_id() : @get_the_id();
    2727
    2828        if ( ! $object_id )
     
    4545            return $display;
    4646
    47         $object_id = cmb_Meta_Box::get_object_id();
     47        $object_id = WP_Admin_Dir_cmb_Meta_box::get_object_id();
    4848
    49         if ( ! $object_id || cmb_Meta_Box::get_object_type() !== 'post' )
     49        if ( ! $object_id || WP_Admin_Dir_cmb_Meta_box::get_object_type() !== 'post' )
    5050            return false;
    5151
  • wp-admin-directory/trunk/admin/assets/metaboxes/helpers/cmb_Meta_Box_ajax.php

    r917130 r917226  
    153153        // get cached data
    154154        $data = 'options-page' === self::$object_type
    155             ? cmb_Meta_Box::get_option( self::$object_id, self::$embed_args['cache_key'] )
     155            ? WP_Admin_Dir_cmb_Meta_box::get_option( self::$object_id, self::$embed_args['cache_key'] )
    156156            : get_metadata( self::$object_type, self::$object_id, $meta_key, true );
    157157
     
    177177        if ( 'options-page' === self::$object_type ) {
    178178            // Set the option
    179             cmb_Meta_Box::update_option( self::$object_id, self::$embed_args['cache_key'], $meta_value, array( 'type' => 'oembed' ) );
     179            WP_Admin_Dir_cmb_Meta_box::update_option( self::$object_id, self::$embed_args['cache_key'], $meta_value, array( 'type' => 'oembed' ) );
    180180            // Save the option
    181             cmb_Meta_Box::save_option( self::$object_id );
     181            WP_Admin_Dir_cmb_Meta_box::save_option( self::$object_id );
    182182        } else {
    183183            update_metadata( self::$object_type, self::$object_id, $meta_key, $meta_value );
  • wp-admin-directory/trunk/admin/assets/metaboxes/helpers/cmb_Meta_Box_field.php

    r917130 r917226  
    4949     */
    5050    public function __construct( $field_args, $group_field = null ) {
    51         $this->object_id   = cmb_Meta_Box::get_object_id();
    52         $this->object_type = cmb_Meta_Box::get_object_type();
     51        $this->object_id   = WP_Admin_Dir_cmb_Meta_box::get_object_id();
     52        $this->object_type = WP_Admin_Dir_cmb_Meta_box::get_object_type();
    5353        $this->group       = ! empty( $group_field ) ? $group_field : false;
    5454        $this->args        = $this->_set_field_defaults( $field_args );
     
    142142
    143143        $data = 'options-page' === $type
    144             ? cmb_Meta_Box::get_option( $id, $field_id )
     144            ? WP_Admin_Dir_cmb_Meta_box::get_option( $id, $field_id )
    145145            : get_metadata( $type, $id, $field_id, ( $single || $repeat ) /* If multicheck this can be multiple values */ );
    146146
     
    165165
    166166        if ( 'options-page' === $type )
    167             return cmb_Meta_Box::update_option( $id, $field_id, $new_value, $single );
     167            return WP_Admin_Dir_cmb_Meta_box::update_option( $id, $field_id, $new_value, $single );
    168168
    169169        if ( ! $single )
     
    182182
    183183        return 'options-page' === $type
    184             ? cmb_Meta_Box::remove_option( $id, $field_id )
     184            ? WP_Admin_Dir_cmb_Meta_box::remove_option( $id, $field_id )
    185185            : delete_metadata( $type, $id, $field_id, $old );
    186186    }
     
    338338     */
    339339    public function field_timezone_offset() {
    340         return cmb_Meta_Box::timezone_offset( $this->field_timezone() );
     340        return WP_Admin_Dir_cmb_Meta_box::timezone_offset( $this->field_timezone() );
    341341    }
    342342
  • wp-admin-directory/trunk/admin/assets/metaboxes/helpers/cmb_Meta_Box_types.php

    r917130 r917226  
    503503        $this->field->args['default'] = $this->field->args( 'default' )
    504504            ? $this->field->args( 'default' )
    505             : cmb_Meta_Box::timezone_string();
     505            : WP_Admin_Dir_cmb_Meta_box::timezone_string();
    506506
    507507        $meta_value = $this->field->escaped_value();
     
    740740        // If there is no ID saved yet, try to get it from the url
    741741        if ( $meta_value && ! $_id_value ) {
    742             $_id_value = cmb_Meta_Box::image_id_from_url( esc_url_raw( $meta_value ) );
     742            $_id_value = WP_Admin_Dir_cmb_Meta_box::image_id_from_url( esc_url_raw( $meta_value ) );
    743743        }
    744744
  • wp-admin-directory/trunk/admin/assets/metaboxes/init.php

    r917130 r917226  
    3636
    3737// Autoload helper classes
    38 spl_autoload_register('cmb_Meta_Box::autoload_helpers');
     38spl_autoload_register('WP_Admin_Dir_cmb_Meta_Box::autoload_helpers');
    3939
    4040$meta_boxes = array();
    4141$meta_boxes = apply_filters( 'cmb_meta_boxes', $meta_boxes );
    4242foreach ( $meta_boxes as $meta_box ) {
    43     $my_box = new cmb_Meta_Box( $meta_box );
     43    $my_box = new WP_Admin_Dir_cmb_Meta_Box( $meta_box );
    4444}
    4545
    46 define( 'CMB_META_BOX_URL', cmb_Meta_Box::get_meta_box_url() );
     46define( 'CMB_META_BOX_URL', WP_Admin_Dir_cmb_Meta_Box::get_meta_box_url() );
    4747
    4848/**
    4949 * Create meta boxes
    5050 */
    51 class cmb_Meta_Box {
     51class WP_Admin_Dir_cmb_Meta_Box {
    5252
    5353    /**
     
    10321032 */
    10331033function cmb_get_option( $option_key, $field_id = '' ) {
    1034     return cmb_Meta_Box::get_option( $option_key, $field_id );
     1034    return WP_Admin_Dir_cmb_Meta_Box::get_option( $option_key, $field_id );
    10351035}
    10361036
     
    10461046    // Default to the loop post ID
    10471047    $object_id = $object_id ? $object_id : get_the_ID();
    1048     cmb_Meta_Box::set_object_id( $object_id );
    1049     cmb_Meta_Box::set_object_type( $object_type );
     1048    WP_Admin_Dir_cmb_Meta_Box::set_object_id( $object_id );
     1049    WP_Admin_Dir_cmb_Meta_Box::set_object_type( $object_type );
    10501050    // Send back field object
    10511051    return new cmb_Meta_Box_field( $field_args );
     
    10841084 */
    10851085function cmb_print_metabox( $meta_box, $object_id ) {
    1086     $cmb = new cmb_Meta_Box( $meta_box );
     1086    $cmb = new WP_Admin_Dir_cmb_Meta_Box( $meta_box );
    10871087    if ( $cmb ) {
    10881088
    1089         cmb_Meta_Box::set_object_id( $object_id );
     1089        WP_Admin_Dir_cmb_Meta_Box::set_object_id( $object_id );
    10901090
    10911091        if ( ! wp_script_is( 'cmb-scripts', 'registered' ) )
     
    10981098            wp_enqueue_style( 'cmb-styles' );
    10991099
    1100         cmb_Meta_Box::show_form( $meta_box );
     1100        WP_Admin_Dir_cmb_Meta_Box::show_form( $meta_box );
    11011101    }
    11021102
     
    11101110 */
    11111111function cmb_save_metabox_fields( $meta_box, $object_id ) {
    1112     cmb_Meta_Box::save_fields( $meta_box, $object_id );
     1112    WP_Admin_Dir_cmb_Meta_Box::save_fields( $meta_box, $object_id );
    11131113}
    11141114
     
    11231123function cmb_metabox_form( $meta_box, $object_id, $echo = true ) {
    11241124
    1125     $meta_box = cmb_Meta_Box::set_mb_defaults( $meta_box );
     1125    $meta_box = WP_Admin_Dir_cmb_Meta_Box::set_mb_defaults( $meta_box );
    11261126
    11271127    // Make sure form should be shown
     
    11301130
    11311131    // Make sure that our object type is explicitly set by the metabox config
    1132     cmb_Meta_Box::set_object_type( cmb_Meta_Box::set_mb_type( $meta_box ) );
     1132    WP_Admin_Dir_cmb_Meta_Box::set_object_type( WP_Admin_Dir_cmb_Meta_Box::set_mb_type( $meta_box ) );
    11331133
    11341134    // Save the metabox if it's been submitted
     
    11381138        // check nonce
    11391139        isset( $_POST['submit-cmb'], $_POST['object_id'], $_POST['wp_meta_box_nonce'] )
    1140         && wp_verify_nonce( $_POST['wp_meta_box_nonce'], cmb_Meta_Box::nonce() )
     1140        && wp_verify_nonce( $_POST['wp_meta_box_nonce'], WP_Admin_Dir_cmb_Meta_Box::nonce() )
    11411141        && $_POST['object_id'] == $object_id
    11421142    )
  • wp-admin-directory/trunk/wp-admin-directory.php

    r917130 r917226  
    44 * Plugin URI:        http://wordpress.org/plugins/buddypress/
    55 * Description:       Groups togeher menu links in a single page
    6  * Version:           1.0.0
     6 * Version:           1.0.1
    77 * Author:            Jason Witt
    88 * Author URI:        http://jawittdesigns@gmail.com
Note: See TracChangeset for help on using the changeset viewer.