Sindbad~EG File Manager

Current Path : /home/frekansk/www/wp-content/themes/turitor/learnpress/
Upload File :
Current File : /home/frekansk/www/wp-content/themes/turitor/learnpress/filter-order.php

<?php 

    $selected = esc_attr(isset($_REQUEST['orderBy'])?$_REQUEST['orderBy']:'');
    $default_order = apply_filters( 'turitor_default_order_course_option', array(
            'none'            => esc_html__( 'Select Order', 'turitor' ),
            'newly-published' => esc_html__( 'Sort by: Newly published', 'turitor' ),
            'alphabetical'    => esc_html__( 'Sort by: Alphabetical', 'turitor' ),
            'feature'         => esc_html__( 'Sort by: Featured', 'turitor' ),
            'popularity'      => esc_html__( 'Sort by: Popularity', 'turitor' )
        ) 
    );

    $obj_id = get_queried_object_id();
    if(is_category()){
        $current_url = get_term_link( $obj_id );
    }else{
        $current_url = get_permalink( $obj_id );
    }

?>

<div class="turitor-course-order">
    <select name="orderby" onChange="window.document.location.href=this.options[this.selectedIndex].value;">
        <?php
            foreach ( $default_order as $k => $v ) {
                 $order_url = add_query_arg('orderBy',esc_attr( $k ), ''); 
                if($selected==$k){
                    echo '<option selected value="'. $order_url . '">' . ( $v ) . '</option>';
                }else{
                    echo '<option  value="'. $order_url . '">' . ( $v ) . '</option>';
                }
            }
        ?>
    </select>
</div>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists