Skip to:
Content

BuddyPress.org

Changeset 13504


Ignore:
Timestamp:
06/19/2023 06:09:44 PM (3 years ago)
Author:
imath
Message:

Core, Messages & Templates: remove never used inited vars in functions

Props upadalavipul

Fixes #8892
Closes https://github.com/buddypress/buddypress/pull/118

Location:
trunk/src
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-block.php

    r13500 r13504  
    285285
    286286                                        // Try to load the translation.
    287                                         $translated = wp_set_script_translations( $this->block->editor_script, $translation_domain, $translation_dir );
     287                                        wp_set_script_translations( $this->block->editor_script, $translation_domain, $translation_dir );
    288288                                }
    289289                        }
  • trunk/src/bp-core/classes/class-bp-core-bp-options-nav-backcompat.php

    r10752 r13504  
    125125                        $nav = array();
    126126
    127                         if ( empty( $primary_nav ) ) {
     127                        if ( empty( $secondary_nav ) ) {
    128128                                return $nav;
    129129                        }
    130130
    131                         foreach ( $primary_nav as $item ) {
     131                        foreach ( $secondary_nav as $item ) {
    132132                                $nav[ $item->slug ] = (array) $item;
    133133                        }
  • trunk/src/bp-messages/bp-messages-notifications.php

    r13503 r13504  
    2828        $text        = '';
    2929        $link        = bp_loggedin_user_url( bp_members_get_path_chunks( array( bp_get_messages_slug(), 'inbox' ) ) );
    30         $title       = __( 'Inbox', 'buddypress' );
    3130        $amount      = 'single';
    3231
  • trunk/src/bp-templates/bp-nouveau/includes/activity/template-tags.php

    r13436 r13504  
    44 *
    55 * @since 3.0.0
    6  * @version 10.0.0
     6 * @version 12.0.0
    77 */
    88
     
    552552                                $data_element = 'href';
    553553                        }
    554 
    555                         $spam_link = bp_rewrites_get_url(
    556                                 array(
    557                                         'component_id'                 => 'activity',
    558                                         'single_item_action'           => 'spam',
    559                                         'single_item_action_variables' => array( bp_get_activity_id() ),
    560                                 )
    561                         );
    562554
    563555                        $buttons['activity_spam']['button_attr'][ $data_element ] = wp_nonce_url(
  • trunk/src/bp-templates/bp-nouveau/includes/blogs/template-tags.php

    r13409 r13504  
    44 *
    55 * @since 3.0.0
    6  * @version 6.0.0
     6 * @version 12.0.0
    77 */
    88
     
    184184                }
    185185
    186                 /*
    187                  * If we have a arg value for $button_element passed through
    188                  * use it to default all the $buttons['button_element'] values
    189                  * otherwise default to 'a' (anchor)
    190                  * Or override & hardcode the 'element' string on $buttons array.
    191                  *
    192                  * Icons sets a class for icon display if not using the button element
    193                  */
    194                 $icons = '';
    195186                if ( ! empty( $args['button_element'] ) ) {
    196187                        $button_element = $args['button_element'] ;
    197188                } else {
    198189                        $button_element = 'a';
    199                         $icons = ' icons';
    200                 }
    201 
    202                 // If we pass through parent classes add them to $button array
     190                }
     191
     192                // If we pass through parent classes add them to `$button` array.
    203193                $parent_class = '';
    204194                if ( ! empty( $args['parent_attr']['class'] ) ) {
  • trunk/src/bp-templates/bp-nouveau/includes/customizer-controls.php

    r12156 r13504  
    44 *
    55 * @since 3.0.0
    6  * @version 3.1.0
     6 * @version 12.0.0
    77 */
    88
     
    3232        public function render_content() {
    3333                $id       = 'customize-control-' . str_replace( '[', '-', str_replace( ']', '', $this->id ) );
    34                 $class    = 'customize-control customize-control-' . $this->type;
    3534                $setting  = "bp_nouveau_appearance[{$this->type}_nav_order]";
    3635                $item_nav = array();
     
    6261                } else {
    6362                        $item_nav = bp_nouveau_member_customizer_nav();
    64 
    65                         $guide = __( 'Drag each possible member navigation items that are listed below into the order you prefer.', 'buddypress' );
     63                        $guide    = __( 'Drag each possible member navigation items that are listed below into the order you prefer.', 'buddypress' );
    6664                }
    6765                ?>
     
    7674                        <ul id="<?php echo esc_attr( $id ); ?>" class="ui-sortable" style="margin-top: 0px; height: 500px;" data-bp-type="<?php echo esc_attr( $this->type ); ?>">
    7775
    78                                 <?php
    79                                 $i = 0;
    80                                 foreach ( $item_nav as $item ) :
    81                                         $i += 1;
    82                                 ?>
     76                                <?php foreach ( $item_nav as $item ) : ?>
    8377                                        <li data-bp-nav="<?php echo esc_attr( $item->slug ); ?>">
    8478                                                <div class="menu-item-bar">
  • trunk/src/bp-templates/bp-nouveau/includes/groups/ajax.php

    r13273 r13504  
    44 *
    55 * @since 3.0.0
    6  * @version 6.3.0
     6 * @version 12.0.0
    77 */
    88
     
    378378 */
    379379function bp_nouveau_ajax_send_group_invites() {
    380         $bp = buddypress();
    381 
    382380        $response = array(
    383381                'feedback' => __( 'Invites could not be sent. Please try again.', 'buddypress' ),
  • trunk/src/bp-templates/bp-nouveau/includes/groups/functions.php

    r13503 r13504  
    522522function bp_nouveau_restrict_rest_group_invite_to_friends( $retval, $request ) {
    523523        if ( true === $retval && bp_is_active( 'friends' ) ) {
    524                 $group_id   = $request->get_param( 'group_id' );
    525524                $user_id    = $request->get_param( 'user_id' );
    526525                $inviter_id = $request->get_param( 'inviter_id' );
  • trunk/src/bp-templates/bp-nouveau/includes/groups/template-tags.php

    r13447 r13504  
    689689                }
    690690
    691                 /*
    692                  * If we have a arg value for $button_element passed through
    693                  * use it to default all the $buttons['button_element'] values
    694                  * otherwise default to 'a' (anchor) o override & hardcode the
    695                  * 'element' string on $buttons array.
    696                  *
    697                  * Icons sets a class for icon display if not using the button element
    698                  */
    699                 $icons = '';
    700691                if ( ! empty( $args['button_element'] ) ) {
    701692                        $button_element = $args['button_element'] ;
    702693                } else {
    703694                        $button_element = 'a';
    704                         $icons = ' icons';
    705695                }
    706696
  • trunk/src/bp-templates/bp-nouveau/includes/members/template-tags.php

    r13447 r13504  
    248248                }
    249249
    250                 /*
    251                  * If we have a arg value for $button_element passed through
    252                  * use it to default all the $buttons['button_element'] values
    253                  * otherwise default to 'a' (anchor)
    254                  * Or override & hardcode the 'element' string on $buttons array.
    255                  *
    256                  * Icons sets a class for icon display if not using the button element
    257                  */
    258                 $icons = '';
    259250                if ( ! empty( $args['button_element'] ) ) {
    260251                        $button_element = $args['button_element'] ;
    261252                } else {
    262253                        $button_element = 'button';
    263                         $icons = ' icons';
    264254                }
    265255
  • trunk/src/bp-templates/bp-nouveau/includes/template-tags.php

    r13472 r13504  
    475475        }
    476476
    477         $count_class = sprintf( '%1$s-%2$s-count-%3$s', $pagination_type, $screen, $position );
    478         $links_class = sprintf( '%1$s-%2$s-links-%3$s', $pagination_type, $screen, $position );
    479         ?>
    480 
    481         <?php
    482477        if ( 'bottom' === $position && isset( $bottom_hook ) ) {
    483478                /**
Note: See TracChangeset for help on using the changeset viewer.