Skip to:
Content

bbPress.org


Ignore:
Timestamp:
04/15/2012 01:49:07 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Introduce bbp_parse_args() and pass filter keys into its usages.

  • Parsed args to be passively or aggressively filtered
  • Allows functions that normally require passing parsed $args to instead filter or override results
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-topic-functions.php

    r3826 r3840  
    1919 * @since bbPress (r3349)
    2020 *
    21  * @uses wp_parse_args()
     21 * @uses bbp_parse_args()
    2222 * @uses bbp_get_topic_post_type()
    2323 * @uses wp_insert_post()
     
    4343
    4444    // Parse args
    45     $topic_data = wp_parse_args( $topic_data, $default_topic );
     45    $topic_data = bbp_parse_args( $topic_data, $default_topic, 'insert_topic' );
    4646
    4747    // Insert topic
     
    6666
    6767    // Parse args
    68     $topic_meta = wp_parse_args( $topic_meta, $default_meta );
     68    $topic_meta = bbp_parse_args( $topic_meta, $default_meta, 'insert_topic_meta' );
    6969
    7070    // Insert topic meta
     
    740740            'bbp_anonymous_website' => '',
    741741        );
    742         $r = wp_parse_args( $anonymous_data, $defaults );
     742        $r = bbp_parse_args( $anonymous_data, $defaults, 'update_topic' );
    743743
    744744        // Update all anonymous metas
     
    24442444        'revision_id' => 0
    24452445    );
    2446 
    2447     $r = wp_parse_args( $args, $defaults );
     2446    $r = bbp_parse_args( $args, $defaults, 'update_topic_revision_log' );
    24482447    extract( $r );
    24492448
Note: See TracChangeset for help on using the changeset viewer.