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() { ?>


'; $posting['fsockopen_curl']['success'] = false; } // SOAP $posting['soap_client']['name'] = __( 'SOAP Client','sportspress' ); if ( class_exists( 'SoapClient' ) ) { $posting['soap_client']['note'] = __('Your server has the SOAP Client class enabled.', 'sportspress' ); $posting['soap_client']['success'] = true; } else { $posting['soap_client']['note'] = sprintf( __( 'Your server does not have the SOAP Client class enabled - some gateway plugins which use SOAP may not work as expected.', 'sportspress' ), 'http://php.net/manual/en/class.soapclient.php' ) . ''; $posting['soap_client']['success'] = false; } $posting = apply_filters( 'sportspress_debug_posting', $posting ); foreach( $posting as $post ) { $mark = ( isset( $post['success'] ) && $post['success'] == true ) ? 'yes' : 'error'; ?> {'Author URI'} == 'http://themeboy.com' ) : $theme_dir = substr( strtolower( str_replace( ' ','', $active_theme->Name ) ), 0, 45 ); if ( false === ( $theme_version_data = get_transient( $theme_dir . '_version_data' ) ) ) : $theme_changelog = wp_remote_get( 'http://dzv365zjfbd8v.cloudfront.net/changelogs/' . $theme_dir . '/changelog.txt' ); $cl_lines = explode( "\n", wp_remote_retrieve_body( $theme_changelog ) ); if ( ! empty( $cl_lines ) ) : foreach ( $cl_lines as $line_num => $cl_line ) { if ( preg_match( '/^[0-9]/', $cl_line ) ) : $theme_date = str_replace( '.' , '-' , trim( substr( $cl_line , 0 , strpos( $cl_line , '-' ) ) ) ); $theme_version = preg_replace( '~[^0-9,.]~' , '' ,stristr( $cl_line , "version" ) ); $theme_update = trim( str_replace( "*" , "" , $cl_lines[ $line_num + 1 ] ) ); $theme_version_data = array( 'date' => $theme_date , 'version' => $theme_version , 'update' => $theme_update , 'changelog' => $theme_changelog ); set_transient( $theme_dir . '_version_data', $theme_version_data , 60*60*12 ); break; endif; } endif; endif; endif; ?> plugin_path() . '/includes/admin/class-sp-admin-status.php' ); $template_paths = apply_filters( 'sportspress_template_overrides_scan_paths', array( 'SportsPress' => SP()->plugin_path() . '/templates/' ) ); $found_files = array(); foreach ( $template_paths as $plugin_name => $template_path ) $scanned_files[ $plugin_name ] = $status->scan_template_files( $template_path ); foreach ( $scanned_files as $plugin_name => $files ) { foreach ( $files as $file ) { if ( file_exists( get_stylesheet_directory() . '/' . $file ) ) { $theme_file = get_stylesheet_directory() . '/' . $file; } elseif ( file_exists( get_stylesheet_directory() . '/sportspress/' . $file ) ) { $theme_file = get_stylesheet_directory() . '/sportspress/' . $file; } elseif ( file_exists( get_template_directory() . '/' . $file ) ) { $theme_file = get_template_directory() . '/' . $file; } elseif( file_exists( get_template_directory() . '/sportspress/' . $file ) ) { $theme_file = get_template_directory() . '/sportspress/' . $file; } else { $theme_file = false; } if ( $theme_file ) { $core_version = $status->get_file_version( SP()->plugin_path() . '/templates/' . $file ); $theme_version = $status->get_file_version( $theme_file ); if ( $core_version && ( empty( $theme_version ) || version_compare( $theme_version, $core_version, '<' ) ) ) { $found_files[ $plugin_name ][] = sprintf( __( '%s version %s is out of date. The core version is %s', 'sportspress' ), basename( $theme_file ), $theme_version ? $theme_version : '-', $core_version ); } else { $found_files[ $plugin_name ][] = sprintf( '%s', basename( $theme_file ) ); } } } } if ( $found_files ) { foreach ( $found_files as $plugin_name => $found_plugin_files ) { ?>
:
:
: 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 ); ?> :