button( array( 'type' => 'button', 'id' => 'uwp-user-sort', 'icon' => 'fas fa-sort', 'class' => 'btn btn-outline-primary rounded-right', 'content' => esc_html( $content ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped 'extra_attributes' => array('data-toggle'=>'dropdown', 'aria-haspopup'=>'true', 'aria-expanded'=>'false') ), true ); ?>
$val ) { $active = isset( $_REQUEST['uwp_sort_by'] ) && $_REQUEST['uwp_sort_by'] == $key ? ' active' : ''; aui()->button( array( 'type' => 'a', 'href' => esc_url_raw( add_query_arg( array( 'uwp_sort_by' => $key ), $base_link ) ), 'class' => esc_html( 'dropdown-item' . $active ), 'content' => esc_html( $val ), 'extra_attributes' => array( 'rel' => 'nofollow' ) ), true ); } if ( ! empty( $_REQUEST['uwp_sort_by'] ) ) { echo '
'; aui()->button( array( 'type' => 'a', 'href' => esc_url_raw( $base_link ), 'class' => 'dropdown-item', 'content' => esc_html__( "Clear Sort", "userswp" ), 'extra_attributes' => array( 'rel' => 'nofollow' ) ), true ); } ?>
button( array( 'type' => 'button', 'id' => 'uwp-list-view-select-grid', 'class' => 'btn btn-outline-primary rounded-right uwp-list-view-select-grid', 'icon' => 'fas fa-th', 'extra_attributes' => array( 'data-toggle' => 'dropdown', 'aria-haspopup' => 'true', 'aria-expanded' => 'false' ) ), true ); ?>
button( array( 'type' => 'button', 'class' => 'dropdown-item', 'content' => esc_html( wp_sprintf( __( "Grid %d","userswp" ), 1 ) ), 'onclick' => 'uwp_list_view_select(1);return false;', 'extra_attributes' => array( 'data-gridview' => '1' ) ), true ); aui()->button( array( 'type' => 'button', 'class' => 'dropdown-item', 'content' => esc_html( wp_sprintf( __( "Grid %d","userswp" ), 2 ) ), 'onclick' => 'uwp_list_view_select(2);return false;', 'extra_attributes' => array( 'data-gridview' => '2' ) ), true ); aui()->button( array( 'type' => 'button', 'class' => 'dropdown-item', 'content' => esc_html( wp_sprintf( __( "Grid %d","userswp" ), 3 ) ), 'onclick' => 'uwp_list_view_select(3);return false;', 'extra_attributes' => array( 'data-gridview' => '3' ) ), true ); aui()->button( array( 'type' => 'button', 'class' => 'dropdown-item', 'content' => esc_html( wp_sprintf( __( "Grid %d","userswp" ), 4 ) ), 'onclick' => 'uwp_list_view_select(4);return false;', 'extra_attributes' => array( 'data-gridview' => '4' ) ), true ); aui()->button( array( 'type' => 'button', 'class' => 'dropdown-item', 'content' => esc_html( wp_sprintf( __( "Grid %d","userswp" ), 5 ) ), 'onclick' => 'uwp_list_view_select(5);return false;', 'extra_attributes' => array( 'data-gridview' => '5' ) ), true ); ?>