Making WordPress.org

Changeset 998


Ignore:
Timestamp:
11/20/2014 04:44:15 AM (11 years ago)
Author:
iandunn
Message:

WordCamp Payments: Make register_post_statuses() static.

It doesn't rely on any object state, and WordCamp_Payments_Network_Tools needs to call it, so it'll be cleaner if we don't have to instantiate the entire object for that.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/classes/payment-request.php

    r995 r998  
    1010        // Initialization
    1111        add_action( 'init',                   array( $this, 'register_post_type' ));
    12         add_action( 'init',                   array( $this, 'register_post_statuses' ) );
     12        add_action( 'init',                   array( __CLASS__, 'register_post_statuses' ) );
    1313        add_action( 'add_meta_boxes',         array( $this, 'init_meta_boxes' ) );
    1414
     
    6969     * Register our custom post statuses
    7070     */
    71     public function register_post_statuses() {
     71    public static function register_post_statuses() {
    7272        register_post_status(
    7373            'paid',
Note: See TracChangeset for help on using the changeset viewer.