93
Validation results

CosmosWP

CosmosWP

WordPress 4.6+ theme
93
  • THEME TYPEWordPress theme 4.6+
  • FILE NAMEcosmoswp.zip
  • FILE SIZE856584 bytes
  • MD586e33ea05b60ef4fe59610cf5d169d1b
  • SHA1e1ab4ab0cf1e47a0ee6f24f25224a751225946a4
  • LICENSEGNU GPL 2
  • FILES INCLUDEDCSS, PHP, XML, Bitmap images, Adobe Illustrator
  • VERSION1.1.7
  • TAGSblog, e-commerce, portfolio, grid-layout, one-column, two-columns, three-columns, four-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-images, flexible-header, footer-w
  • CREATION DATE2020-07-21
  • LAST FILE UPDATE2020-07-21
  • LAST VALIDATION2020-07-21 07:14
  • OTHER VERSIONS

    1.1.9 : 94%

    1.1.8 : 93%

    1.1.6 : 96%

    1.1.5 : 96%

    1.1.2 : 96%

    1.1.1 : 96%

    1.1.0 : 96%

    1.0.9 : 96%

    1.0.8 : 96%

    1.0.7 : 96%

    1.0.6 : 96%

    1.0.5 : 96%

This theme seems to be proprietary. Themecheck doesn't distribute commercial themes.
Warning
  1. theme tags : Presence of bad theme tagsFound wrong tag custom-logo in style.css header.Found wrong tag block-styles in style.css header.Found wrong tag wide-blocks in style.css header.
  2. Line endings consistency : Both DOS and UNIX style line endingsFound a mix of \r\n and \n line endings in file cosmoswp.js.Found a mix of \r\n and \n line endings in file custom-controls.js.
  3. Hidden admin bar : Hidden admin Bar in CSSThemes should not hide admin bar. Detected in file style.min-rtl.css.
  4. Comment pagination : Declaration of comment paginationThe theme doesn't have comment pagination code in it. Use paginate_comments_links() to add comment pagination, or older previous_comments_link() and next_comments_link() functions.
  5. Custom elements : Presence of custom headerNo reference to custom header was found in the theme.
  6. Custom elements : Presence of custom backgroundNo reference to custom background was found in the theme.
  7. Date and time implementation : Use of date_i18n()At least one hard coded date was found in the file footer_copyright.php. Function get_option( 'date_format' ) should be used instead.
Tip-off
  1. Optional files : Presence of rtl stylesheet rtl.cssThis theme does not contain optional file rtl.php.
  2. Optional files : Presence of front page template file front-page.phpThis theme does not contain optional file front-page.php.
  3. Optional files : Presence of home template file home.phpThis theme does not contain optional file home.php.
  4. Optional files : Presence of category template file category.phpThis theme does not contain optional file category.php.
  5. Optional files : Presence of tag template file tag.phpThis theme does not contain optional file tag.php.
  6. Optional files : Presence of term template file taxonomy.phpThis theme does not contain optional file taxonomy.php.
  7. Optional files : Presence of author template file author.phpThis theme does not contain optional file author.php.
  8. Optional files : Presence of date/time template file date.phpThis theme does not contain optional file date.php.
  9. Optional files : Presence of archive template file archive.phpThis theme does not contain optional file archive.php.
  10. Optional files : Presence of search results template file search.phpThis theme does not contain optional file search.php.
  11. Optional files : Presence of attachment template file attachment.phpThis theme does not contain optional file attachment.php.
  12. Optional files : Presence of image template file image.phpThis theme does not contain optional file image.php.
  13. Use of includes : Use of include or requireThe theme appears to use include or require : notice.php 244: require_once( ABSPATH . 'wp-admin/includes/file.php' ); If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead. Otherwise, use include_once or require_once instead.The theme appears to use include or require : dynamic-css.php 1: <?php if ( ! defined( 'ABSPATH' ) ) { exit; } if ( ! class_exists( 'CosmosWP_Dynamic_CSS' ) ) : /** * Create Dynamic CSS * @package CosmosWP * @subpackage CosmosWP * @since 1.0.0 * */ class CosmosWP_Dynamic_CSS { /** * Main Instance * * Insures that only one instance of CosmosWP_Dynamic_CSS exists in memory at any one * time. Also prevents needing to define globals all over the place. * * @since 1.0.0 * @access public * * @return object */ public static function instance() { // Store the instance locally to avoid private static replication static $instance = null; // Only run these methods if they haven't been ran previously if ( null === $instance ) { $instance = new CosmosWP_Dynamic_CSS; } // Always return the instance return $instance; } /** * Run functionality with hooks * * @since 1.0.0 * @access public * * @return void */ public function run() { add_filter( 'wp_head', array( $this, 'dynamic_css' ) ); /*Dynamic CSS file*/ // add_action('admin_bar_init', array($this, 'save_dynamic_css'), 9999); add_action( 'advanced_import_before_complete_screen', array( $this, 'save_dynamic_css' ), 9999 ); add_action( 'customize_save_after', array( $this, 'save_dynamic_css' ), 9999 ); add_action( 'wp_enqueue_scripts', array( $this, 'dynamic_css_enqueue' ), 9999 ); } /** * Minify CSS * * @since 1.0.0 * @access public * * @param string $css * @return mixed */ public function minify_css( $css = '' ) { // Return if no CSS if ( ! $css ) { return ''; } // remove comments $css = preg_replace( '!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $css ); // Normalize whitespace $css = preg_replace( '/\s+/', ' ', $css ); // Remove ; before } $css = preg_replace( '/;(?=\s*})/', '', $css ); // Remove space after , : ; { } */ > $css = preg_replace( '/(,|:|;|\{|}|\*\/|>) /', '$1', $css ); // Remove space before , ; { } $css = preg_replace( '/ (,|;|\{|})/', '$1', $css ); // Strips leading 0 on decimal values (converts 0.5px into .5px) $css = preg_replace( '/(:| )0\.([0-9]+)(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}.${2}${3}', $css ); // Strips units if value is 0 (converts 0px to 0) $css = preg_replace( '/(:| )(\.?)0(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}0', $css ); // Trim $css = trim( $css ); // Return minified CSS return $css; } /** * Get dynamic CSS * * @since 1.0.0 * @access public * * @param array $dynamic_css * $dynamic_css = array( * 'all'=>'css', * '768'=>'css', * ); * @return mixed */ public function get_dynamic_css( $dynamic_css = array(), $is_fresh = false ) { $previous_version = false; if ( ! $is_fresh ) { $cwp_dynamic_css = get_theme_mod( 'cwp_dynamic_css' ); if ( ! empty( $cwp_dynamic_css ) ) { return $cwp_dynamic_css; } $previous_version = true; } $getCSS = ''; $dynamic_css = apply_filters( 'cosmoswp_dynamic_css', $dynamic_css ); if ( is_array( $dynamic_css ) ) { foreach ( $dynamic_css as $screen => $css ) { if ( $screen == 'all' ) { if ( is_array( $css ) ) { $getCSS .= implode( ' ', $css ); } else { $getCSS .= $css; } } elseif ( $screen == 'tablet' ) { $getCSS .= '@media (min-width: 720px) {'; if ( is_array( $css ) ) { $getCSS .= implode( ' ', $css ); } else { $getCSS .= $css; } $getCSS .= '}'; } elseif ( $screen == 'desktop' ) { $getCSS .= '@media (min-width: 992px) {'; if ( is_array( $css ) ) { $getCSS .= implode( ' ', $css ); } else { $getCSS .= $css; } $getCSS .= '}'; } } } $output = cosmoswp_dynamic_css()->minify_css( $getCSS ); /*previous version fixed*/ if ( $previous_version ) { set_theme_mod( 'cwp_dynamic_css', $output ); } return $output; } /** * Callback function for wp_head * * @since 1.0.0 * @access public * * @return void */ public static function dynamic_css() { global $wp_customize; if ( isset( $wp_customize ) ) { $output = cosmoswp_dynamic_css()->get_dynamic_css( array(), true ); // Render CSS in the head if ( ! empty( $output ) ) { echo '<!-- CosmosWP Dynamic CSS -->\n<style type=\'text/css\' id='cosmoswp-head-dynamic-css'>\n' . wp_strip_all_tags( $output ) . '\n</style>'; } } else { if ( 'file' == cosmoswp_get_theme_options( 'dynamic-css-options' ) ) { $upload_dir = wp_upload_dir(); if ( ! file_exists( $upload_dir['basedir'] . '/cosmoswp/dynamic-style.css' ) ) { $output = cosmoswp_dynamic_css()->get_dynamic_css(); // Render CSS in the head if ( ! empty( $output ) ) { echo '<!-- CosmosWP Dynamic CSS -->\n<style type=\'text/css\' id='cosmoswp-head-dynamic-css'>\n' . wp_strip_all_tags( $output ) . '\n</style>'; } } } else { $output = cosmoswp_dynamic_css()->get_dynamic_css(); // Render CSS in the head if ( ! empty( $output ) ) { echo '<!-- CosmosWP Dynamic CSS -->\n<style type=\'text/css\' id='cosmoswp-head-dynamic-css'>\n' . wp_strip_all_tags( $output ) . '\n</style>'; } } } } /** * Callback function for admin_bar_init * * @since 1.0.0 * @access public * * @return void */ public static function save_dynamic_css() { $output = cosmoswp_dynamic_css()->get_dynamic_css( array(), true ); /*Get and Set Dynamic Css for later use Both in options and file */ set_theme_mod( 'cwp_dynamic_css', $output ); // We will probably need to load this file require_once( ABSPATH . 'wp-admin' . DIRECTORY_SEPARATOR . 'includes' . DIR If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead. Otherwise, use include_once or require_once instead.The theme appears to use include or require : woocommerce.php 142: * @return array $classes modified to include 'woocommerce-active' class If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead. Otherwise, use include_once or require_once instead.The theme appears to use include or require : edd.php 90: * @return array $classes modified to include 'edd-active' class123: * @return array $classes modified to include 'edd-active' class If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead. Otherwise, use include_once or require_once instead.
Other checked themes