WordPress.org

Making WordPress.org

Changeset 1949


Ignore:
Timestamp:
10/07/2015 08:56:11 PM (4 years ago)
Author:
iandunn
Message:

WordCamp Base Redux: Fix a few PHP warnings/notices.

This commit brings these two files into sync with WordCamp Base.

See #192

Location:
sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-base-v2/lib/utils
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-base-v2/lib/utils/class-wcb-metabox.php

    r2 r1949  
    1111    static $registry;
    1212
     13    function __construct( $id_base='' ) {
     14        $this->id_base = ( empty( $id_base ) ) ? get_class( $this ) : $id_base;
     15
     16        add_action('admin_init',            array( &$this, '_admin_init' ) );
     17        add_action('admin_enqueue_scripts', array( &$this, '_admin_enqueue_scripts' ) ); // @todo styles. also, consider footer.
     18    }
     19   
    1320    // PHP4 Compatible constructor
    1421    function WCB_Metabox( $id_base='' ) {
    1522        $this->__construct( $id_base );
    16     }
    17 
    18     function __construct( $id_base='' ) {
    19         $this->id_base = ( empty( $id_base ) ) ? get_class( $this ) : $id_base;
    20 
    21         add_action('admin_init',            array( &$this, '_admin_init' ) );
    22         add_action('admin_enqueue_scripts', array( &$this, '_admin_enqueue_scripts' ) ); // @todo styles. also, consider footer.
    2323    }
    2424
     
    212212     * @access protected
    213213     */
    214     function save() {}
     214    function save( $post_id, $post ) {}
    215215
    216216
     
    224224     * @return boolean Whether to save the metabox.
    225225     */
    226     function maybe_save() {}
     226    function maybe_save( $post_id, $post ) {}
    227227
    228228    /**
  • sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-base-v2/lib/utils/class-wcb-registry.php

    r2 r1949  
    1111    function register( $classname ) {
    1212        if ( ! isset( $this->instances[ $classname ] ) )
    13             $this->instances[ $classname ] = & new $classname();
     13            $this->instances[ $classname ] = new $classname();
    1414    }
    1515    /**
Note: See TracChangeset for help on using the changeset viewer.