public/wordpress/wp-content/plugins/wp-courseware/includes/admin/pages/page-units.php
/**
	 * Filter Orderby Column
	 *
	 * @param string   $orderby The orderby string.
	 * @param WP_Query $wp_query The WP_Query object.
	 *
	 * @return string $orderby The orderby string.
	 */
Filter Orderby Column
@param string   $orderby The orderby string.

@return string $orderby The orderby string.
Filter Orderby Column @param string $orderby The orderby string . @return string $orderby The orderby string .
public function filter_orderby_column( $orderby, $wp_query ) {
		global $pagenow, $typenow, $wpcwdb;
		if ( ! $wp_query->is_admin ) {
			return $orderby;
		}
		if ( 'edit.php' !== $pagenow || $this->post_type !== $typenow ) {
			return $orderby;
		}
		$order    = $wp_query->get( 'order' );
		$order_by = $wp_query->get( 'orderby' );
		if ( in_array( $order_by, array( 'parent_course_id', 'parent_module_id', 'unit_teaser' ) ) ) {
			$orderby = "{$wpcwdb->units_meta}.{$order_by} {$order}";
		}
		return $orderby;
	}
public function filter_orderby_column ( $ orderby , $ wp_query ) { global $ pagenow , $ typenow , $ wpcwdb ; if ( ! $ wp_query -> is_admin ) { return $ orderby ; } if ( 'edit.php' !== $ pagenow || $ this -> post_type !== $ typenow ) { return $ orderby ; } $ order = $ wp_query -> get ( 'order' ) ; $ order_by = $ wp_query -> get ( 'orderby' ) ; if ( in_array ( $ order_by , array ( 'parent_course_id' , 'parent_module_id' , 'unit_teaser' ) ) ) { $ orderby = " { $ wpcwdb -> units_meta } . { $ order_by } { $ order } " ; } return $ orderby ; }
Filter Orderby Column
 @param string   $orderby The orderby string.
Filter Orderby Column @param string $orderby The orderby string .