id = 'status'; $this->label = __( 'System Status', 'sportspress' ); add_filter( 'sportspress_settings_tabs_array', array( $this, 'add_settings_page' ), 99 ); add_action( 'sportspress_settings_' . $this->id, array( $this, 'output' ) ); } /** * Output system status * * @access public * @return void */ public function output() { ?>
| : | |||
| : | |||
| : | version ); ?> | ||
| : | |||
| : | |||
| : | |||
| : | |||
| : | ' . sprintf( __( '%s - We recommend setting memory to at least 64MB. See: Increasing memory allocated to PHP', 'sportspress' ), size_format( $memory ), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP' ) . ''; } else { echo '' . size_format( $memory ) . ''; } ?> | ||
| : | ' . __( 'Yes', 'sportspress' ) . ''; else echo '' . __( 'No', 'sportspress' ) . ''; ?> | ||
| : | |||
| : | |||
| : | |||
| : | |||
| : | |||
| : | |||
| : | ' . sprintf( __( 'Default timezone is %s - it should be UTC', 'sportspress' ), $default_timezone ) . ''; } else { echo '' . sprintf( __( 'Default timezone is %s', 'sportspress' ), $default_timezone ) . ''; } ?> | ||
| : | |||
| : | ' . $plugin_name . '';
}
if ( strstr( $dirname, 'sportspress' ) ) {
if ( false === ( $version_data = get_transient( md5( $plugin ) . '_version_data' ) ) ) {
$changelog = wp_remote_get( 'http://dzv365zjfbd8v.cloudfront.net/changelogs/' . $dirname . '/changelog.txt' );
$cl_lines = explode( "\n", wp_remote_retrieve_body( $changelog ) );
if ( ! empty( $cl_lines ) ) {
foreach ( $cl_lines as $line_num => $cl_line ) {
if ( preg_match( '/^[0-9]/', $cl_line ) ) {
$date = str_replace( '.' , '-' , trim( substr( $cl_line , 0 , strpos( $cl_line , '-' ) ) ) );
$version = preg_replace( '~[^0-9,.]~' , '' ,stristr( $cl_line , "version" ) );
$update = trim( str_replace( "*" , "" , $cl_lines[ $line_num + 1 ] ) );
$version_data = array( 'date' => $date , 'version' => $version , 'update' => $update , 'changelog' => $changelog );
set_transient( md5( $plugin ) . '_version_data', $version_data, 60*60*12 );
break;
}
}
}
}
if ( ! empty( $version_data['version'] ) && version_compare( $version_data['version'], $plugin_data['Version'], '>' ) )
$version_string = ' – ' . $version_data['version'] . ' ' . __( 'is available', 'sportspress' ) . '';
}
$sp_plugins[] = $plugin_name . ' ' . __( 'by', 'sportspress' ) . ' ' . $plugin_data['Author'] . ' ' . __( 'version', 'sportspress' ) . ' ' . $plugin_data['Version'] . $version_string;
}
}
if ( sizeof( $sp_plugins ) == 0 )
echo '-';
else
echo implode( ', ', $sp_plugins ); ?> |
||
| : | |||
| : | 'sp_outcome', 'orderby' => 'menu_order', 'order' => 'ASC', 'posts_per_page' => -1, 'post_status' => 'any' ) ); foreach ( $posts as $post ) $display_posts[] = $post->post_title . ' (' . $post->post_name . ') [' . $post->menu_order . ']'; echo implode( ', ', array_map( 'esc_html', $display_posts ) ); ?> | ||
| : | 'sp_result', 'orderby' => 'menu_order', 'order' => 'ASC', 'posts_per_page' => -1, 'post_status' => 'any' ) ); foreach ( $posts as $post ) $display_posts[] = $post->post_title . ' (' . $post->post_name . ') [' . $post->menu_order . ']'; echo implode( ', ', array_map( 'esc_html', $display_posts ) ); ?> | ||
| : | 'sp_performance', 'orderby' => 'menu_order', 'order' => 'ASC', 'posts_per_page' => -1, 'post_status' => 'any' ) ); foreach ( $posts as $post ) $display_posts[] = $post->post_title . ' (' . $post->post_name . ') [' . $post->menu_order . ']'; echo implode( ', ', array_map( 'esc_html', $display_posts ) ); ?> | ||
| : | 'sp_column', 'orderby' => 'menu_order', 'order' => 'ASC', 'posts_per_page' => -1, 'post_status' => 'any' ) ); foreach ( $posts as $post ) { $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 ) ); ?> | ||
| : | 'sp_metric', 'orderby' => 'menu_order', 'order' => 'ASC', 'posts_per_page' => -1, 'post_status' => 'any' ) ); foreach ( $posts as $post ) $display_posts[] = $post->post_title . ' (' . $post->post_name . ') [' . $post->menu_order . ']'; echo implode( ', ', array_map( 'esc_html', $display_posts ) ); ?> | ||
| : | 'sp_statistic', 'orderby' => 'menu_order', 'order' => 'ASC', 'posts_per_page' => -1, 'post_status' => 'any' ) ); foreach ( $posts as $post ) $display_posts[] = $post->post_title . ' (' . $post->post_name . ' = ' . get_post_meta( $post->ID, 'sp_equation', true ) . ') [' . $post->menu_order . ']'; echo implode( ', ', array_map( 'esc_html', $display_posts ) ); ?> | ||
| : | 0 ) ); foreach ( $terms as $term ) $display_terms[] = $term->name . ' (' . $term->slug . ')'; echo implode( ', ', array_map( 'esc_html', $display_terms ) ); ?> | ||
| : | 0 ) ); foreach ( $terms as $term ) $display_terms[] = $term->name . ' (' . $term->slug . ')'; echo implode( ', ', array_map( 'esc_html', $display_terms ) ); ?> | ||
| : | 0 ) ); foreach ( $terms as $term ) $display_terms[] = $term->name . ' (' . $term->slug . ')'; echo implode( ', ', array_map( 'esc_html', $display_terms ) ); ?> | ||
| : | 0 ) ); foreach ( $terms as $term ) $display_terms[] = $term->name . ' (' . $term->slug . ')'; echo implode( ', ', array_map( 'esc_html', $display_terms ) ); ?> | ||
| labels->name; ?>: | publish; ?> publish, future; ?> future, draft; ?> draft, private; ?> private, trash; ?> trash, {'auto-draft'}; ?> auto-draft, inherit; ?> inherit | ||
| : | Name; ?> | ||
| : | Version; if ( ! empty( $theme_version_data['version'] ) && version_compare( $theme_version_data['version'], $active_theme->Version, '!=' ) ) echo ' – ' . $theme_version_data['version'] . ' ' . __( 'is available', 'sportspress' ) . ''; ?> | ||
| : | {'Author URI'}; ?> | ||
| (): | ', $found_plugin_files ); ?> | : | |