Changeset 12107
- Timestamp:
- 05/21/2018 01:14:05 AM (8 years ago)
- Location:
- trunk/src/bp-templates/bp-nouveau
- Files:
-
- 9 edited
-
buddypress-functions.php (modified) (3 diffs)
-
includes/activity/template-tags.php (modified) (1 diff)
-
includes/activity/widgets.php (modified) (1 diff)
-
includes/classes.php (modified) (4 diffs)
-
includes/functions.php (modified) (3 diffs)
-
includes/groups/ajax.php (modified) (1 diff)
-
includes/groups/classes.php (modified) (1 diff)
-
includes/notifications/functions.php (modified) (1 diff)
-
includes/template-tags.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-nouveau/buddypress-functions.php
r12082 r12107 267 267 } 268 268 269 $data = wp_parse_args( $style, array( 270 'dependencies' => array(), 271 'version' => $this->version, 272 'type' => 'screen', 273 ) ); 269 $data = bp_parse_args( 270 $style, 271 array( 272 'dependencies' => array(), 273 'version' => $this->version, 274 'type' => 'screen', 275 ), 276 'nouveau_enqueue_styles' 277 ); 274 278 275 279 wp_enqueue_style( $handle, $file, $data['dependencies'], $data['version'], $data['type'] ); … … 346 350 } 347 351 348 $data = wp_parse_args( $script, array( 349 'dependencies' => array(), 350 'version' => $this->version, 351 'footer' => false, 352 ) ); 352 $data = bp_parse_args( 353 $script, 354 array( 355 'dependencies' => array(), 356 'version' => $this->version, 357 'footer' => false, 358 ), 359 'nouveau_register_scripts' 360 ); 353 361 354 362 wp_register_script( $handle, $file, $data['dependencies'], $data['version'], $data['footer'] ); … … 628 636 return $path; 629 637 } else { 630 $vars = wp_parse_args( $uri['query'], array() ); 638 $vars = bp_parse_args( 639 $uri['query'], 640 array(), 641 'customizer_set_uri' 642 ); 631 643 632 644 if ( ! empty( $vars['url'] ) ) { -
trunk/src/bp-templates/bp-nouveau/includes/activity/template-tags.php
r12106 r12107 436 436 } 437 437 438 $delete_args = wp_parse_args( $delete_args, array( 439 'link_text' => '', 440 'button_attr' => array( 441 'link_id' => '', 442 'link_href' => '', 443 'link_class' => '', 444 'link_rel' => 'nofollow', 445 'data_bp_tooltip' => '', 438 $delete_args = bp_parse_args( 439 $delete_args, 440 array( 441 'link_text' => '', 442 'button_attr' => array( 443 'link_id' => '', 444 'link_href' => '', 445 'link_class' => '', 446 'link_rel' => 'nofollow', 447 'data_bp_tooltip' => '', 448 ), 446 449 ), 447 ) ); 450 'nouveau_get_activity_entry_buttons' 451 ); 448 452 } 449 453 -
trunk/src/bp-templates/bp-nouveau/includes/activity/widgets.php
r12106 r12107 166 166 */ 167 167 public function form( $instance ) { 168 $instance = wp_parse_args( (array) $instance, array( 169 'title' => __( 'Latest updates', 'buddypress' ), 170 'max' => 5, 171 'type' => '', 172 ) ); 168 $instance = bp_parse_args( 169 (array) $instance, 170 array( 171 'title' => __( 'Latest updates', 'buddypress' ), 172 'max' => 5, 173 'type' => '', 174 ), 175 'widget_latest_activities' 176 ); 173 177 174 178 $title = esc_attr( $instance['title'] ); -
trunk/src/bp-templates/bp-nouveau/includes/classes.php
r12104 r12107 45 45 public function __construct( $args = array() ) { 46 46 foreach ( $args as $arg ) { 47 $r = wp_parse_args( (array) $arg, array( 48 'id' => '', 49 'position' => 99, 50 'component' => '', 51 'must_be_logged_in' => true, 52 'block_self' => false, 53 'parent_element' => false, 54 'parent_attr' => array(), 55 'button_element' => 'a', 56 'button_attr' => array(), 57 'link_text' => '', 58 ) ); 47 $r = bp_parse_args( 48 (array) $arg, 49 array( 50 'id' => '', 51 'position' => 99, 52 'component' => '', 53 'must_be_logged_in' => true, 54 'block_self' => false, 55 'parent_element' => false, 56 'parent_attr' => array(), 57 'button_element' => 'a', 58 'button_attr' => array(), 59 'link_text' => '', 60 ), 61 'buttons_group_constructor' 62 ); 59 63 60 64 // Just don't set the button if a param is missing … … 164 168 foreach ( $args as $id => $params ) { 165 169 if ( isset( $this->group[ $id ] ) ) { 166 $this->group[ $id ] = wp_parse_args( $params, $this->group[ $id ] ); 170 $this->group[ $id ] = bp_parse_args( 171 $params, 172 $this->group[ $id ], 173 'buttons_group_update' 174 ); 167 175 } 168 176 } … … 229 237 * } 230 238 */ 231 $item_nav_args = wp_parse_args( $instance, apply_filters( 'bp_nouveau_object_nav_widget_args', array( 232 'bp_nouveau_widget_title' => true, 233 ) ) ); 239 $item_nav_args = bp_parse_args( 240 $instance, 241 apply_filters( 242 'bp_nouveau_object_nav_widget_args', 243 array( 'bp_nouveau_widget_title' => true ) 244 ), 245 'widget_object_nav' 246 ); 234 247 235 248 $title = ''; … … 304 317 ); 305 318 306 $instance = wp_parse_args( (array) $instance, $defaults ); 319 $instance = bp_parse_args( 320 (array) $instance, 321 $defaults, 322 'widget_object_nav_form' 323 ); 307 324 308 325 $bp_nouveau_widget_title = (bool) $instance['bp_nouveau_widget_title']; -
trunk/src/bp-templates/bp-nouveau/includes/functions.php
r12104 r12107 45 45 46 46 if ( ! empty( $_POST ) ) { 47 $post_query = wp_parse_args( $_POST, $post_query ); 47 $post_query = bp_parse_args( 48 $_POST, 49 $post_query, 50 'nouveau_ajax_querystring' 51 ); 48 52 49 53 // Make sure to transport the scope, filter etc.. in HeartBeat Requests … … 53 57 // Remove heartbeat specific vars 54 58 $post_query = array_diff_key( 55 wp_parse_args( $bp_heartbeat, $post_query ), 59 bp_parse_args( 60 $bp_heartbeat, 61 $post_query, 62 'nouveau_ajax_querystring_heartbeat' 63 ), 56 64 array( 57 65 'data' => false, … … 243 251 } 244 252 245 $r = wp_parse_args( $args, array( 246 'container' => 'div', 247 'container_id' => '', 248 'container_classes' => array( $generic_class, $current_component_class ), 249 'output' => '', 250 ) ); 253 $r = bp_parse_args( 254 $args, 255 array( 256 'container' => 'div', 257 'container_id' => '', 258 'container_classes' => array( $generic_class, $current_component_class ), 259 'output' => '', 260 ), 261 'nouveau_wrapper' 262 ); 251 263 252 264 $valid_containers = array( -
trunk/src/bp-templates/bp-nouveau/includes/groups/ajax.php
r12104 r12107 278 278 } 279 279 280 $request = wp_parse_args( $_POST, array( 281 'scope' => 'members', 282 ) ); 280 $request = bp_parse_args( 281 $_POST, 282 array( 283 'scope' => 'members', 284 ), 285 'nouveau_ajax_get_users_to_invite' 286 ); 283 287 284 288 $bp->groups->invites_scope = 'members'; -
trunk/src/bp-templates/bp-nouveau/includes/groups/classes.php
r12082 r12107 40 40 */ 41 41 public function build_exclude_args() { 42 $this->query_vars = wp_parse_args( $this->query_vars, array( 43 'group_id' => 0, 44 'is_confirmed' => true, 45 ) ); 42 $this->query_vars = bp_parse_args( 43 $this->query_vars, 44 array( 45 'group_id' => 0, 46 'is_confirmed' => true, 47 ), 48 'nouveau_group_invite_query_exlude_args' 49 ); 46 50 47 51 $group_member_ids = $this->get_group_member_ids(); -
trunk/src/bp-templates/bp-nouveau/includes/notifications/functions.php
r12104 r12107 85 85 $bp_nouveau = bp_nouveau(); 86 86 87 $r = wp_parse_args( $args, array( 88 'id' => '', 89 'label' => '', 90 'position' => 99, 91 ) ); 87 $r = bp_parse_args( 88 $args, 89 array( 90 'id' => '', 91 'label' => '', 92 'position' => 99, 93 ), 94 'nouveau_notifications_register_filter' 95 ); 92 96 93 97 if ( empty( $r['id'] ) || empty( $r['label'] ) ) { -
trunk/src/bp-templates/bp-nouveau/includes/template-tags.php
r12104 r12107 709 709 $bp_nouveau = bp_nouveau(); 710 710 711 $n = wp_parse_args( $args, array( 712 'type' => 'primary', 713 'object' => '', 714 'user_has_access' => true, 715 'show_for_displayed_user' => true, 716 ) ); 711 $n = bp_parse_args( 712 $args, 713 array( 714 'type' => 'primary', 715 'object' => '', 716 'user_has_access' => true, 717 'show_for_displayed_user' => true, 718 ), 719 'nouveau_has_nav' 720 ); 717 721 718 722 if ( empty( $n['type'] ) ) {
Note: See TracChangeset
for help on using the changeset viewer.