Making WordPress.org

Changeset 6106


Ignore:
Timestamp:
11/10/2017 02:17:53 AM (9 years ago)
Author:
iandunn
Message:

WordCamp Payments: Add warning/@todo about problematic $back_compat_statuses.

Location:
sites/trunk/wordcamp.org/public_html/wp-content/plugins
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes/payment-requests-dashboard.php

    r3298 r6106  
    139139                }
    140140
     141                // Warning/@todo: See note in WCP_Payment_Request::render_status_metabox()
    141142                $back_compat_statuses = array(
    142143                        'unpaid' => 'draft',
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes/reimbursement-requests-dashboard.php

    r3299 r6106  
    203203
    204204        // Back-compat.
     205        // Warning/@todo: See note in WCP_Payment_Request::render_status_metabox()
    205206        $back_compat_statuses = array(
    206207                'wcbrr_submitted' => 'pending-approval',
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes/wordcamp-budgets-dashboard.php

    r4396 r6106  
    1616add_action( 'admin_init', __NAMESPACE__ . '\process_action_approve', 11 );
    1717add_action( 'admin_init', __NAMESPACE__ . '\process_action_set_pending_payment', 11 );
    18 
    1918add_action( 'admin_init', __NAMESPACE__ . '\process_import_request', 11 );
    2019
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/payment-request.php

    r6067 r6106  
    207207                wp_nonce_field( 'status', 'status_nonce' );
    208208
     209                /*
     210                 * @todo Remove $back_compat_statuses everywhere.
     211                 *
     212                 * They add a lot of fragility because they're not DRY and the data isn't consistent and
     213                 * predictable. They appear in many of the modules in both the wordcamp-payments and
     214                 * wordcamp-payments-network plugins.
     215                 *
     216                 * It seems like it'd be much better to just run a script over all sites and convert the
     217                 * data to the new statuses. Need to investigate why that wasn't done to begin with, in
     218                 * case there are some problems that make this more complicated than it appears.
     219                 */
    209220                $back_compat_statuses = array(
    210221                        'unpaid' => 'draft',
     
    526537
    527538                // Back-compat
     539                // Warning/@todo: See note in render_status_metabox()
    528540                $back_compat_statuses = array(
    529541                        'unpaid' => 'draft',
     
    963975                        $post = get_post( $entry->post_id );
    964976
     977                        // Warning/@todo: See note in render_status_metabox()
    965978                        $back_compat_statuses = array(
    966979                                'unpaid' => 'draft',
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/reimbursement-request.php

    r6067 r6106  
    266266        wp_nonce_field( 'status', 'status_nonce' );
    267267
     268        // Warning/@todo: See note in WCP_Payment_Request::render_status_metabox()
    268269        $back_compat_statuses = array(
    269270                'wcbrr_submitted'      => 'wcb-pending-approval',
     
    867868                $post = get_post( $entry->request_id );
    868869
     870                // Warning/@todo: See note in WCP_Payment_Request::render_status_metabox()
    869871                $back_compat_statuses = array(
    870872                        'wcbrr_submitted'      => 'wcb-pending-approval',
Note: See TracChangeset for help on using the changeset viewer.