Ticket #2583: 2583.1.diff
File 2583.1.diff, 4.2 KB (added by , 8 years ago) |
---|
-
classes/tggr-media-source.php
159 159 public static function sort_by_author( $query_vars ) { 160 160 $class = get_called_class(); 161 161 162 if ( array_key_exists( 'orderby', $query_vars ) && $class::POST_TYPE_SLUG == $query_vars['post_type'] ) { 163 if ( 'Author' == $query_vars['orderby'] ) { 164 $query_vars['orderby'] = 'meta_value'; 165 $query_vars['meta_key'] = self::get_author_username_key( $class ); 166 } 162 if ( isset( $query_vars['orderby'], $query_vars['post_type'] ) && 163 $class::POST_TYPE_SLUG == $query_vars['post_type'] && 164 'Author' == $query_vars['orderby'] ) { 165 166 $query_vars['orderby'] = 'meta_value'; 167 $query_vars['meta_key'] = self::get_author_username_key( $class ); 167 168 } 168 169 169 170 return $query_vars; -
classes/tggr-source-flickr.php
69 69 add_filter( 'manage_edit-' . self::POST_TYPE_SLUG . '_columns', __CLASS__ . '::add_columns' ); 70 70 add_filter( 'manage_edit-' . self::POST_TYPE_SLUG . '_sortable_columns', __CLASS__ . '::add_columns' ); 71 71 add_action( 'manage_' . self::POST_TYPE_SLUG . '_posts_custom_column', __CLASS__ . '::display_columns', 10, 2 ); 72 add_filter( 'request', __CLASS__ . '::sort_by_author' ); 72 73 if ( is_admin() ) { 74 add_filter( 'request', __CLASS__ . '::sort_by_author' ); 75 } 73 76 } 74 77 75 78 /** -
classes/tggr-source-google.php
68 68 add_filter( 'manage_edit-' . self::POST_TYPE_SLUG . '_columns', __CLASS__ . '::add_columns' ); 69 69 add_filter( 'manage_edit-' . self::POST_TYPE_SLUG . '_sortable_columns', __CLASS__ . '::add_columns' ); 70 70 add_action( 'manage_' . self::POST_TYPE_SLUG . '_posts_custom_column', __CLASS__ . '::display_columns', 10, 2 ); 71 add_filter( 'request', __CLASS__ . '::sort_by_author' ); 71 72 if ( is_admin() ) { 73 add_filter( 'request', __CLASS__ . '::sort_by_author' ); 74 } 72 75 } 73 76 74 77 /** -
classes/tggr-source-instagram.php
72 72 add_filter( 'manage_edit-' . self::POST_TYPE_SLUG . '_columns', __CLASS__ . '::add_columns' ); 73 73 add_filter( 'manage_edit-' . self::POST_TYPE_SLUG . '_sortable_columns', __CLASS__ . '::add_columns' ); 74 74 add_action( 'manage_' . self::POST_TYPE_SLUG . '_posts_custom_column', __CLASS__ . '::display_columns', 10, 2 ); 75 add_filter( 'request', __CLASS__ . '::sort_by_author' ); 75 76 if ( is_admin() ) { 77 add_filter( 'request', __CLASS__ . '::sort_by_author' ); 78 } 76 79 } 77 80 78 81 /** -
classes/tggr-source-twitter.php
72 72 add_filter( 'manage_edit-' . self::POST_TYPE_SLUG . '_columns', __CLASS__ . '::add_columns' ); 73 73 add_filter( 'manage_edit-' . self::POST_TYPE_SLUG . '_sortable_columns', __CLASS__ . '::add_columns' ); 74 74 add_action( 'manage_' . self::POST_TYPE_SLUG . '_posts_custom_column', __CLASS__ . '::display_columns', 10, 2 ); 75 add_filter( 'request', __CLASS__ . '::sort_by_author' ); 75 76 if ( is_admin() ) { 77 add_filter( 'request', __CLASS__ . '::sort_by_author' ); 78 } 76 79 } 77 80 78 81 /**