• Changelog


    2.8.9

    • We are pleased to provide our update to the WP Champion. This release contains contains 16 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.9 - November 3 2018
    • ---------------------------------------------------------
    • 1) Updated: Woocommerce Single product-image.php and product-thumbnails.php
    • 2) Added: Woocommerce settings to change the tabs layout in single product (normal tabs, mini tabs, vertical tabs, accordion, plain text mode, no content).
    • 3) Added: Hiding/ Showing of content title within the single product tabs/content. Global setting and override of global setting in single product page options.
    • 4) Added: Ability to change the title of the content in the single product tabs/content. Global setting and override of global setting in single product page options.
    • 5) Updated: Theme Front-end Pot Language file due to changes made for woocommerce title support in tabs/content wrappers.
    • 6) Renamed: Corrected wrong spelling of 2 woocommerce actions.
    • 7) Added: New setting to turn on/off titles in page content for Woocommerce category of tags pages.
    • 8) Added: New setting for default sidebar layout for Woocommerce category and tags pages.
    • 9) Changed: Woocommerce template structure. Woocommerce.php is deleted. We now have a woocommerce subfolder with the changed woocommerce template files.
    • 10) Updated: responsive menu pro plugin to version 3.1.17
    • 11) Added: New woocommerce title settings to the wpml string translation settings.
    • 12) Fixed: Menu alignment for none static menu when use of structured data is turned to ON. Class was missing.
    • 13) Fixed: Sync for wordpress reading settings static homepage & static blog page following the theme settings for these. When themes where activated and deactivated and the wp reading settings have been changed in between the swaps the setting where not syncd on activation of our theme. Now on activation of our theme the wp reading settings are set to the settings for theme home page and theme blog page. If they are set to none the wp reading settings follow accordingly.
    • 14) Added: Blog shortcode is now checking if border thickness is numeric.
    • 15) Added: Count shortcode now has 3 new settings, Year plus one. Month plus one and Day plus one. This means that if the count has reached its end it will auto restart according these settings. See the fields helptext for more details.
    • 16) Updated: Due to changes in Gutenberg we had to adjust the Gutenberg turn OFF action hooks.
    • 17) Updated: Admin Pot language file due to the new settings added.
  • Files

    New Files
    Different Files
    Delete Files
      • woocommerce
      • woocommerce/archive-product.php
      • woocommerce/content-product-related.php
      • woocommerce/content-product-upsells.php
      • woocommerce/content-product.php
      • woocommerce/content-product_cat.php
      • woocommerce/product-searchform.php
      • woocommerce/single-product
      • woocommerce/single-product-reviews.php
      • woocommerce/single-product.php
      • woocommerce/single-product/product-image-theme.php
      • woocommerce/single-product/product-image.php
      • woocommerce/single-product/product-thumbnails-theme.php
      • woocommerce/single-product/product-thumbnails.php
      • woocommerce/single-product/related-carousel.php
      • woocommerce/single-product/related.php
      • woocommerce/single-product/tabs
      • woocommerce/single-product/tabs/additional-information.php
      • woocommerce/single-product/tabs/description.php
      • woocommerce/single-product/tabs/tabs.php
      • woocommerce/single-product/title.php
      • woocommerce/single-product/up-sells.php
      • framework/admin/languages/wp-champion_admin.pot
      • framework/admin/metaboxes/page_general.php
      • framework/admin/options/wooshop.php
      • framework/admin/shortcodes/dialogs/countdown.php
      • framework/admin/themeplugins/responsive-menu-pro.zip
      • framework/admin/themeplugins/theme-plugins.php
      • framework/admin/update.php
      • framework/functions/filter.php
      • framework/functions/woocommerce.php
      • framework/functions/wpml-string.php
      • framework/info.php
      • framework/shortcodes/blog.php
      • framework/shortcodes/typography.php
      • framework/theme.php
      • languages/wp-champion.pot
      • sections/menu.php
      • style.css
      • content-product-related.php
      • content-product-upsells.php
      • content-product.php
      • content-product_cat.php
      • product-searchform.php
      • single-product
      • single-product/product-image-theme.php
      • single-product/product-image.php
      • single-product/product-thumbnails-theme.php
      • single-product/product-thumbnails.php
      • single-product/related-carousel.php
      • single-product/related.php
      • single-product/tabs
      • single-product/tabs/tabs.php
      • single-product/title.php
      • single-product/up-sells.php
      • woocommerce.php
  • Detail

    framework/admin/metaboxes/page_general.php

    @@ -1196,6 +1196,90 @@ "two_fifth" => __('Two Fifth','theme_admin'), ), "type" => "select", + ), + array( + "name" => __("Single Product Content Layout",'theme_admin'), + "desc"=>__("By this setting you set the Product Content Layout to Normal Tabs, Vertical Tabs, Mini Tabs, Accordion, Text Mode or No Content (Hide all Tabs). In Text Mode the body content of all content that is normally presented within tabs is shown below as plain text. In Text Mode we advice to turn ON the Show Title in Content setting (see setting further down below). No Content will not show any product body content information (Desription, Additional Information, Reviews etc.",'theme_admin'), + "id" => "_woocommerce_single_product_content_layout", + "default" => '', + "options" => array( + "" => __('Default','theme_admin'), + "tabs" => __('Normal Tabs','theme_admin'), + "vertical_tabs" => __('Vertical Tabs','theme_admin'), + "mini_tabs" => __('Mini Tabs','theme_admin'), + "accordion" => __('Accordion','theme_admin'), + "text_mode" => __('Text Mode','theme_admin'), + "hide_all" => __('No Content','theme_admin'), + ), + "type" => "select", + ), + array( + "name" => __("Single Tabs Text Mode",'theme_admin'), + "id" => "_woocommerce_single_tab_text_mode", + "desc"=>__("Single Tab Text Mode will show no tabs wrapper but only the Tab body content if there is only one Tab to show. The moment there is more then one tab found the Single Tab Text Mode settings is ignored. In Single Tab Text Mode we advice to turn ON the Show Title in Tabs Content setting (see setting further down below). ",'theme_admin'), + "default" => '', + "type" => "tritoggle" + ), + array( + "name" => __("Show Additional information Tab",'theme_admin'), + "id" => "_woocommerce_show_additional_information_tab", + "desc"=>__("By this setting you can hide/show the Additional Information Tab.",'theme_admin'), + "default" => '', + "type" => "tritoggle" + ), + array( + "name" => __("Show Title in Tabs Content",'theme_admin'), + "id" => "_woocommerce_show_title_in_content", + "desc"=>__("If set to OFF, the Title for each item in the product body content is hidden. Note: If Tabs are used the title in the Tab itself will still show. Only the 'duplicate' title for each item in the body content is hidden. We advice to turn this setting to ON if you have set Single Products Tabs Behaviour (previous setting) to Single Text Mode or the Single Product Content Layout to Text Mode.",'theme_admin'), + "default" => '', + "type" => "tritoggle" + ), + array( + "name" => __("Product Description Tab Text",'theme_admin'), + "desc" => __('Enter the text for the product description tab. If left empty the default text in the theme woocommerce settings will be used. If this field is set to "woodefault" the default woocommerce tab title for product description is used.','theme_admin'), + "id" => "_woocommerce_product_description_tab_text", + "default" => '', + "size" => 50, + "type" => "text" + ), + array( + "name" => __("Product Description Title Text",'theme_admin'), + "desc" => __('Enter the default text for the product description title. If left empty the default text in the theme woocommerce settings will be used. If this field is set to "woodefault" the default woocommerce title for product description is used.','theme_admin'), + "id" => "_woocommerce_product_description_title_text", + "default" => '', + "size" => 50, + "type" => "text" + ), + array( + "name" => __("Additional Information Product Tab Text",'theme_admin'), + "desc" => __('Enter the default text for the additional information tab. If left empty the default text in the theme woocommerce settings will be used. If this field is set to "woodefault" the default woocommerce tab title for additional information is used.','theme_admin'), + "id" => "_woocommerce_additional_information_tab_text", + "default" => '', + "size" => 50, + "type" => "text" + ), + array( + "name" => __("Additional Information Product Title Text",'theme_admin'), + "desc" => __('Enter the default text for the additional information title. If left empty the default text in the theme woocommerce settings will be used. If this field is set to "woodefault" the default woocommerce title for additional information is used.','theme_admin'), + "id" => "_woocommerce_additional_information_title_text", + "default" => '', + "size" => 50, + "type" => "text" + ), + array( + "name" => __("Reviews Title Text",'theme_admin'), + "desc" => __('Enter the default text for the Reviews title. If left empty the default text in the theme woocommerce settings will be used. If this field is set to "woodefault" the default woocommerce title for reviews is used.','theme_admin'), + "id" => "_woocommerce_reviews_title_text", + "default" => '', + "size" => 50, + "type" => "text" + ), + array( + "name" => __("Show Count in Reviews Title",'theme_admin'), + "id" => "_woocommerce_reviews_show_count", + "desc"=>__("If set to OFF, the Reviews Title as added in the previous field will be shown without preceding text about the number of reviews. Incase the previous field is empty the Reviews Title as set in the Theme Woocommerce setting will be used.",'theme_admin'), + "default" => '', + "type" => "tritoggle" ), array( "name" => __("WooCommerce Product Page Related Products",'theme_admin'),

    framework/admin/options/wooshop.php

    @@ -261,8 +261,20 @@ "options" => array( array( "name" => __("WooCommerce Shop Pages Layout",'theme_admin'), - "desc"=>__("Use this setting to determine whether your standard Woocommerce "Shop" type pages (Shop, Cart, Checkout, etc) in the site will have a full width, left sidebar or right sidebar layout.",'theme_admin'), + "desc"=>__("Use this setting to determine whether your standard Woocommerce "Shop" type pages in the site will have a full width, left sidebar or right sidebar layout.",'theme_admin'), "id" => "woocommerce_layout", + "default" => 'right', + "options" => array( + "full" => __('Full Width','theme_admin'), + "right" => __('Right Sidebar','theme_admin'), + "left" => __('Left Sidebar','theme_admin'), + ), + "type" => "select", + ), + array( + "name" => __("WooCommerce Category & Tag Pages Layout",'theme_admin'), + "desc"=>__("Use this setting to determine whether your standard Woocommerce "Category & Tags" pages in the site will have a full width, left sidebar or right sidebar layout.",'theme_admin'), + "id" => "woocommerce_cat_tag_layout", "default" => 'right', "options" => array( "full" => __('Full Width','theme_admin'), @@ -360,6 +372,89 @@ "id" => "woocommerce_show_description_single_related_upsell", "desc"=>__("Enable this setting and the Related & Upsell products will show the short description (if set) for the listed products in the single product page.",'theme_admin'), "default" => false, + "type" => "toggle" + ), + array( + "name" => __("Single Product Content Layout",'theme_admin'), + "desc"=>__("By this setting you set the Product Content Layout to Normal Tabs, Vertical Tabs, Mini Tabs, Accordion, Text Mode or No Content (Hide all Tabs). In Text Mode the body content of all content that is normally presented within tabs is shown below as plain text. In Text Mode we advice to turn ON the Show Title in Content setting (see setting further down below). No Content will not show any product body content information (Desription, Additional Information, Reviews etc.",'theme_admin'), + "id" => "woocommerce_single_product_content_layout", + "default" => 'tabs', + "options" => array( + "tabs" => __('Normal Tabs','theme_admin'), + "vertical_tabs" => __('Vertical Tabs','theme_admin'), + "mini_tabs" => __('Mini Tabs','theme_admin'), + "accordion" => __('Accordion','theme_admin'), + "text_mode" => __('Text Mode','theme_admin'), + "hide_all" => __('No Content','theme_admin'), + ), + "type" => "select", + ), + array( + "name" => __("Single Tabs Text Mode",'theme_admin'), + "id" => "woocommerce_single_tab_text_mode", + "desc"=>__("Single Tab Text Mode will show no tabs wrapper but only the Tab body content if there is only one Tab to show. The moment there is more then one tab found the Single Tab Text Mode settings is ignored. In Single Tab Text Mode we advice to turn ON the Show Title in Tabs Content setting (see setting further down below). ",'theme_admin'), + "default" => false, + "type" => "toggle" + ), + array( + "name" => __("Show Additional information Tab",'theme_admin'), + "id" => "woocommerce_show_additional_information_tab", + "desc"=>__("By this setting you can hide/show the Additional Information Tab.",'theme_admin'), + "default" => true, + "type" => "toggle" + ), + array( + "name" => __("Show Title in Content",'theme_admin'), + "id" => "woocommerce_show_title_in_content", + "desc"=>__("If set to OFF, the Title for each item in the product body content is hidden. Note: If Tabs are used the title in the Tab itself will still show. Only the 'duplicate' title for each item in the body content is hidden. We advice to turn this setting to ON if you have set Single Products Tabs Behaviour (previous setting) to Single Text Mode or the Single Product Content Layout to Text Mode.",'theme_admin'), + "default" => true, + "type" => "toggle" + ), + array( + "name" => __("Product Description Tab Text",'theme_admin'), + "desc" => __('Enter the default text for the product description tab. If left empty the default Woocommerce text will be used.','theme_admin'), + "id" => "woocommerce_product_description_tab_text", + "default" => '', + "size" => 50, + "type" => "text" + ), + array( + "name" => __("Product Description Title Text",'theme_admin'), + "desc" => __('Enter the default text for the product description title. If left empty the default Woocommerce text will be used.','theme_admin'), + "id" => "woocommerce_product_description_title_text", + "default" => '', + "size" => 50, + "type" => "text" + ), + array( + "name" => __("Additional Information Product Tab Text",'theme_admin'), + "desc" => __('Enter the default text for the additional information tab. If left empty the default Woocommerce text will be used.','theme_admin'), + "id" => "woocommerce_additional_information_tab_text", + "default" => '', + "size" => 50, + "type" => "text" + ), + array( + "name" => __("Additional Information Product Title Text",'theme_admin'), + "desc" => __('Enter the default text for the additional information title. If left empty the default Woocommerce text will be used.','theme_admin'), + "id" => "woocommerce_additional_information_title_text", + "default" => '', + "size" => 50, + "type" => "text" + ), + array( + "name" => __("Reviews Title Text",'theme_admin'), + "desc" => __('Enter the default text for the Reviews title. If left empty the default Woocommerce text will be used.','theme_admin'), + "id" => "woocommerce_reviews_title_text", + "default" => '', + "size" => 50, + "type" => "text" + ), + array( + "name" => __("Show Count in Reviews Title",'theme_admin'), + "id" => "woocommerce_reviews_show_count", + "desc"=>__("If set to OFF, the Reviews Title as added in the previous field will be shown without preceding text about the number of reviews.",'theme_admin'), + "default" => true, "type" => "toggle" ), ), @@ -558,6 +653,13 @@ "desc" => __("Set Global settings for Woocommerce Category & Tag Pages.", 'theme_admin'), "options" => array( array( + "name" => __("Show Category or Tag Title in Page Content",'theme_admin'), + "id" => "woocommerce_cat_tag_title", + "desc"=>__("Enable this setting to show the Category or Tag title above the products in Category or Tags listing pages.",'theme_admin'), + "default" => false, + "type" => "toggle" + ), + array( "name" => __("Number of Products per Row in Category & Tag Pages",'theme_admin'), "desc"=>__("Use this setting to set the amount of products listed on a row in the Category or Tag page.",'theme_admin'), "id" => "woocommerce_category_products_per_row",

    framework/admin/shortcodes/dialogs/countdown.php

    @@ -222,8 +222,28 @@ "desc" => __("If the option is on, the timer will start blinking when the timer reaches the time set. Default = Blink.",'theme_admin'), "default" => true, "type" => "toggle" - ), - + ), + array( + "name" => __("Year + 1 if timer has expired",'theme_admin'), + "id" => "yearPlusOne", + "desc" => __("If the timer has reached its end then recalculate the year (current year + 1) and start the timer with one year in the future. This only applies on page load.",'theme_admin'), + "default" => false, + "type" => "toggle" + ), + array( + "name" => __("Month + 1 if timer has expired",'theme_admin'), + "id" => " monthPlusOne", + "desc" => __("If the timer has reached its end then recalculate the month (current month + 1) and start the timer with one month in the future. This only applies on page load. Note: Do not use when a timer year has been set. Use Year + 1. This setting is ignored when yearPlusOne has been set to 'ON'.",'theme_admin'), + "default" => false, + "type" => "toggle" + ), + array( + "name" => __("Day + 1 if timer has expired",'theme_admin'), + "id" => "dayPlusOne", + "desc" => __("If the timer has reached its end then recalculate the date (current date + 1) and start the timer with one day in the future. This only applies on page load. Note: Do not use when a timer month or year has been set. Use Year +1 or Month + 1. This setting is ignored when monthPlusOne or yearPlusOne has been set to 'ON'.",'theme_admin'), + "default" => false, + "type" => "toggle" + ), array( "name" => __("Set character to display at End Time",'theme_admin'), "desc" => __("Choose the character to display at timer ending. '--'= Default.",'theme_admin'),

    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.16', / E.g. 1.0.0. If set, the active plugin must be this version or higher, otherwise a notice is presented + 'version' => '3.1.17', / 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.8'; + $theme_version = '2.8.9'; $wp_compat = version_compare( $wp_version, $required_wp_version, '>=' );

    framework/functions/filter.php

    @@ -1104,12 +1104,40 @@ } if (!function_exists('theme_disable_gutenberg')) { + + function theme_disable_gutenberg() { - if ( has_filter( 'replace_editor', 'gutenberg_init' ) || has_action( 'load-post.php', 'gutenberg_intercept_edit_post' ) ) { + + $gutenberg = false; + $block_editor = false; + $replace = true; + + if ( has_filter( 'replace_editor', 'gutenberg_init' ) ) { + / Gutenberg is installed and activated. + $gutenberg = true; + } + + if ( version_compare( $GLOBALS['wp_version'], '5.0-beta', '>' ) ) { + / Block editor. + $block_editor = true; + } + + if ( ! $gutenberg && ! $block_editor ) { + return; / Nothing to do :) + } + + if ( $block_editor && ( $replace || isset( $_GET['classic-editor'] ) ) ) { + / TODO: consider disabling other block editor functionality. + add_filter( 'use_block_editor_for_post_type', '__return_false', 100 ); + } + + if ( $gutenberg && ( $replace || isset( $_GET['classic-editor'] ) ) ) { remove_action( 'admin_menu', 'gutenberg_menu' ); + remove_action( 'admin_notices', 'gutenberg_build_files_notice' ); remove_action( 'admin_notices', 'gutenberg_wordpress_version_notice' ); remove_action( 'admin_init', 'gutenberg_redirect_demo' ); + remove_filter( 'replace_editor', 'gutenberg_init' ); / lib/client-assets.php @@ -1121,25 +1149,13 @@ / lib/compat.php remove_filter( 'wp_refresh_nonces', 'gutenberg_add_rest_nonce_to_heartbeat_response_headers' ); - / lib/register.php - remove_action( 'plugins_loaded', 'gutenberg_trick_plugins_into_registering_meta_boxes' ); - remove_action( 'edit_form_top', 'gutenberg_remember_classic_editor_when_saving_posts' ); - - remove_filter( 'redirect_post_location', 'gutenberg_redirect_to_classic_editor_when_saving_posts' ); - remove_filter( 'get_edit_post_link', 'gutenberg_revisions_link_to_editor' ); - remove_filter( 'wp_prepare_revision_for_js', 'gutenberg_revisions_restore' ); - / lib/rest-api.php remove_action( 'rest_api_init', 'gutenberg_register_rest_routes' ); remove_action( 'rest_api_init', 'gutenberg_add_taxonomy_visibility_field' ); remove_filter( 'rest_request_after_callbacks', 'gutenberg_filter_oembed_result' ); remove_filter( 'registered_post_type', 'gutenberg_register_post_prepare_functions' ); - remove_filter( 'registered_taxonomy', 'gutenberg_register_taxonomy_prepare_functions' ); - remove_filter( 'rest_index', 'gutenberg_ensure_wp_json_has_theme_supports' ); - remove_filter( 'rest_request_before_callbacks', 'gutenberg_handle_early_callback_checks' ); - remove_filter( 'rest_user_collection_params', 'gutenberg_filter_user_collection_parameters' ); - remove_filter( 'rest_request_after_callbacks', 'gutenberg_filter_request_after_callbacks' ); + remove_filter( 'register_post_type_args', 'gutenberg_filter_post_type_labels' ); / lib/meta-box-partial-page.php remove_action( 'do_meta_boxes', 'gutenberg_meta_box_save', 1000 ); @@ -1152,17 +1168,25 @@ remove_filter( 'filter_gutenberg_meta_boxes', 'gutenberg_filter_meta_boxes' ); / gutenberg.php + remove_action( 'admin_init', 'gutenberg_add_edit_link_filters' ); + remove_action( 'admin_print_scripts-edit.php', 'gutenberg_replace_default_add_new_button' ); + + remove_filter( 'body_class', 'gutenberg_add_responsive_body_class' ); remove_filter( 'admin_url', 'gutenberg_modify_add_new_button_url' ); - remove_action( 'admin_print_scripts-edit.php', 'gutenberg_replace_default_add_new_button' ); + + / lib/compat.php + remove_action( 'admin_enqueue_scripts', 'gutenberg_check_if_classic_needs_warning_about_blocks' ); / lib/register.php + remove_action( 'edit_form_top', 'gutenberg_remember_classic_editor_when_saving_posts' ); + + remove_filter( 'redirect_post_location', 'gutenberg_redirect_to_classic_editor_when_saving_posts' ); + remove_filter( 'get_edit_post_link', 'gutenberg_revisions_link_to_editor' ); + remove_filter( 'wp_prepare_revision_for_js', 'gutenberg_revisions_restore' ); remove_filter( 'display_post_states', 'gutenberg_add_gutenberg_post_state' ); / lib/plugin-compat.php remove_filter( 'rest_pre_insert_post', 'gutenberg_remove_wpcom_markdown_support' ); - - / Gutenberg plugin: remove the "Classic editor" row actions. - remove_action( 'admin_init', 'gutenberg_add_edit_link_filters' ); } } }

    framework/functions/woocommerce.php

    @@ -12,6 +12,7 @@ 'shop_single' => array('width'=>$woo_settings['woocommerce_single_image_width'], 'height'=>$woo_settings['woocommerce_single_image_height'] , 'crop' =>$woo_settings['woocommerce_single_image_crop']), ), 'show_shop_title'=> $woo_settings['woocommerce_shop_title'], + 'show_cat_tag_title'=> $woo_settings['woocommerce_cat_tag_title'], 'use_theme_badge_filter'=> $woo_settings['woocommerce_on_sale_filter'], 'single_product_layout'=> $woo_settings['woocommerce_spi_layout'], 'overlay_icon'=> $woo_settings['woocommerce_global_hover_icon'], @@ -212,6 +213,15 @@ } echo '</div>'; } + +/remove woo wrapper +remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 ); +remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 ); +/remove breadcrumb +remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 ); +/ Sidebar. + remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 ); + remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10 ); add_action( 'woocommerce_before_shop_loop_item_title', 'theme_woocommerce_thumbnail', 10); @@ -344,9 +354,9 @@ echo "</div>"; } -add_action( 'woocommerce_before_single_product_summary', 'theme_woocommcere_add_image_wrap_div', 2); +add_action( 'woocommerce_before_single_product_summary', 'theme_woocommerce_add_image_wrap_div', 2); add_action( 'woocommerce_before_single_product_summary', 'theme_woocommerce_div_close', 20); -function theme_woocommcere_add_image_wrap_div() { +function theme_woocommerce_add_image_wrap_div() { global $product; $product_id = $product->get_id(); $product_layout_class = theme_get_inherit_preset_option($product_id,'_woocommerce_single_product_layout','woocommerce', 'woocommerce_single_product_layout'); @@ -358,9 +368,42 @@ echo '<div class="clearboth"></div>'; } -add_action( 'woocommerce_before_single_product_summary', 'theme_woocommcere_add_summary_wrap_div', 25); +add_action( 'woocommerce_before_single_product', 'theme_set_single_product_settings', 11 ); +function theme_set_single_product_settings() { + if (is_product()) { + global $woo_config,$product; + $product_id = $product->get_id(); + $woo_config['content_layout'] = theme_get_inherit_preset_option($product_id,'_woocommerce_single_product_content_layout','woocommerce', 'woocommerce_single_product_content_layout'); + $woo_config['single_text_mode'] = theme_get_inherit_preset_option($product_id,'_woocommerce_single_tab_text_mode','woocommerce', 'woocommerce_single_tab_text_mode'); + $woo_config['show_additional_information'] = theme_get_inherit_preset_option($product_id,'_woocommerce_show_additional_information_tab','woocommerce', 'woocommerce_show_additional_information_tab'); + $woo_config['title_mode'] = theme_get_inherit_preset_option($product_id,'_woocommerce_show_title_in_content','woocommerce', 'woocommerce_show_title_in_content'); + + $woo_config['information_tab_text'] = wpml_t(THEME_NAME, 'Additional Information Product Tab Text',theme_get_inherit_preset_option($product_id,'_woocommerce_additional_information_tab_text','woocommerce', 'woocommerce_additional_information_tab_text')); + + if (empty($woo_config['information_tab_text']) || str_replace(' ', '', strtolower($woo_config['information_tab_text']))=='woodefault') $woo_config['information_tab_text']=esc_html( apply_filters( 'woocommerce_product_additional_information_heading', __( 'Additional information', 'woocommerce' ) ) ); + + $woo_config['information_title_text'] = wpml_t(THEME_NAME, 'Additional Information Product Title Text',theme_get_inherit_preset_option($product_id,'_woocommerce_additional_information_title_text','woocommerce', 'woocommerce_additional_information_title_text')); + + if (empty($woo_config['information_title_text']) || str_replace(' ', '', strtolower($woo_config['information_title_text']))=='woodefault' ) $woo_config['information_title_text']=esc_html( apply_filters( 'woocommerce_product_additional_information_heading', __( 'Additional information', 'woocommerce' ) ) ); + + $woo_config['description_tab_text'] = wpml_t(THEME_NAME, 'Product Description Tab Text',theme_get_inherit_preset_option($product_id,'_woocommerce_product_description_tab_text','woocommerce', 'woocommerce_product_description_tab_text')); + + if (empty($woo_config['description_tab_text']) || str_replace(' ', '', strtolower($woo_config['description_tab_text']))=='woodefault' ) $woo_config['description_tab_text']= esc_html( apply_filters( 'woocommerce_product_description_heading', __( 'Description', 'woocommerce' ) ) ); + + $woo_config['description_title_text'] = wpml_t(THEME_NAME, 'Product Description Title Text',theme_get_inherit_preset_option($product_id,'_woocommerce_product_description_title_text','woocommerce', 'woocommerce_product_description_title_text')); + + if (empty($woo_config['description_title_text']) || str_replace(' ', '', strtolower($woo_config['description_title_text']))=='woodefault') $woo_config['description_title_text']= esc_html( apply_filters( 'woocommerce_product_description_heading', __( 'Description', 'woocommerce' ) ) + ); + + $woo_config['reviews_title_text'] = wpml_t(THEME_NAME, 'Product Reviews Title Text',theme_get_inherit_preset_option($product_id,'_woocommerce_reviews_title_text','woocommerce', 'woocommerce_reviews_title_text')); + + $woo_config['reviews_count']=theme_get_inherit_preset_option($product_id,'_woocommerce_reviews_show_count','woocommerce', 'woocommerce_reviews_show_count'); + } +} + +add_action( 'woocommerce_before_single_product_summary', 'theme_woocommerce_add_summary_wrap_div', 25); add_action( 'woocommerce_after_single_product_summary', 'theme_woocommerce_div_close_with_clear', 3); -function theme_woocommcere_add_summary_wrap_div(){ +function theme_woocommerce_add_summary_wrap_div(){ global $product; $product_id = $product->get_id(); $product_layout_class = theme_get_inherit_preset_option($product_id,'_woocommerce_single_product_layout','woocommerce', 'woocommerce_single_product_layout'); @@ -491,9 +534,15 @@ add_filter( 'woocommerce_available_variation', 'theme_filter_woocommerce_available_variation', 10, 3 ); } -if (!$woo_config['show_shop_title']) add_filter( 'woocommerce_show_page_title' , 'woo_hide_page_title' ); +add_filter( 'woocommerce_show_page_title' , 'woo_hide_page_title' ); function woo_hide_page_title() { - return false; + global $woo_config; + if (is_shop()) { + return $woo_config['show_shop_title']; + } else + if (is_product_category() || is_product_tag()) { + return $woo_config['show_cat_tag_title']; + } else return false; } if ($woo_config['use_theme_badge_filter']) {

    framework/functions/wpml-string.php

    @@ -53,6 +53,12 @@ wpml_register_string( THEME_NAME , 'Portfolio Permalink Slug', theme_get_option('portfolio','permalink_slug')); +wpml_register_string( THEME_NAME , 'Product Description Tab Text', theme_get_option('woocommerce','woocommerce_product_description_tab_text')); +wpml_register_string( THEME_NAME , 'Product Description Ttile Text', theme_get_option('woocommerce','woocommerce_product_description_title_text')); +wpml_register_string( THEME_NAME , 'Additional Information Product Tab Text', theme_get_option('woocommerce','woocommerce_additional_information_tab_text')); +wpml_register_string( THEME_NAME , 'Additional Information Product Title Text', theme_get_option('woocommerce','woocommerce_additional_information_title_text')); +wpml_register_string( THEME_NAME , 'Product Reviews Title Text', theme_get_option('woocommerce','woocommerce_reviews_title_text')); + $archives = get_post_types(array( 'public' => true, '_builtin' => false,

    framework/info.php

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

    framework/shortcodes/blog.php

    @@ -826,6 +826,7 @@ } if($frame && $frame_borderthickness!='1'){ $frame_styles[]='border-width:'.$frame_borderthickness.'px'; + $frame_borderthickness=intval($frame_borderthickness); $frame = 30 + 2*$frame_borderthickness; } if(!empty($frame_styles)){ @@ -833,7 +834,6 @@ } else{ $style = ''; } - if($divider_color){ $divider_style = ' style="border-color:'.$divider_color.'"';

    framework/shortcodes/typography.php

    @@ -1232,6 +1232,9 @@ 'minutes'=> '', 'seconds'=> '', 'blink' => 'true', + 'yearplusone' => 'false', + 'monthplusone' => 'false', + 'dayplusone' => 'false', 'endchar' => '--', 'titlesize' => '', 'countsize'=> '', @@ -1254,7 +1257,6 @@ 'visible' => 'all' ), $atts)); - if (empty($viewport)) $viewport="768"; if (empty($blink)) $blink="true"; @@ -1321,6 +1323,17 @@ $expirationDate = strtotime($thedate); $toDay = strtotime(current_time( 'mysql' )); + + if ($toDay>$expirationDate) { + if ($yearplusone=='true' || $dayplusone=='true' || $monthplusone=='true') { + if ($yearplusone=='true') $year=(date('Y')+1); else + if ($monthplusone=='true') $month=($month=date('m')+1); else + if ($dayplusone=='true') $day=(date('d')+1); + $thedate=$year.'/'.$month.'/'.$day.' '.$hour.':'.$minutes.':'.$seconds; + $expirationDate = strtotime($thedate); + } + } + $timerseconds = $expirationDate - $toDay; } }

    framework/theme.php

    @@ -35,7 +35,6 @@ } function _init(){ - require_once (THEME_HELPERS . '/sidebarGenerator.php'); global $_sidebarGenerator; @@ -63,7 +62,7 @@ add_action( 'admin_bar_menu', array(&$this,'admin_bar_menu') ,81); } - + /** * Defines the constant paths for use within the theme. */ @@ -107,12 +106,9 @@ / define('THEME_CACHE_DIR', THEME_DIR . '/cache'); / define('THEME_CACHE_URI', THEME_URI . '/cache'); - - define('THEME_IMAGES', THEME_URI . '/images'); / if(is_multisite()){ / global $blog_id; - / define('THEME_CACHE_IMAGES_DIR', THEME_CACHE_DIR . '/images'.$blog_id); / define('THEME_CACHE_IMAGES_URI', THEME_CACHE_URI . '/images'.$blog_id); / }else{ @@ -121,7 +117,7 @@ / } define('THEME_CSS', THEME_URI . '/css'); define('THEME_JS', THEME_URI . '/js'); - + define('THEME_ADMIN', THEME_FRAMEWORK . '/admin'); define('THEME_ADMIN_TYPES', THEME_ADMIN . '/types'); define('THEME_ADMIN_AJAX', THEME_ADMIN . '/ajax'); @@ -135,7 +131,7 @@ define('THEME_ADMIN_SHORTCODES_URI', THEME_URI.'/framework/admin/shortcodes'); define('REV_SLIDER_AS_THEME', true); } - + function base_function() { require_once (THEME_FUNCTIONS . '/common.php'); } @@ -229,7 +225,7 @@ global $theme_options; $theme_options = array(); - + $option_files = apply_filters('theme_options', array( 'general' => 'Theme_Options_Page_General', 'background' => 'Theme_Options_Page_Background', @@ -287,13 +283,6 @@ if (!class_exists('Mobile_Detect')) { require_once (THEME_PLUGINS . '/mobile-detect/Mobile_Detect.php'); } - - / if(theme_get_option_from_db('slideshow', 'revolution') || theme_get_option_from_db('slideshow', 'revolution') === null){ - / if(!class_exists('RevSliderAdmin')){ - / require_once (THEME_PLUGINS . '/revslider/revslider.php'); - / RevSliderBase::public_folder_unzip(); - / } - / } } /** @@ -430,8 +419,8 @@ 'Blog'=>'theme_blog', 'Portfolio'=>'theme_portfolio', 'Footer'=>'theme_footer', - 'Presets'=>'theme_presets', - 'Woocommerce'=>'theme_woocommerce', + 'Presets'=>'theme_presets', + 'Woocommerce'=>'theme_woocommerce', 'Advanced'=>'theme_advanced', )); foreach($option_pages as $title => $page){ @@ -466,6 +455,31 @@ if($stylesheet === 'Champion'){ remove_action('after_switch_theme', '_wp_sidebars_changed'); } + $static_blog_page=theme_get_option_from_db('blog', 'blog_page'); + if (empty($static_blog_page) || $static_blog_page===null ) $static_blog_page=''; + + $static_home_page=theme_get_option_from_db('homepage', 'home_page'); + if (empty($static_home_page) ||$static_home_page===null ) $static_home_page=''; + + $wp_static_blog_page=get_option( 'page_for_posts'); + $wp_static_home_page=get_option( 'page_on_front'); + + $reading_settings_changed='false'; + + if ($wp_static_blog_page!=$static_blog_page) { + update_option( 'page_for_posts', $static_blog_page ); + $reading_settings_changed='true'; + } + if ($wp_static_home_page!=$static_home_page) { + update_option( 'page_on_front', $static_home_page ); + $reading_settings_changed='true'; + } + if ($reading_settings_changed=='true') { + if (empty($static_home_page) && empty($static_blog_page)) { + update_option( 'show_on_front', 'posts' ); + } else update_option( 'show_on_front', 'page' ); + } + } function theme_included_plugins() { if(is_admin()){ @@ -476,7 +490,7 @@ function theme_plugins() { require_once (THEME_INSTALLER.'/theme-plugins.php'); tgmpa( $plugins, $config ); - } + } } }

    sections/menu.php

    @@ -42,7 +42,7 @@ $active_class = (is_front_page()) ? 'class="current_page_item"' : ''; if ($structureddata) { - $output = '<nav id="navigation" class="jqueryslidemenu"'.get_theme_markup("navigation").'>'; + $output = '<nav id="navigation" class="jqueryslidemenu'.$nav_align.'"'.get_theme_markup("navigation").'>'; } else $output = '<nav id="navigation" class="jqueryslidemenu'.$nav_align.'">'; $output .= '<ul id="menu-navigation" class="menu">'; $output .= '<li ' .$active_class. '>'.$itemprop.'href="' .home_url(). '">'.__('Home','wp-champion').'</a></li>';

    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.8 Build september 19, 2018 +Version: 2.8.9 Build november 3, 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.5 +WC tested up to: 3.5.1 */