• Changelog


    2.8.8

    • We are pleased to provide our update to the WP Champion. This release contains contains 2 important fixes and a plugin update.
    • Please visit http://thethemebuilders.com/wp-champion-professional-theme-changelog/ for notes to this changelog.
    • ===============================================
    • WP CHAMPION PROFESSIONAL THEME RECENT CHANGELOG
    • ===============================================
    • Version 2.8.8 - September 19 2018
    • ---------------------------------------------------------
    • 1) Update: Responsive menu pro to version 3.1.16
    • 2) Fixed: Image shortcode align center following width="xxx"
    • 3) Fixed: Image Shortcode size + 2px for border in order to have the image width and height exactly as set.
    • 4) Optimized: Easy image shortcode php code.
    • 5) Removed: Editor style css support.
    • 6) Added: is_dismissable class for theme error messages. Real dismissable functionality for messages will be added in a future build.
    • 7) Corrected: Wrong version number in style.css. Version 2.8.7 had 2.8.6 in the style.css
    • 8) Fixed: Gallery shortcode returns null when post_id is empty. For creating a correct sitemap.xml file
    • 9) Fixed: JS minify remove comment lines starting with double slashes (//).
  • Files

    Different Files
      • framework/admin/admin.php
      • framework/admin/themeplugins/responsive-menu-pro.zip
      • framework/admin/themeplugins/theme-plugins.php
      • framework/admin/update.php
      • framework/functions/common.php
      • framework/info.php
      • framework/shortcodes/gallery.php
      • framework/shortcodes/gmap.php
      • framework/shortcodes/images.php
      • framework/theme.php
      • style.css
  • Detail

    framework/admin/admin.php

    @@ -123,7 +123,7 @@ } $str .= '</ul>'; echo " - <div id='theme-warning' class='error fade'><p><strong>".sprintf(__('%1$s Error Messages','theme_admin'), THEME_NAME)."</strong><br/>".$str."</p></div> + <div id='theme-warning' class='notice notice-error is-dismissible error fade'><p><strong>".sprintf(__('%1$s Error Messages','theme_admin'), THEME_NAME)."</strong><br/>".$str."</p></div> "; }

    framework/admin/themeplugins/theme-plugins.php

    @@ -19,7 +19,7 @@ 'slug' => 'responsive-menu-pro', / The plugin slug (typically the folder name) 'source' => THEME_INSTALLER . '/responsive-menu-pro.zip', / The plugin source 'required' => false, / If false, the plugin is only 'recommended' instead of required - 'version' => '3.1.15', / E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented + 'version' => '3.1.16', / E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented 'force_activation' => false, / If true, plugin is activated upon theme activation and cannot be deactivated until theme switch 'force_deactivation' => false, / If true, plugin is deactivated upon theme switch, useful for theme-specific plugins 'external_url' => '', / If set, overrides default API URL and points to an external URL

    framework/admin/update.php

    @@ -8,7 +8,7 @@ $wp_version = $GLOBALS['wp_version']; $required_wp_version = '4.9.6'; - $theme_version = '2.8.7'; + $theme_version = '2.8.8'; $wp_compat = version_compare( $wp_version, $required_wp_version, '>=' );

    framework/functions/common.php

    @@ -3960,6 +3960,9 @@ function theme_minify_css_js( $css = "", $is_js=false ){ /* remove comments */ $theme_minified = preg_replace('!//*[^*]*/*+([^/][^*]*/*+)*/!', '', $css); + + / remove slashed comments + if ($is_js) $theme_minified = preg_replace("@/s*(?<!:)/.*?$@m",'',$theme_minified); / Remove whitespace $theme_minified = preg_replace('//s*([{}|:;,=])/s+/', '$1', $theme_minified);

    framework/info.php

    @@ -2,6 +2,6 @@ return array( 'theme_name' => 'WP Champion', 'theme_slug' => 'champion', - 'theme_version' => '2.8.7', + 'theme_version' => '2.8.8', 'required_wp_version' => '4.9.6', );

    framework/shortcodes/gallery.php

    @@ -3,6 +3,8 @@ if(!function_exists('theme_shortcode_gallery')){ function theme_shortcode_gallery( $output, $attr ) { $post = get_post(); + $output=''; + if (!$post instanceof WP_Post || empty($post->ID)) return $output; static $cleaner_gallery_instance = 0; $cleaner_gallery_instance++;

    framework/shortcodes/gmap.php

    @@ -134,11 +134,8 @@ }], icon:{ image: "{$icon}", - /shadow: "", iconsize: [32, 37], - /shadowsize: [37, 34], - iconanchor: [9, 34], - /shadowanchor: [6, 34] + iconanchor: [9, 34] }, controls: {$controls}, maptype: '{$maptype}',

    framework/shortcodes/images.php

    @@ -216,12 +216,16 @@ $srcset=theme_get_retina_srcset( $image_src ); if ($fullwidth=='true') { - $widthstyle='100%'; + $widthstyle=$imagewidth='100%'; } else { - $widthstyle= $width; - } - - $image_sizes=' width="'.$widthstyle.'" '.((empty($height))?'':'height="'.$height.'"'); + $imagewidth=$width; + if($frameborder!=='false') { + $width=$width+2; + } + $widthstyle=$width.'px'; + } + + $image_sizes=' width="'.$imagewidth.'" '.((empty($height))?'':'height="'.$height.'"'); $content = '<img alt="'.$alt.'" src="'.$image_src.'"'.$srcset.$data_thumbnail.$image_sizes.' />'; return '<figure id="'.$image_id.'" class="image_styled'.$class.($align?' align'.$align:'').($fitmobile?' image_fit_mobile':'').'" style="width:'.$widthstyle.'"'.$animation['data'].'> <div class="image_frame effect-'.$effect.'">'.$frame_shadow_start.' @@ -277,6 +281,9 @@ } if ($source_type == 'attachment_id') { + if ($alt=='') { + $alt = get_post_meta($source_value, '_wp_attachment_image_alt', true); + } $metadata = wp_get_attachment_metadata($source_value); if(empty($width) || ($fullwidth=='true')) { if(empty($width) && isset($metadata['width'])) { @@ -290,41 +297,40 @@ } } } - } + if($autoheight=='true'||!empty($width) && empty($height)){ + if(isset($metadata['width'])) { + $tmp_width = $metadata['width']; + if(isset($metadata['height'])) { + $height = $metadata['height']; + $height= absint($height * ($width/$tmp_width)); + } else { + if($autoheight=='true') $height=''; + } + } else { + if($autoheight=='true') $height=''; + } + } + } + $size = array($width, $height); + if(empty($width) && empty($height)){ $size = 'full'; } - if($alt == '' && $source_type == 'attachment_id') { - $alt = get_post_meta($source_value, '_wp_attachment_image_alt', true); - $metadata = wp_get_attachment_metadata($source_value); - - if(empty($width) && isset($metadata['width'])) { - $width = $metadata['width']; - } - if(empty($height) && isset($metadata['height'])) { - $height = $metadata['height']; - } - } - if($autoheight=='true'){ - $metadata = wp_get_attachment_metadata($source_value); - if(isset($metadata['width'])) { - $tmp_width = $metadata['width']; - if(isset($metadata['height'])) { - $height = $metadata['height']; - $height= absint($height * ($width/$tmp_width)); - } else $height=''; - } else $height=''; - } $image_src = theme_get_image_src(array('type'=>$source_type,'value'=>$source_value), $size,$quality); - if(!$image_src){ /dont show image if not exists + + /dont show image if not exists + if(!$image_src){ return ''; } $srcset=theme_get_retina_srcset( $image_src ); - + if($alt=='') { $alt = $title; + if (empty($alt) && $source_type == 'attachment_id') { + $alt = get_the_title($source_value); + } } if($class){ $class = ' '.$class;

    framework/theme.php

    @@ -183,7 +183,7 @@ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', ) ); - add_editor_style(); + /add_editor_style(); add_theme_support( 'woocommerce' ); } }

    style.css

    @@ -5,10 +5,10 @@ Author URI: https:/thethemebuilders.com/about Theme URI: https:/thethemebuilders.com License URI: https:/thethemebuilders.com/license -Version: 2.8.6 build August 4, 2018 +Version: 2.8.8 Build september 19, 2018 Text Domain: wp-champion License: WP Champion is available under a restricted singe website use limited commercial license - and cannot be distributed in whole or in part without the expressed written permission of the authors. All css and js are copyright of Lyon Holding Limited o/a thethemebuilders.com and cannot be copied or otherwise reproduced in whole or in part without the expressed written consent of Lyon Holding Limited. Tags: one-column, two-columns, left-sidebar, right-sidebar, fixed-layout, custom-background, custom-colors, custom-header, custom-menu, rtl-language-support, translation-ready, fixed-layout, theme-options WC requires at least: 3.4.0 -WC tested up to: 3.4.4 +WC tested up to: 3.4.5 */