Display sort order in system status
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
* @author ThemeBoy
|
* @author ThemeBoy
|
||||||
* @category Admin
|
* @category Admin
|
||||||
* @package SportsPress/Admin
|
* @package SportsPress/Admin
|
||||||
* @version 1.4
|
* @version 1.4.1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||||
@@ -294,8 +294,10 @@ class SP_Settings_Status extends SP_Settings_Page {
|
|||||||
<td><?php
|
<td><?php
|
||||||
$display_posts = array();
|
$display_posts = array();
|
||||||
$posts = get_posts( array( 'post_type' => 'sp_column', 'orderby' => 'menu_order', 'order' => 'ASC', 'posts_per_page' => -1, 'post_status' => 'any' ) );
|
$posts = get_posts( array( 'post_type' => 'sp_column', 'orderby' => 'menu_order', 'order' => 'ASC', 'posts_per_page' => -1, 'post_status' => 'any' ) );
|
||||||
foreach ( $posts as $post )
|
foreach ( $posts as $post ) {
|
||||||
$display_posts[] = $post->post_title . ' (' . $post->post_name . ' = ' . get_post_meta( $post->ID, 'sp_equation', true ) . ') [' . $post->menu_order . ']';
|
$sort_order = sp_get_post_order( $post->ID );
|
||||||
|
$display_posts[] = $post->post_title . ' (' . $post->post_name . ' = ' . get_post_meta( $post->ID, 'sp_equation', true ) . ') [' . $post->menu_order . ']' . ( '—' == $sort_order ? '' : ' {' . $sort_order . '}' );
|
||||||
|
}
|
||||||
echo implode( ', ', array_map( 'esc_html', $display_posts ) );
|
echo implode( ', ', array_map( 'esc_html', $display_posts ) );
|
||||||
?></td>
|
?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user