diff --git a/assets/js/minified/customize-controls.min.js b/assets/js/minified/customize-controls.min.js index 6d802b5a..a7bb154e 100644 --- a/assets/js/minified/customize-controls.min.js +++ b/assets/js/minified/customize-controls.min.js @@ -1 +1 @@ -((r,c)=>{r.bind("ready",function(){r("colorscheme",function(t){r.control("colorscheme_hex",function(e){function n(){"custom"===t.get()?e.container.slideDown(180):e.container.slideUp(180)}n(),t.bind(n)})}),r("external_header_video",function(t){r.control("external_header_video_full_height",function(e){function n(){""!==t.get()?e.container.slideDown(180):e.container.slideUp(180)}n(),t.bind(n)})}),r("header_video",function(t){c.each(["external_header_video","external_header_video_full_height"],function(e,n){r.control(n,function(e){function n(){0{r.bind("ready",function(){r("colorscheme",function(t){r.control("colorscheme_hex",function(e){function n(){"custom"===t.get()?e.container.slideDown(180):e.container.slideUp(180)}n(),t.bind(n)})}),r("external_header_video",function(t){r.control("external_header_video_full_height",function(e){function n(){""!==t.get()?e.container.slideDown(180):e.container.slideUp(180)}n(),t.bind(n)})}),r("header_video",function(t){c.each(["external_header_video","external_header_video_full_height"],function(e,n){r.control(n,function(e){function n(){0{var t=e.plugins.registerPlugin,n=e.editPost.PluginDocumentSettingPanel,o=e.element.createElement,s=e.components.PanelRow,a=e.components.ToggleControl,r=e.data.useSelect,d=e.data.useDispatch;t("inspiro-sidebar-panel",{render:function(){var t=r(function(e){return e("core/editor").getEditedPostAttribute("meta")}),i=d("core/editor").editPost,e=!!t&&!!t._inspiro_hide_title;return e?document.body.classList.add("inspiro-hide-page-title"):document.body.classList.remove("inspiro-hide-page-title"),o(n,{name:"inspiro-settings-panel",title:"Page Settings"},[o(s,{},o(a,{label:"Hide Page Title",checked:e,onChange:function(e){i({meta:{...t,_inspiro_hide_title:e}})}}))])}})})(window.wp); \ No newline at end of file +(e=>{var t=e.plugins.registerPlugin,n=e.editPost.PluginDocumentSettingPanel,o=e.element.createElement,s=e.components.PanelRow,a=e.components.ToggleControl,r=e.data.useSelect,d=e.data.useDispatch;t("inspiro-sidebar-panel",{render:function(){var t=r(function(e){return e("core/editor").getEditedPostAttribute("meta")}),i=d("core/editor").editPost,e=!!t&&!!t.inspiro_hide_title;return e?document.body.classList.add("inspiro-hide-page-title"):document.body.classList.remove("inspiro-hide-page-title"),o(n,{name:"inspiro-settings-panel",title:"Page Settings"},[o(s,{},o(a,{label:"Hide Page Title",checked:e,onChange:function(e){i({meta:{...t,inspiro_hide_title:e}})}}))])}})})(window.wp); \ No newline at end of file diff --git a/assets/js/unminified/customize-controls.js b/assets/js/unminified/customize-controls.js index 5ad730af..7497252e 100644 --- a/assets/js/unminified/customize-controls.js +++ b/assets/js/unminified/customize-controls.js @@ -94,8 +94,10 @@ api.control('blog_show_excerpt', function (control) { const visibility = function () { + const displayContentSetting = api('display_content'); if ('grid' === setting.get()) { control.container.slideDown(180); + displayContentSetting.set('excerpt'); } else { control.container.slideUp(180); } diff --git a/assets/js/unminified/plugins.js b/assets/js/unminified/plugins.js index d27ea7ac..4bc1c9ae 100644 --- a/assets/js/unminified/plugins.js +++ b/assets/js/unminified/plugins.js @@ -1,5 +1,5 @@ /*! WPZOOM - * inspiro - v2.1.9 + * inspiro - v2.1.10 * Author website: https://wpzoom.com/ * This file is automatically created! Do not edit this file directly! */ /*! diff --git a/assets/js/unminified/scripts.js b/assets/js/unminified/scripts.js index 19f6c83c..27828eb6 100644 --- a/assets/js/unminified/scripts.js +++ b/assets/js/unminified/scripts.js @@ -1,5 +1,5 @@ /*! WPZOOM - * inspiro - v2.1.9 + * inspiro - v2.1.10 * Author website: https://wpzoom.com/ * This file is automatically created! Do not edit this file directly! */ /* global jQuery */ diff --git a/assets/js/unminified/sidebar-controls.js b/assets/js/unminified/sidebar-controls.js index 5a16c903..438f0526 100644 --- a/assets/js/unminified/sidebar-controls.js +++ b/assets/js/unminified/sidebar-controls.js @@ -15,7 +15,7 @@ var editPost = useDispatch("core/editor").editPost; var isTitleHidden = postMeta - ? !!postMeta["_inspiro_hide_title"] + ? !!postMeta["inspiro_hide_title"] : false; // Apply class to the editor body so CSS can dim the title @@ -42,7 +42,7 @@ editPost({ meta: { ...postMeta, - _inspiro_hide_title: value, + inspiro_hide_title: value, }, }); }, diff --git a/inc/classes/class-inspiro-enqueue-scripts.php b/inc/classes/class-inspiro-enqueue-scripts.php index 47f9014e..c2d4243f 100644 --- a/inc/classes/class-inspiro-enqueue-scripts.php +++ b/inc/classes/class-inspiro-enqueue-scripts.php @@ -42,7 +42,7 @@ public function __construct() { * Registers custom meta field for the 'page' post type. */ public function register_pages_settings_meta() { - register_post_meta( 'page', '_inspiro_hide_title', array( + register_post_meta( 'page', 'inspiro_hide_title', array( 'type' => 'boolean', 'single' => true, 'show_in_rest' => true, @@ -57,7 +57,7 @@ public function register_pages_settings_meta() { */ public function add_hide_title_class( $classes ) { - if ( is_page() && get_post_meta( get_the_ID(), '_inspiro_hide_title', true ) ) { + if ( is_page() && get_post_meta( get_the_ID(), 'inspiro_hide_title', true ) ) { $classes[] = 'inspiro-hide-page-title'; } diff --git a/inc/classes/class-inspiro-theme-upgrader.php b/inc/classes/class-inspiro-theme-upgrader.php index cee4b5ea..a9104219 100644 --- a/inc/classes/class-inspiro-theme-upgrader.php +++ b/inc/classes/class-inspiro-theme-upgrader.php @@ -258,6 +258,8 @@ public function migrate_customizer_settings() { global $_wp_default_headers; show_message( $this->strings['migrate_customizer_settings'] ); + + $this->sync_blog_configs_for_premium_theme(); $customizer_data = Inspiro_Customizer::$customizer_data; $theme_mods = get_theme_mods(); @@ -756,6 +758,34 @@ public function migrate_customizer_settings() { } } + + public function sync_blog_configs_for_premium_theme() + { + $layout = get_theme_mod('blog_layout', 'list'); + $display_content = get_theme_mod('display_content', 'excerpt'); + $blog_show_excerpt = get_theme_mod('blog_show_excerpt', true); + $display_featured_image = get_theme_mod('display_featured_image', true); + + update_option('wpzoom_post_view_blog', ('grid' === $layout) ? '3-columns' : 'big-image'); + + $content_mapping = [ + 'excerpt' => 'Excerpt', + 'full-content' => 'Full Content', + 'none' => 'None' + ]; + + + if($layout === 'grid' && !$blog_show_excerpt){ + $display_content = 'None'; + } else { + $display_content = isset($content_mapping[$display_content]) ? $content_mapping[$display_content] : 'Excerpt'; + } + + set_theme_mod('display_content', $display_content); + update_option('wpzoom_display_content', $display_content); + update_option('wpzoom_single_post_header_image', $display_featured_image ? 'on' : 'off'); + } + /** * Convert custom header media to custom post type slider * This is necessary because premium version use slider items in header section on homepage diff --git a/inc/customizer/configs/blog-post/class-inspiro-blog-layout-config.php b/inc/customizer/configs/blog-post/class-inspiro-blog-layout-config.php index 1da9ae71..6f4a143c 100644 --- a/inc/customizer/configs/blog-post/class-inspiro-blog-layout-config.php +++ b/inc/customizer/configs/blog-post/class-inspiro-blog-layout-config.php @@ -68,4 +68,4 @@ public function register_configuration( $wp_customize ) { ); } } -new Inspiro_Blog_Layout_Config(); +new Inspiro_Blog_Layout_Config(); \ No newline at end of file diff --git a/inc/customizer/configs/blog-post/class-inspiro-post-options-config.php b/inc/customizer/configs/blog-post/class-inspiro-post-options-config.php index 6b69f015..1bad390a 100644 --- a/inc/customizer/configs/blog-post/class-inspiro-post-options-config.php +++ b/inc/customizer/configs/blog-post/class-inspiro-post-options-config.php @@ -83,7 +83,7 @@ public static function config() { 'priority' => 6, 'label' => esc_html__( 'Content to Display in Archive Pages', 'inspiro' ), 'section' => 'blog_page_section', - 'type' => 'radio', + 'type' => 'select', 'choices' => array( 'excerpt' => esc_html__( 'Excerpt', 'inspiro' ), 'full-content' => esc_html__( 'Full Content', 'inspiro' ), diff --git a/inc/customizer/custom-controls/assets/js/unminified/custom-controls.js b/inc/customizer/custom-controls/assets/js/unminified/custom-controls.js index d2e5764d..51b7620d 100644 --- a/inc/customizer/custom-controls/assets/js/unminified/custom-controls.js +++ b/inc/customizer/custom-controls/assets/js/unminified/custom-controls.js @@ -1,5 +1,5 @@ /*! WPZOOM - * inspiro - v2.1.9 + * inspiro - v2.1.10 * Author website: https://wpzoom.com/ * This file is automatically created! Do not edit this file directly! */ /* global jQuery, inspiroCustomControl, InspiroFontFamilies */