From ac2ed348e43cb4c6896f46da73c055ddbd96d550 Mon Sep 17 00:00:00 2001 From: Armand Tresova Date: Sun, 17 Nov 2024 12:57:21 -0500 Subject: [PATCH 01/17] Release 1.8.9 Notes and Updates --- includes/class.cooked-functions.php | 5 ++++ includes/class.cooked-recipes.php | 33 +++++++++++++++++++++----- languages/cooked.po | 34 +++++++-------------------- languages/cooked.pot | 36 ++++++++--------------------- package-lock.json | 12 +++++----- readme.txt | 6 +++-- 6 files changed, 59 insertions(+), 67 deletions(-) diff --git a/includes/class.cooked-functions.php b/includes/class.cooked-functions.php index 3d02a0e..1ce9e09 100644 --- a/includes/class.cooked-functions.php +++ b/includes/class.cooked-functions.php @@ -227,4 +227,9 @@ function update_print_options( printOpt ) { } + public static function get_current_url() { + global $wp; + return home_url(add_query_arg([], $wp->request)); + } + } diff --git a/includes/class.cooked-recipes.php b/includes/class.cooked-recipes.php index 31333d9..63351a4 100644 --- a/includes/class.cooked-recipes.php +++ b/includes/class.cooked-recipes.php @@ -931,13 +931,13 @@ public static function recipe_search_box( $options = false ) { $taxonomy_search_fields = ''; if ( isset($recipe_args['tax_query']) ): - foreach( $recipe_args['tax_query'] as $query ): + foreach ( $recipe_args['tax_query'] as $query ): if ( isset($query['taxonomy']) && isset($query['terms']) ): $filters_set[$query['taxonomy']] = implode( ',', $query['terms'] ); endif; endforeach; if ( isset($filters_set) ): - foreach( $filters_set as $taxonomy => $filter ): + foreach ( $filters_set as $taxonomy => $filter ): $this_tax = get_term_by( 'slug', $filter, $taxonomy ); $this_tax = ( $this_tax ? $this_tax : get_term_by( 'id', $filter, $taxonomy ) ); $filters_set[$taxonomy] = $this_tax->term_id; @@ -1027,13 +1027,34 @@ public static function recipe_search_box( $options = false ) { $taxonomy_search_fields = false; endif; - if ( !isset( $recipe_args['tax_query'] ) || !get_option('permalink_structure') ): - $page_id = ( $_cooked_settings['browse_page'] ? $_cooked_settings['browse_page'] : get_the_ID() ); + // @TODO: This only works if there is no taxonomy query or permalink structure meaning that it only work + // when the permalink structure is the default one and no taxonomy filters are selected. + // Need to find a better way to handle this so it works in all cases. + if ( !isset( $recipe_args['tax_query'] ) || !get_option('permalink_structure') ) { + $page_id = $_cooked_settings['browse_page'] ? $_cooked_settings['browse_page'] : get_the_ID(); $form_redirect = get_permalink( $page_id ); - else: + } else { $form_redirect = ''; $page_id = false; - endif; + } + + // $page_id = $_cooked_settings['browse_page'] ? $_cooked_settings['browse_page'] : get_the_ID(); + // $form_redirect = get_permalink( $page_id ); + + // Replace the form redirect logic with: + // $page_id = $_cooked_settings['browse_page'] ? $_cooked_settings['browse_page'] : get_the_ID(); + // $form_redirect = ''; + + // if (isset($recipe_args['tax_query'])) { + // // Get current URL if we have taxonomy filters + // $form_redirect = Cooked_Functions::get_current_url(); + // } else { + // // Default to browse page if no filters + // $form_redirect = get_permalink($page_id); + // } + + // Remove any existing search params from the redirect URL + //$form_redirect = remove_query_arg(['cooked_search_s', 'cooked_browse_sort_by'], $form_redirect); ob_start(); diff --git a/languages/cooked.po b/languages/cooked.po index 3015f1b..23c9410 100644 --- a/languages/cooked.po +++ b/languages/cooked.po @@ -218,72 +218,59 @@ msgstr "" #. translators: for displaying singular or plural versions depending on the number of recipes. #: includes/class.cooked-import.php:42 -#: includes/class.cooked-import.php:100 msgid "There is %1$s recipe that should be imported from %2$s." msgid_plural "There are %1$s recipes that should be imported from %2$s." msgstr[0] "" msgstr[1] "" #: includes/class.cooked-import.php:44 -#: includes/class.cooked-import.php:102 msgid "Before you begin, please make sure you backup your database in case something goes wrong." msgstr "" #: includes/class.cooked-import.php:46 -#: includes/class.cooked-import.php:104 msgid "Click the button below to import these recipes. Here is what will happen to your recipes:" msgstr "" #: includes/class.cooked-import.php:48 -#: includes/class.cooked-import.php:106 msgid "Recipes will be imported with the 'Draft' status." msgstr "" #: includes/class.cooked-import.php:49 -#: includes/class.cooked-import.php:107 msgid "Comments and ratings data will also be imported (ratings are available in Cooked Pro)." msgstr "" #: includes/class.cooked-import.php:50 -#: includes/class.cooked-import.php:108 msgid "After the import is complete, you can bulk edit the recipes and change their status to 'Published'." msgstr "" #: includes/class.cooked-import.php:51 -#: includes/class.cooked-import.php:109 msgid "The existing WP Delicious recipes and data will not be modified or deleted." msgstr "" #: includes/class.cooked-import.php:52 -#: includes/class.cooked-import.php:110 msgid "Certain data that is not suppoted by Cooked will not be imported (such as Cooking Temp, Estimated Cost, Recipe Keywords, etc)." msgstr "" #: includes/class.cooked-import.php:53 -#: includes/class.cooked-import.php:111 msgid "You can run the import multiple times, but keep in mind that duplicate recipes will be created." msgstr "" #: includes/class.cooked-import.php:57 -#: includes/class.cooked-import.php:115 #: includes/class.cooked-migration.php:58 msgid "Wow, you have a lot of recipes!" msgstr "" #: includes/class.cooked-import.php:57 -#: includes/class.cooked-import.php:115 #: includes/class.cooked-migration.php:58 msgid "It is definitely recommended that you get yourself a cup of coffee or tea after clicking this button." msgstr "" #: includes/class.cooked-import.php:59 -#: includes/class.cooked-import.php:117 #: includes/class.cooked-migration.php:60 msgid "Note:" msgstr "" #: includes/class.cooked-import.php:59 -#: includes/class.cooked-import.php:117 #: includes/class.cooked-migration.php:60 msgid "The more recipes you have, the longer this will take." msgstr "" @@ -293,20 +280,15 @@ msgstr "" msgid "WP Delicious - Import" msgstr "" -#: includes/class.cooked-import.php:122 -#: includes/class.cooked-import.php:137 -msgid "WP Recipe Maker - Import" -msgstr "" - -#: includes/class.cooked-import.php:151 +#: includes/class.cooked-import.php:93 msgid "More Imports are Coming Soon..." msgstr "" -#: includes/class.cooked-import.php:172 +#: includes/class.cooked-import.php:114 msgid "Begin Import" msgstr "" -#: includes/class.cooked-import.php:177 +#: includes/class.cooked-import.php:119 #: includes/class.cooked-settings.php:526 msgid "reload" msgstr "" @@ -1449,23 +1431,23 @@ msgstr "" msgid "All Categories" msgstr "" -#: includes/class.cooked-recipes.php:1048 +#: includes/class.cooked-recipes.php:1069 msgid "Find a recipe..." msgstr "" -#: includes/class.cooked-recipes.php:1068 +#: includes/class.cooked-recipes.php:1089 msgid "Newest first" msgstr "" -#: includes/class.cooked-recipes.php:1072 +#: includes/class.cooked-recipes.php:1093 msgid "Oldest first" msgstr "" -#: includes/class.cooked-recipes.php:1076 +#: includes/class.cooked-recipes.php:1097 msgid "Alphabetical (A-Z)" msgstr "" -#: includes/class.cooked-recipes.php:1080 +#: includes/class.cooked-recipes.php:1101 msgid "Alphabetical (Z-A)" msgstr "" diff --git a/languages/cooked.pot b/languages/cooked.pot index 9c83f2c..34740e0 100644 --- a/languages/cooked.pot +++ b/languages/cooked.pot @@ -9,7 +9,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-11-16T19:22:47-05:00\n" +"POT-Creation-Date: 2024-11-17T12:55:16-05:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.11.0\n" "X-Domain: cooked\n" @@ -221,72 +221,59 @@ msgstr "" #. translators: for displaying singular or plural versions depending on the number of recipes. #: includes/class.cooked-import.php:42 -#: includes/class.cooked-import.php:100 msgid "There is %1$s recipe that should be imported from %2$s." msgid_plural "There are %1$s recipes that should be imported from %2$s." msgstr[0] "" msgstr[1] "" #: includes/class.cooked-import.php:44 -#: includes/class.cooked-import.php:102 msgid "Before you begin, please make sure you backup your database in case something goes wrong." msgstr "" #: includes/class.cooked-import.php:46 -#: includes/class.cooked-import.php:104 msgid "Click the button below to import these recipes. Here is what will happen to your recipes:" msgstr "" #: includes/class.cooked-import.php:48 -#: includes/class.cooked-import.php:106 msgid "Recipes will be imported with the 'Draft' status." msgstr "" #: includes/class.cooked-import.php:49 -#: includes/class.cooked-import.php:107 msgid "Comments and ratings data will also be imported (ratings are available in Cooked Pro)." msgstr "" #: includes/class.cooked-import.php:50 -#: includes/class.cooked-import.php:108 msgid "After the import is complete, you can bulk edit the recipes and change their status to 'Published'." msgstr "" #: includes/class.cooked-import.php:51 -#: includes/class.cooked-import.php:109 msgid "The existing WP Delicious recipes and data will not be modified or deleted." msgstr "" #: includes/class.cooked-import.php:52 -#: includes/class.cooked-import.php:110 msgid "Certain data that is not suppoted by Cooked will not be imported (such as Cooking Temp, Estimated Cost, Recipe Keywords, etc)." msgstr "" #: includes/class.cooked-import.php:53 -#: includes/class.cooked-import.php:111 msgid "You can run the import multiple times, but keep in mind that duplicate recipes will be created." msgstr "" #: includes/class.cooked-import.php:57 -#: includes/class.cooked-import.php:115 #: includes/class.cooked-migration.php:58 msgid "Wow, you have a lot of recipes!" msgstr "" #: includes/class.cooked-import.php:57 -#: includes/class.cooked-import.php:115 #: includes/class.cooked-migration.php:58 msgid "It is definitely recommended that you get yourself a cup of coffee or tea after clicking this button." msgstr "" #: includes/class.cooked-import.php:59 -#: includes/class.cooked-import.php:117 #: includes/class.cooked-migration.php:60 msgid "Note:" msgstr "" #: includes/class.cooked-import.php:59 -#: includes/class.cooked-import.php:117 #: includes/class.cooked-migration.php:60 msgid "The more recipes you have, the longer this will take." msgstr "" @@ -296,20 +283,15 @@ msgstr "" msgid "WP Delicious - Import" msgstr "" -#: includes/class.cooked-import.php:122 -#: includes/class.cooked-import.php:137 -msgid "WP Recipe Maker - Import" -msgstr "" - -#: includes/class.cooked-import.php:151 +#: includes/class.cooked-import.php:93 msgid "More Imports are Coming Soon..." msgstr "" -#: includes/class.cooked-import.php:172 +#: includes/class.cooked-import.php:114 msgid "Begin Import" msgstr "" -#: includes/class.cooked-import.php:177 +#: includes/class.cooked-import.php:119 #: includes/class.cooked-settings.php:526 msgid "reload" msgstr "" @@ -1452,23 +1434,23 @@ msgstr "" msgid "All Categories" msgstr "" -#: includes/class.cooked-recipes.php:1048 +#: includes/class.cooked-recipes.php:1069 msgid "Find a recipe..." msgstr "" -#: includes/class.cooked-recipes.php:1068 +#: includes/class.cooked-recipes.php:1089 msgid "Newest first" msgstr "" -#: includes/class.cooked-recipes.php:1072 +#: includes/class.cooked-recipes.php:1093 msgid "Oldest first" msgstr "" -#: includes/class.cooked-recipes.php:1076 +#: includes/class.cooked-recipes.php:1097 msgid "Alphabetical (A-Z)" msgstr "" -#: includes/class.cooked-recipes.php:1080 +#: includes/class.cooked-recipes.php:1101 msgid "Alphabetical (Z-A)" msgstr "" diff --git a/package-lock.json b/package-lock.json index ebaaab8..f180c5f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -613,9 +613,9 @@ } }, "node_modules/@wordpress/e2e-test-utils-playwright": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils-playwright/-/e2e-test-utils-playwright-1.11.0.tgz", - "integrity": "sha512-0kSY0rOpKirXgXsNJQ/Mj3NLJhmN1lwkECZFF53iYs/kOAXNaVxs6Ys3T8hleoO47/KZLY7AoEJTxKwK0fWixQ==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils-playwright/-/e2e-test-utils-playwright-1.12.0.tgz", + "integrity": "sha512-Lb5Z+Ia80679efJOl3W8drIbXDlahbRIrJrQmd096n0mbRaplm+JLFydLYlT4F+5XxYbrrwTkqBcNXIA2JlXHw==", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -3731,9 +3731,9 @@ "license": "MIT" }, "node_modules/sass": { - "version": "1.80.7", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.80.7.tgz", - "integrity": "sha512-MVWvN0u5meytrSjsU7AWsbhoXi1sc58zADXFllfZzbsBT1GHjjar6JwBINYPRrkx/zqnQ6uqbQuHgE95O+C+eQ==", + "version": "1.81.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.81.0.tgz", + "integrity": "sha512-Q4fOxRfhmv3sqCLoGfvrC9pRV8btc0UtqL9mN6Yrv6Qi9ScL55CVH1vlPP863ISLEEMNLLuu9P+enCeGHlnzhA==", "dev": true, "license": "MIT", "dependencies": { diff --git a/readme.txt b/readme.txt index edc2d84..5121c02 100644 --- a/readme.txt +++ b/readme.txt @@ -76,12 +76,14 @@ Be sure to check the [Cooked Documentation](https://github.com/XjSv/Cooked/wiki) == Upgrade Notice == -Version 1.8.9 includes a new feature to better support custom translations and prevent them from being lost during plugin updates. +Version 1.8.9 includes improvements to translation handling and a fix for incorrect textdomain loading when using Loco Translate. == Changelog == = 1.8.9 = -* **TWEAK:** Updated how language translations are loaded to better support custom translations and prevent them from being lost during plugin updates. +* **NEW:** Improved SEO by dynamically updating the canonical URL on the Browse Recipe page to match active category/tag filters. Supports Rank Math SEO and Yoast SEO. +* **TWEAK:** Enhanced translation handling to better support custom language files and prevent conflicts. +* **FIX:** Resolved compatibility issue with Loco Translate plugin that was causing incorrect textdomain loading. = 1.8.8 = * **NEW:** Added option to disable the recipe archive page under Cooked Settings > General > Advanced Settings. From a05dd8b10a0de53cc29b77be2e625ec4969106dd Mon Sep 17 00:00:00 2001 From: Armand Tresova Date: Fri, 22 Nov 2024 14:41:18 -0500 Subject: [PATCH 02/17] Added pre_do_shortcode_tag Filter And removed the Elementor elementor/element/before_section_start action. This is now handled in pre_do_shortcode_tag filter in class.cooked-shortcodes.php. This will allow shortcodes to work with Elementor, Divi and other theme builders. For #79 --- includes/class.cooked-elementor.php | 26 +++++++++++------- includes/class.cooked-shortcodes.php | 40 +++++++++++++++++++++++++--- 2 files changed, 53 insertions(+), 13 deletions(-) diff --git a/includes/class.cooked-elementor.php b/includes/class.cooked-elementor.php index 49cd2ad..9418158 100644 --- a/includes/class.cooked-elementor.php +++ b/includes/class.cooked-elementor.php @@ -19,29 +19,35 @@ */ class Cooked_Elementor { - public function __construct(){ + public function __construct() { add_action( 'plugins_loaded', [&$this, 'init'] ); } - public function init(){ + public function init() { // Check if Elementor installed and activated if ( did_action( 'elementor/loaded' ) ) { add_filter( 'cooked_recipe_content_filter', [&$this, 'elementor_filter'], 15, 3 ); add_filter( 'cooked_should_update_post_content', [&$this, 'should_update_content'], 10, 2 ); - add_action( 'elementor/element/before_section_start', [&$this, 'elementor_is_editing'], 10, 3 ); + // Deprecated. Now handled in pre_do_shortcode_tag filter in class.cooked-shortcodes.php. + // add_action( 'elementor/element/before_section_start', [&$this, 'elementor_is_editing'], 10, 3 ); } } // Load the recipe_settings when needed so we can display shortcode content in the editor. - public function elementor_is_editing( $element, $section_id, $args ) { + /* public function elementor_is_editing( $element, $section_id, $args ) { $post_id = get_the_ID(); - if ( !isset($recipe_settings) || isset($recipe_settings) && !isset($recipe_settings['author'])): - if ( get_post_type( $post_id ) === 'cp_recipe' ): + + if ( !isset($recipe_settings) || isset($recipe_settings) && !isset($recipe_settings['author']) ) { + if ( get_post_type( $post_id ) === 'cp_recipe' ) { global $recipe_settings; $recipe_settings = Cooked_Recipes::get_settings( $post_id ); - endif; - endif; - } + } else { + // We are in the editor but not on a recipe post type. Maybe a single recipe template? + // Uses the first recipe found in the database as a sample. + $recipe_settings = Cooked_Recipes::get( false, true ); + } + } + } */ public function elementor_filter( $recipe_content, $og_content, $recipe_id ) { $elementor_page = get_post_meta( $recipe_id, '_elementor_edit_mode', true ); @@ -55,9 +61,11 @@ public function elementor_filter( $recipe_content, $og_content, $recipe_id ) { public function should_update_content( $should_update, $recipe_id ) { $elementor_page = get_post_meta( $recipe_id, '_elementor_edit_mode', true ); + if ( $elementor_page ) { return false; } + return $should_update; } diff --git a/includes/class.cooked-shortcodes.php b/includes/class.cooked-shortcodes.php index 6aadde4..271201b 100644 --- a/includes/class.cooked-shortcodes.php +++ b/includes/class.cooked-shortcodes.php @@ -49,6 +49,38 @@ function __construct() { add_shortcode('cooked-ingredients', [$this, 'cooked_ingredients_shortcode'] ); add_shortcode('cooked-directions', [$this, 'cooked_directions_shortcode'] ); add_shortcode('cooked-nutrition', [$this, 'cooked_nutrition_shortcode'] ); + + // Add preprocessing filter for shortcodes for Elementor, Divi, and other builders compatibility. + add_filter('pre_do_shortcode_tag', [$this, 'preprocess_shortcode'], 10, 4); + } + + public function preprocess_shortcode($output, $tag, $attr, $m) { + // Only process for Cooked shortcodes + if (strpos($tag, 'cooked-') === false) { + return $output; + } + + global $recipe_settings, $post; + + // If recipe settings are empty, try to get them. + if (empty($recipe_settings)) { + // Try to get recipe settings from current post. + $post_id = isset($post->ID) ? $post->ID : false; + if ($post_id && get_post_type( $post_id ) === 'cp_recipe' ) { + $recipe_settings = Cooked_Recipes::get($post_id, true); + } else { + // We are in the editor but not on a recipe post type. Maybe a single recipe template? + // Uses the first recipe found in the database as a sample. + $recipe_settings = Cooked_Recipes::get( false, true ); + } + + // If still empty and we have a specific recipe ID in attributes, try to get them. + if (empty($recipe_settings) && isset($attr['id'])) { + $recipe_settings = Cooked_Recipes::get(intval($attr['id']), true); + } + } + + return $output; } public function cooked_search_shortcode( $atts, $content = null ) { @@ -481,7 +513,7 @@ public function cooked_info_shortcode($atts, $content = null) { elseif ( isset($info_array['right']) && !empty($info_array['right']) ): echo '
'; - foreach( $info_array['right'] as $name => $val ): + foreach ( $info_array['right'] as $name => $val ): $function = 'cooked_info_' . $name; if ( array_key_exists( $function, $available_methods ) ): $class = ( $available_methods[$function] == 'Cooked_Recipes' ? $this : $available_methods[$function] ); @@ -494,7 +526,7 @@ public function cooked_info_shortcode($atts, $content = null) { else: - foreach( $info_array as $name => $val ): + foreach ( $info_array as $name => $val ): $function = 'cooked_info_' . $name; if ( array_key_exists( $function, $available_methods ) ): $class = ( $available_methods[$function] == 'Cooked_Recipes' ? $this : $available_methods[$function] ); @@ -811,14 +843,14 @@ public function cooked_directions_shortcode($atts, $content = null) { } public function cooked_nutrition_shortcode($atts, $content = null) { + global $_cooked_settings, $recipe_settings; + // Shortcode Attributes $atts = shortcode_atts([ 'id' => false, 'float' => false, ], $atts); - global $_cooked_settings, $recipe_settings; - if ( isset( $atts['id'] ) && $atts['id'] ): $recipe_settings = Cooked_Recipes::get( intval( $atts['id'] ), true ); else: From 58f0df5ee27f097020fb373fae800c17ea9e8af5 Mon Sep 17 00:00:00 2001 From: Armand Tresova Date: Mon, 16 Dec 2024 13:28:23 -0500 Subject: [PATCH 03/17] Updated Selectize and Drag&Drop Library --- .../admin/js/selectize/selectize.dragdrop.js | 94 ++++++++++--------- assets/admin/js/selectize/selectize.min.js | 36 ++++++- 2 files changed, 82 insertions(+), 48 deletions(-) diff --git a/assets/admin/js/selectize/selectize.dragdrop.js b/assets/admin/js/selectize/selectize.dragdrop.js index ae552d4..da4c4b7 100644 --- a/assets/admin/js/selectize/selectize.dragdrop.js +++ b/assets/admin/js/selectize/selectize.dragdrop.js @@ -1,6 +1,7 @@ /** * Plugin: "drag_drop" (selectize.js) * Copyright (c) 2013 Brian Reavis & contributors + * Copyright (c) 2020-2022 Selectize Team & contributors* * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this * file except in compliance with the License. You may obtain a copy of the License at: @@ -15,53 +16,58 @@ */ Selectize.define('drag_drop', function(options) { - if (!$.fn.sortable) throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".'); - if (this.settings.mode !== 'multi') return; - var self = this; + if (!$.fn.sortable) throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".'); + if (this.settings.mode !== 'multi') return; + var self = this; - self.lock = (function() { - var original = self.lock; - return function() { - var sortable = self.$control.data('sortable'); - if (sortable) sortable.disable(); - return original.apply(self, arguments); - }; - })(); + self.lock = (function() { + var original = self.lock; + return function() { + var sortable = self.$control.data('sortable'); + if (sortable) sortable.disable(); + return original.apply(self, arguments); + }; + })(); - self.unlock = (function() { - var original = self.unlock; - return function() { - var sortable = self.$control.data('sortable'); - if (sortable) sortable.enable(); - return original.apply(self, arguments); - }; - })(); + self.unlock = (function() { + var original = self.unlock; + return function() { + var sortable = self.$control.data('sortable'); + if (sortable) sortable.enable(); + return original.apply(self, arguments); + }; + })(); - self.setup = (function() { - var original = self.setup; - return function() { - original.apply(this, arguments); + self.setup = (function() { + var original = self.setup; + return function() { + original.apply(this, arguments); - var $control = self.$control.sortable({ - items: '[data-value]', - forcePlaceholderSize: true, - disabled: self.isLocked, - start: function(e, ui) { - ui.placeholder.css('width', ui.helper.css('width')); - $control.css({overflow: 'visible'}); - }, - stop: function() { - $control.css({overflow: 'hidden'}); - var active = self.$activeItems ? self.$activeItems.slice() : null; - var values = []; - $control.children('[data-value]').each(function() { - values.push($(this).attr('data-value')); - }); - self.setValue(values); - self.setActiveItem(active); - } - }); - }; - })(); + var $control = self.$control.sortable({ + items: '[data-value]', + forcePlaceholderSize: true, + disabled: self.isLocked, + start: function(e, ui) { + ui.placeholder.css('width', ui.helper.css('width')); + // $control.css({overflow: 'visible'}); + $control.addClass('dragging'); + }, + stop: function() { + // $control.css({overflow: 'hidden'}); + $control.removeClass('dragging'); + var active = self.$activeItems ? self.$activeItems.slice() : null; + var values = []; + $control.children('[data-value]').each(function() { + values.push($(this).attr('data-value')); + }); + self.isFocused = false; + self.setValue(values); + self.isFocused = true; + self.setActiveItem(active); + self.positionDropdown(); + } + }); + }; + })(); }); diff --git a/assets/admin/js/selectize/selectize.min.js b/assets/admin/js/selectize/selectize.min.js index 43046c9..1e87bb0 100644 --- a/assets/admin/js/selectize/selectize.min.js +++ b/assets/admin/js/selectize/selectize.min.js @@ -1,4 +1,32 @@ -/*! selectize.js - v0.12.6 | https://github.com/selectize/selectize.js | Apache License (v2) */ - -!function(a,b){"function"==typeof define&&define.amd?define("sifter",b):"object"==typeof exports?module.exports=b():a.Sifter=b()}(this,function(){var a=function(a,b){this.items=a,this.settings=b||{diacritics:!0}};a.prototype.tokenize=function(a){if(!(a=e(String(a||"").toLowerCase()))||!a.length)return[];var b,c,d,g,i=[],j=a.split(/ +/);for(b=0,c=j.length;b0)&&d.items.push({score:c,id:e})}):g.iterator(g.items,function(a,b){d.items.push({score:1,id:b})}),e=g.getSortFunction(d,b),e&&d.items.sort(e),d.total=d.items.length,"number"==typeof b.limit&&(d.items=d.items.slice(0,b.limit)),d};var b=function(a,b){return"number"==typeof a&&"number"==typeof b?a>b?1:ab?1:b>a?-1:0)},c=function(a,b){var c,d,e,f;for(c=1,d=arguments.length;c=0&&a.data.length>0){var f=a.data.match(c),g=document.createElement("span");g.className="highlight";var h=a.splitText(e),i=(h.splitText(f[0].length),h.cloneNode(!0));g.appendChild(i),h.parentNode.replaceChild(g,h),b=1}}else if(1===a.nodeType&&a.childNodes&&!/(script|style)/i.test(a.tagName)&&("highlight"!==a.className||"SPAN"!==a.tagName))for(var j=0;j/g,">").replace(/"/g,""")},m={};m.before=function(a,b,c){var d=a[b];a[b]=function(){return c.apply(a,arguments),d.apply(a,arguments)}},m.after=function(a,b,c){var d=a[b];a[b]=function(){var b=d.apply(a,arguments);return c.apply(a,arguments),b}};var n=function(a){var b=!1;return function(){b||(b=!0,a.apply(this,arguments))}},o=function(a,b){var c;return function(){var d=this,e=arguments;window.clearTimeout(c),c=window.setTimeout(function(){a.apply(d,e)},b)}},p=function(a,b,c){var d,e=a.trigger,f={};a.trigger=function(){var c=arguments[0];if(-1===b.indexOf(c))return e.apply(a,arguments);f[c]=arguments},c.apply(a,[]),a.trigger=e;for(d in f)f.hasOwnProperty(d)&&e.apply(a,f[d])},q=function(a,b,c,d){a.on(b,c,function(b){for(var c=b.target;c&&c.parentNode!==a[0];)c=c.parentNode;return b.currentTarget=c,d.apply(this,[b])})},r=function(a){var b={};if("selectionStart"in a)b.start=a.selectionStart,b.length=a.selectionEnd-b.start;else if(document.selection){a.focus();var c=document.selection.createRange(),d=document.selection.createRange().text.length;c.moveStart("character",-a.value.length),b.start=c.text.length-d,b.length=d}return b},s=function(a,b,c){var d,e,f={};if(c)for(d=0,e=c.length;d").css({position:"absolute",top:-99999,left:-99999,width:"auto",padding:0,whiteSpace:"pre"}).appendTo("body")),w.$testInput.text(b),s(c,w.$testInput,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]),w.$testInput.width()):0},u=function(a){var b=null,c=function(c,d){var e,f,g,h,i,j,k,l;c=c||window.event||{},d=d||{},c.metaKey||c.altKey||(d.force||!1!==a.data("grow"))&&(e=a.val(),c.type&&"keydown"===c.type.toLowerCase()&&(f=c.keyCode,g=f>=48&&f<=57||f>=65&&f<=90||f>=96&&f<=111||f>=186&&f<=222||32===f,46===f||8===f?(l=r(a[0]),l.length?e=e.substring(0,l.start)+e.substring(l.start+l.length):8===f&&l.start?e=e.substring(0,l.start-1)+e.substring(l.start+1):46===f&&void 0!==l.start&&(e=e.substring(0,l.start)+e.substring(l.start+1))):g&&(j=c.shiftKey,k=String.fromCharCode(c.keyCode),k=j?k.toUpperCase():k.toLowerCase(),e+=k)),h=a.attr("placeholder"),!e&&h&&(e=h),(i=t(e,a)+4)!==b&&(b=i,a.width(i),a.triggerHandler("resize")))};a.on("keydown keyup update blur",c),c()},v=function(a){var b=document.createElement("div");return b.appendChild(a.cloneNode(!0)),b.innerHTML},w=function(c,d){var e,f,g,h,i=this;h=c[0],h.selectize=i;var j=window.getComputedStyle&&window.getComputedStyle(h,null);if(g=j?j.getPropertyValue("direction"):h.currentStyle&&h.currentStyle.direction,g=g||c.parents("[dir]:first").attr("dir")||"",a.extend(i,{order:0,settings:d,$input:c,tabIndex:c.attr("tabindex")||"",tagType:"select"===h.tagName.toLowerCase()?1:2,rtl:/rtl/i.test(g),eventNS:".selectize"+ ++w.count,highlightedValue:null,isBlurring:!1,isOpen:!1,isDisabled:!1,isRequired:c.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",caretPos:0,loading:0,loadedSearches:{},$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:null===d.loadThrottle?i.onSearchChange:o(i.onSearchChange,d.loadThrottle)}),i.sifter=new b(this.options,{diacritics:d.diacritics}),i.settings.options){for(e=0,f=i.settings.options.length;e").addClass(r.wrapperClass).addClass(m).addClass(l),c=a("
").addClass(r.inputClass).addClass("items").appendTo(b),d=a('').appendTo(c).attr("tabindex",w.is(":disabled")?"-1":p.tabIndex),k=a(r.dropdownParent||b),e=a("
").addClass(r.dropdownClass).addClass(l).hide().appendTo(k),j=a("
").addClass(r.dropdownContentClass).appendTo(e),(o=w.attr("id"))&&(d.attr("id",o+"-selectized"),a("label[for='"+o+"']").attr("for",o+"-selectized")),p.settings.copyClassesToDropdown&&e.addClass(m),b.css({width:w[0].style.width}),p.plugins.names.length&&(n="plugin-"+p.plugins.names.join(" plugin-"),b.addClass(n),e.addClass(n)),(null===r.maxItems||r.maxItems>1)&&1===p.tagType&&w.attr("multiple","multiple"),p.settings.placeholder&&d.attr("placeholder",r.placeholder),!p.settings.splitOn&&p.settings.delimiter){var x=p.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");p.settings.splitOn=new RegExp("\\s*"+x+"+\\s*")}w.attr("autocorrect")&&d.attr("autocorrect",w.attr("autocorrect")),w.attr("autocapitalize")&&d.attr("autocapitalize",w.attr("autocapitalize")),d[0].type=w[0].type,p.$wrapper=b,p.$control=c,p.$control_input=d,p.$dropdown=e,p.$dropdown_content=j,e.on("mouseenter mousedown click","[data-disabled]>[data-selectable]",function(a){a.stopImmediatePropagation()}),e.on("mouseenter","[data-selectable]",function(){return p.onOptionHover.apply(p,arguments)}),e.on("mousedown click","[data-selectable]",function(){return p.onOptionSelect.apply(p,arguments)}),q(c,"mousedown","*:not(input)",function(){return p.onItemSelect.apply(p,arguments)}),u(d),c.on({mousedown:function(){return p.onMouseDown.apply(p,arguments)},click:function(){return p.onClick.apply(p,arguments)}}),d.on({mousedown:function(a){a.stopPropagation()},keydown:function(){return p.onKeyDown.apply(p,arguments)},keyup:function(){return p.onKeyUp.apply(p,arguments)},keypress:function(){return p.onKeyPress.apply(p,arguments)},resize:function(){p.positionDropdown.apply(p,[])},blur:function(){return p.onBlur.apply(p,arguments)},focus:function(){return p.ignoreBlur=!1,p.onFocus.apply(p,arguments)},paste:function(){return p.onPaste.apply(p,arguments)}}),v.on("keydown"+s,function(a){p.isCmdDown=a[f?"metaKey":"ctrlKey"],p.isCtrlDown=a[f?"altKey":"ctrlKey"],p.isShiftDown=a.shiftKey}),v.on("keyup"+s,function(a){a.keyCode===h&&(p.isCtrlDown=!1),16===a.keyCode&&(p.isShiftDown=!1),a.keyCode===g&&(p.isCmdDown=!1)}),v.on("mousedown"+s,function(a){if(p.isFocused){if(a.target===p.$dropdown[0]||a.target.parentNode===p.$dropdown[0])return!1;p.$control.has(a.target).length||a.target===p.$control[0]||p.blur(a.target)}}),t.on(["scroll"+s,"resize"+s].join(" "),function(){p.isOpen&&p.positionDropdown.apply(p,arguments)}),t.on("mousemove"+s,function(){p.ignoreHover=!1}),this.revertSettings={$children:w.children().detach(),tabindex:w.attr("tabindex")},w.attr("tabindex",-1).hide().after(p.$wrapper),a.isArray(r.items)&&(p.setValue(r.items),delete r.items),i&&w.on("invalid"+s,function(a){a.preventDefault(),p.isInvalid=!0,p.refreshState()}),p.updateOriginalInput(),p.refreshItems(),p.refreshState(),p.updatePlaceholder(),p.isSetup=!0,w.is(":disabled")&&p.disable(),p.on("change",this.onChange),w.data("selectize",p),w.addClass("selectized"),p.trigger("initialize"),!0===r.preload&&p.onSearchChange("")},setupTemplates:function(){var b=this,c=b.settings.labelField,d=b.settings.optgroupLabelField,e={optgroup:function(a){return'
'+a.html+"
"},optgroup_header:function(a,b){return'
'+b(a[d])+"
"},option:function(a,b){return'
'+b(a[c])+"
"},item:function(a,b){return'
'+b(a[c])+"
"},option_create:function(a,b){return'
Add '+b(a.input)+"
"}};b.settings.render=a.extend({},e,b.settings.render)},setupCallbacks:function(){var a,b,c={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(a in c)c.hasOwnProperty(a)&&(b=this.settings[c[a]])&&this.on(a,b)},onClick:function(a){var b=this;b.isFocused&&b.isOpen||(b.focus(),a.preventDefault())},onMouseDown:function(b){var c=this,d=b.isDefaultPrevented();a(b.target);if(c.isFocused){if(b.target!==c.$control_input[0])return"single"===c.settings.mode?c.isOpen?c.close():c.open():d||c.setActiveItem(null),!1}else d||window.setTimeout(function(){c.focus()},0)},onChange:function(){this.$input.trigger("change")},onPaste:function(b){var c=this;if(c.isFull()||c.isInputHidden||c.isLocked)return void b.preventDefault();c.settings.splitOn&&setTimeout(function(){var b=c.$control_input.val();if(b.match(c.settings.splitOn))for(var d=a.trim(b).split(c.settings.splitOn),e=0,f=d.length;eh&&(j=g,g=h,h=j),e=g;e<=h;e++)i=l.$control[0].childNodes[e],-1===l.$activeItems.indexOf(i)&&(a(i).addClass("active"),l.$activeItems.push(i));c.preventDefault()}else"mousedown"===d&&l.isCtrlDown||"keydown"===d&&this.isShiftDown?b.hasClass("active")?(f=l.$activeItems.indexOf(b[0]),l.$activeItems.splice(f,1),b.removeClass("active")):l.$activeItems.push(b.addClass("active")[0]):(a(l.$activeItems).removeClass("active"),l.$activeItems=[b.addClass("active")[0]]);l.hideInput(),this.isFocused||l.focus()}},setActiveOption:function(b,c,d){var e,f,g,h,i,k=this;k.$activeOption&&k.$activeOption.removeClass("active"),k.$activeOption=null,b=a(b),b.length&&(k.$activeOption=b.addClass("active"),!c&&j(c)||(e=k.$dropdown_content.height(),f=k.$activeOption.outerHeight(!0),c=k.$dropdown_content.scrollTop()||0,g=k.$activeOption.offset().top-k.$dropdown_content.offset().top+c,h=g,i=g-e+f,g+f>e+c?k.$dropdown_content.stop().animate({scrollTop:i},d?k.settings.scrollDuration:0):g=0;c--)-1!==f.items.indexOf(k(d.items[c].id))&&d.items.splice(c,1);return d},refreshOptions:function(b){var c,e,f,g,h,i,j,l,m,n,o,p,q,r,s,t;void 0===b&&(b=!0);var u=this,w=a.trim(u.$control_input.val()),x=u.search(w),y=u.$dropdown_content,z=u.$activeOption&&k(u.$activeOption.attr("data-value"));for(g=x.items.length,"number"==typeof u.settings.maxOptions&&(g=Math.min(g,u.settings.maxOptions)),h={},i=[],c=0;c0||q,u.hasOptions?(x.items.length>0?(s=z&&u.getOption(z),s&&s.length?r=s:"single"===u.settings.mode&&u.items.length&&(r=u.getOption(u.items[0])),r&&r.length||(r=t&&!u.settings.addPrecedence?u.getAdjacentOption(t,1):y.find("[data-selectable]:first"))):r=t,u.setActiveOption(r),b&&!u.isOpen&&u.open()):(u.setActiveOption(null),b&&u.isOpen&&u.close())},addOption:function(b){var c,d,e,f=this;if(a.isArray(b))for(c=0,d=b.length;c=0&&e0),b.$control_input.data("grow",!c&&!d)},isFull:function(){ -return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(a){var b,c,d,e,f=this;if(a=a||{},1===f.tagType){for(d=[],b=0,c=f.items.length;b'+l(e)+"");d.length||this.$input.attr("multiple")||d.push(''),f.$input.html(d.join(""))}else f.$input.val(f.getValue()),f.$input.attr("value",f.$input.val());f.isSetup&&(a.silent||f.trigger("change",f.$input.val()))},updatePlaceholder:function(){if(this.settings.placeholder){var a=this.$control_input;this.items.length?a.removeAttr("placeholder"):a.attr("placeholder",this.settings.placeholder),a.triggerHandler("update",{force:!0})}},open:function(){var a=this;a.isLocked||a.isOpen||"multi"===a.settings.mode&&a.isFull()||(a.focus(),a.isOpen=!0,a.refreshState(),a.$dropdown.css({visibility:"hidden",display:"block"}),a.positionDropdown(),a.$dropdown.css({visibility:"visible"}),a.trigger("dropdown_open",a.$dropdown))},close:function(){var a=this,b=a.isOpen;"single"===a.settings.mode&&a.items.length&&(a.hideInput(),a.isBlurring||a.$control_input.blur()),a.isOpen=!1,a.$dropdown.hide(),a.setActiveOption(null),a.refreshState(),b&&a.trigger("dropdown_close",a.$dropdown)},positionDropdown:function(){var a=this.$control,b="body"===this.settings.dropdownParent?a.offset():a.position();b.top+=a.outerHeight(!0),this.$dropdown.css({width:a[0].getBoundingClientRect().width,top:b.top,left:b.left})},clear:function(a){var b=this;b.items.length&&(b.$control.children(":not(input)").remove(),b.items=[],b.lastQuery=null,b.setCaret(0),b.setActiveItem(null),b.updatePlaceholder(),b.updateOriginalInput({silent:a}),b.refreshState(),b.showInput(),b.trigger("clear"))},insertAtCaret:function(a){var b=Math.min(this.caretPos,this.items.length),c=a[0],d=this.buffer||this.$control[0];0===b?d.insertBefore(c,d.firstChild):d.insertBefore(c,d.childNodes[b]),this.setCaret(b+1)},deleteSelection:function(b){var c,d,e,f,g,h,i,j,k,l=this;if(e=b&&8===b.keyCode?-1:1,f=r(l.$control_input[0]),l.$activeOption&&!l.settings.hideSelected&&(i=l.getAdjacentOption(l.$activeOption,-1).attr("data-value")),g=[],l.$activeItems.length){for(k=l.$control.children(".active:"+(e>0?"last":"first")),h=l.$control.children(":not(input)").index(k),e>0&&h++,c=0,d=l.$activeItems.length;c0&&f.start===l.$control_input.val().length&&g.push(l.items[l.caretPos]));if(!g.length||"function"==typeof l.settings.onDelete&&!1===l.settings.onDelete.apply(l,[g]))return!1;for(void 0!==h&&l.setCaret(h);g.length;)l.removeItem(g.pop());return l.showInput(),l.positionDropdown(),l.refreshOptions(!0),i&&(j=l.getOption(i),j.length&&l.setActiveOption(j)),!0},advanceSelection:function(a,b){var c,d,e,f,g,h=this;0!==a&&(h.rtl&&(a*=-1),c=a>0?"last":"first",d=r(h.$control_input[0]),h.isFocused&&!h.isInputHidden?(f=h.$control_input.val().length,(a<0?0===d.start&&0===d.length:d.start===f)&&!f&&h.advanceCaret(a,b)):(g=h.$control.children(".active:"+c),g.length&&(e=h.$control.children(":not(input)").index(g),h.setActiveItem(null),h.setCaret(a>0?e+1:e))))},advanceCaret:function(a,b){var c,d,e=this;0!==a&&(c=a>0?"next":"prev",e.isShiftDown?(d=e.$control_input[c](),d.length&&(e.hideInput(),e.setActiveItem(d),b&&b.preventDefault())):e.setCaret(e.caretPos+a))},setCaret:function(b){var c=this;if(b="single"===c.settings.mode?c.items.length:Math.max(0,Math.min(c.items.length,b)),!c.isPending){var d,e,f,g;for(f=c.$control.children(":not(input)"),d=0,e=f.length;d
'+a.title+'×
'}},b),c.setup=function(){var d=c.setup;return function(){d.apply(c,arguments),c.$dropdown_header=a(b.html(b)),c.$dropdown.prepend(c.$dropdown_header)}}()}),w.define("optgroup_columns",function(b){var c=this;b=a.extend({equalizeWidth:!0,equalizeHeight:!0},b),this.getAdjacentOption=function(b,c){var d=b.closest("[data-group]").find("[data-selectable]"),e=d.index(b)+c;return e>=0&&e
',a=a.firstChild,c.body.appendChild(a),b=d.width=a.offsetWidth-a.clientWidth,c.body.removeChild(a)),b},e=function(){var e,f,g,h,i,j,k;if(k=a("[data-group]",c.$dropdown_content),(f=k.length)&&c.$dropdown_content.width()){if(b.equalizeHeight){for(g=0,e=0;e1&&(i=j-h*(f-1),k.eq(f-1).css({width:i})))}};(b.equalizeHeight||b.equalizeWidth)&&(m.after(this,"positionDropdown",e),m.after(this,"refreshOptions",e))}),w.define("remove_button",function(b){b=a.extend({label:"×",title:"Remove",className:"remove",append:!0},b);if("single"===this.settings.mode)return void function(b,c){c.className="remove-single";var d=b,e=''+c.label+"",f=function(b,c){return a("").append(b).append(c)};b.setup=function(){var g=d.setup;return function(){if(c.append){var h=a(d.$input.context).attr("id"),i=(a("#"+h),d.settings.render.item);d.settings.render.item=function(a){return f(i.apply(b,arguments),e)}}g.apply(b,arguments),b.$control.on("click","."+c.className,function(a){a.preventDefault(),d.isLocked||d.clear()})}}()}(this,b);!function(b,c){var d=b,e=''+c.label+"",f=function(a,b){var c=a.search(/(<\/[^>]+>\s*)$/);return a.substring(0,c)+b+a.substring(c)};b.setup=function(){var g=d.setup;return function(){if(c.append){var h=d.settings.render.item;d.settings.render.item=function(a){return f(h.apply(b,arguments),e)}}g.apply(b,arguments),b.$control.on("click","."+c.className,function(b){if(b.preventDefault(),!d.isLocked){var c=a(b.currentTarget).parent();d.setActiveItem(c),d.deleteSelection()&&d.setCaret(d.items.length)}})}}()}(this,b)}),w.define("restore_on_backspace",function(a){var b=this;a.text=a.text||function(a){return a[this.settings.labelField]},this.onKeyDown=function(){var c=b.onKeyDown;return function(b){var d,e;return 8===b.keyCode&&""===this.$control_input.val()&&!this.$activeItems.length&&(d=this.caretPos-1)>=0&&d + * @author Ris Adams + */ +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + define(['jquery'], factory); + } else if (typeof module === 'object' && typeof module.exports === 'object') { + module.exports = factory(require('jquery')); + } else { + root.Selectize = factory(root.jQuery); + } + }(this, function ($) { + 'use strict'; + var highlight=function(t,e){var r,a;if("string"!=typeof e||e.length)return r="string"==typeof e?new RegExp(e,"i"):e,a=function(t){var e=0;if(3===t.nodeType){var n,i,o=t.data.search(r);0<=o&&0/g,">").replace(/"/g,""")},escape_replace=function(t){return(t+"").replace(/\$/g,"$$$$")},hook={before:function(t,e,n){var i=t[e];t[e]=function(){return n.apply(t,arguments),i.apply(t,arguments)}},after:function(e,t,n){var i=e[t];e[t]=function(){var t=i.apply(e,arguments);return n.apply(e,arguments),t}}},once=function(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}},debounce=function(n,i){var o;return function(){var t=this,e=arguments;window.clearTimeout(o),o=window.setTimeout(function(){n.apply(t,e)},i)}},debounce_events=function(e,n,t){var i,o=e.trigger,s={};for(i in e.trigger=function(){var t=arguments[0];if(-1===n.indexOf(t))return o.apply(e,arguments);s[t]=arguments},t.apply(e,[]),e.trigger=o,s)s.hasOwnProperty(i)&&o.apply(e,s[i])},watchChildEvent=function(n,t,e,i){n.on(t,e,function(t){for(var e=t.target;e&&e.parentNode!==n[0];)e=e.parentNode;return t.currentTarget=e,i.apply(this,[t])})},getInputSelection=function(t){var e,n,i={};return void 0===t?console.warn("WARN getInputSelection cannot locate input control"):"selectionStart"in t?(i.start=t.selectionStart,i.length=t.selectionEnd-i.start):document.selection&&(t.focus(),e=document.selection.createRange(),n=document.selection.createRange().text.length,e.moveStart("character",-t.value.length),i.start=e.text.length-n,i.length=n),i},transferStyles=function(t,e,n){var i,o,s={};if(n)for(i=0,o=n.length;i").css({position:"absolute",width:"auto",padding:0,whiteSpace:"pre"}),$("
").css({position:"absolute",width:0,height:0,overflow:"hidden"}).append(Selectize.$testInput).appendTo("body")),Selectize.$testInput.text(t),transferStyles(e,Selectize.$testInput,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]),Selectize.$testInput.width()):0},autoGrow=function(s){function t(t,e){var n,i,o;e=e||{},(t=t||window.event||{}).metaKey||t.altKey||!e.force&&!1===s.data("grow")||(e=s.val(),t.type&&"keydown"===t.type.toLowerCase()&&(n=48<=(i=t.keyCode)&&i<=57||65<=i&&i<=90||96<=i&&i<=111||186<=i&&i<=222||32===i,i===KEY_DELETE||i===KEY_BACKSPACE?(o=getInputSelection(s[0])).length?e=e.substring(0,o.start)+e.substring(o.start+o.length):i===KEY_BACKSPACE&&o.start?e=e.substring(0,o.start-1)+e.substring(o.start+1):i===KEY_DELETE&&void 0!==o.start&&(e=e.substring(0,o.start)+e.substring(o.start+1)):n&&(i=t.shiftKey,o=String.fromCharCode(t.keyCode),e+=o=i?o.toUpperCase():o.toLowerCase())),t=(n=s.attr("placeholder"))?measureString(n,s)+4:0,(i=Math.max(measureString(e,s),t)+4)===r)||(r=i,s.width(i),s.triggerHandler("resize"))}var r=null;s.on("keydown keyup update blur",t),t()},domToString=function(t){var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML},logError=function(t,e){e=e||{};console.error("Selectize: "+t),e.explanation&&(console.group&&console.group(),console.error(e.explanation),console.group)&&console.groupEnd()},isJSON=function(t){try{JSON.parse(str)}catch(t){return!1}return!0},Selectize=function(t,e){var n,i,o=this,s=t[0],r=(s.selectize=o,window.getComputedStyle&&window.getComputedStyle(s,null));if(r=(r?r.getPropertyValue("direction"):s.currentStyle&&s.currentStyle.direction)||t.parents("[dir]:first").attr("dir")||"",$.extend(o,{order:0,settings:e,$input:t,tabIndex:t.attr("tabindex")||"",tagType:"select"===s.tagName.toLowerCase()?TAG_SELECT:TAG_INPUT,rtl:/rtl/i.test(r),eventNS:".selectize"+ ++Selectize.count,highlightedValue:null,isBlurring:!1,isOpen:!1,isDisabled:!1,isRequired:t.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",lastValidValue:"",lastOpenTarget:!1,caretPos:0,loading:0,loadedSearches:{},isDropdownClosing:!1,$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:null===e.loadThrottle?o.onSearchChange:debounce(o.onSearchChange,e.loadThrottle)}),o.sifter=new Sifter(this.options,{diacritics:e.diacritics}),o.settings.options){for(n=0,i=o.settings.options.length;n").addClass(t.wrapperClass).addClass(a+" selectize-control").addClass(r),p=$("
").addClass(t.inputClass+" selectize-input items").appendTo(l),c=$('').appendTo(p).attr("tabindex",s.is(":disabled")?"-1":e.tabIndex),u=$(t.dropdownParent||l),r=$("
").addClass(t.dropdownClass).addClass(r+" selectize-dropdown").hide().appendTo(u),u=$("
").addClass(t.dropdownContentClass+" selectize-dropdown-content").attr("tabindex","-1").appendTo(r),d=((d=s.attr("id"))&&(c.attr("id",d+"-selectized"),$("label[for='"+d+"']").attr("for",d+"-selectized")),e.settings.copyClassesToDropdown&&r.addClass(a),l.css({width:s[0].style.width}),e.plugins.names.length&&(d="plugin-"+e.plugins.names.join(" plugin-"),l.addClass(d),r.addClass(d)),(null===t.maxItems||1[data-selectable]",function(t){t.stopImmediatePropagation()}),r.on("mouseenter","[data-selectable]",function(){return e.onOptionHover.apply(e,arguments)}),r.on("mouseup click","[data-selectable]",function(){return e.onOptionSelect.apply(e,arguments)}),watchChildEvent(p,"mouseup","*:not(input)",function(){return e.onItemSelect.apply(e,arguments)}),autoGrow(c),p.on({mousedown:function(){return e.onMouseDown.apply(e,arguments)},click:function(){return e.onClick.apply(e,arguments)}}),c.on({mousedown:function(t){""===e.$control_input.val()&&!e.settings.openOnFocus||t.stopPropagation()},keydown:function(){return e.onKeyDown.apply(e,arguments)},keypress:function(){return e.onKeyPress.apply(e,arguments)},input:function(){return e.onInput.apply(e,arguments)},resize:function(){e.positionDropdown.apply(e,[])},focus:function(){return e.ignoreBlur=!1,e.onFocus.apply(e,arguments)},paste:function(){return e.onPaste.apply(e,arguments)}}),o.on("keydown"+n,function(t){e.isCmdDown=t[IS_MAC?"metaKey":"ctrlKey"],e.isCtrlDown=t[IS_MAC?"altKey":"ctrlKey"],e.isShiftDown=t.shiftKey}),o.on("keyup"+n,function(t){t.keyCode===KEY_CTRL&&(e.isCtrlDown=!1),t.keyCode===KEY_SHIFT&&(e.isShiftDown=!1),t.keyCode===KEY_CMD&&(e.isCmdDown=!1)}),o.on("mousedown"+n,function(t){if(e.isFocused){if(t.target===e.$dropdown[0]||t.target.parentNode===e.$dropdown[0])return!1;e.$dropdown.has(t.target).length||t.target===e.$control[0]||e.blur(t.target)}}),i.on(["scroll"+n,"resize"+n].join(" "),function(){e.isOpen&&e.positionDropdown.apply(e,arguments)}),i.on("mousemove"+n,function(){e.ignoreHover=e.settings.ignoreHover}),$("
")),a=s.children().detach();s.replaceWith(d),d.replaceWith(s),this.revertSettings={$children:a,tabindex:s.attr("tabindex")},s.attr("tabindex",-1).hide().after(e.$wrapper),Array.isArray(t.items)&&(e.lastValidValue=t.items,e.setValue(t.items),delete t.items),SUPPORTS_VALIDITY_API&&s.on("invalid"+n,function(t){t.preventDefault(),e.isInvalid=!0,e.refreshState()}),e.updateOriginalInput(),e.refreshItems(),e.refreshState(),e.updatePlaceholder(),e.isSetup=!0,s.is(":disabled")&&e.disable(),e.on("change",this.onChange),s.data("selectize",e),s.addClass("selectized"),e.trigger("initialize"),!0===t.preload&&e.onSearchChange("")},setupTemplates:function(){var t=this,i=t.settings.labelField,o=t.settings.valueField,n=t.settings.optgroupLabelField;t.settings.render=$.extend({},{optgroup:function(t){return'
'+t.html+"
"},optgroup_header:function(t,e){return'
'+e(t[n])+"
"},option:function(t,e){var n=t.classes?" "+t.classes:"";return n+=""===t[o]?" selectize-dropdown-emptyoptionlabel":"","'+e(t[i])+"
"},item:function(t,e){return'
'+e(t[i])+"
"},option_create:function(t,e){return'
Add '+e(t.input)+"
"}},t.settings.render)},setupCallbacks:function(){var t,e,n={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur",dropdown_item_activate:"onDropdownItemActivate",dropdown_item_deactivate:"onDropdownItemDeactivate"};for(t in n)n.hasOwnProperty(t)&&(e=this.settings[n[t]])&&this.on(t,e)},onClick:function(t){this.isDropdownClosing||this.isFocused&&this.isOpen||(this.focus(),t.preventDefault())},onMouseDown:function(t){var e=this,n=t.isDefaultPrevented();$(t.target);if(e.isFocused||n||window.setTimeout(function(){e.focus()},0),t.target!==e.$control_input[0]||""===e.$control_input.val())return"single"===e.settings.mode?e.isOpen?e.close():e.open():(n||e.setActiveItem(null),e.settings.openOnFocus||(e.isOpen&&t.target===e.lastOpenTarget?(e.close(),e.lastOpenTarget=!1):(e.isOpen||(e.refreshOptions(),e.open()),e.lastOpenTarget=t.target))),!1},onChange:function(){""!==this.getValue()&&(this.lastValidValue=this.getValue()),this.$input.trigger("input"),this.$input.trigger("change")},onPaste:function(t){var o=this;o.isFull()||o.isInputHidden||o.isLocked?t.preventDefault():o.settings.splitOn&&setTimeout(function(){var t=o.$control_input.val();if(t.match(o.settings.splitOn))for(var e=t.trim().split(o.settings.splitOn),n=0,i=e.length;n=this.settings.maxItems},updateOriginalInput:function(t){var e,n,i,o,s,r,a=this;t=t||{},a.tagType===TAG_SELECT?(o=a.$input.find("option"),e=[],n=[],i=[],r=[],o.get().forEach(function(t){e.push(t.value)}),a.items.forEach(function(t){s=a.options[t][a.settings.labelField]||"",r.push(t),-1==e.indexOf(t)&&n.push('")}),i=e.filter(function(t){return r.indexOf(t)<0}).map(function(t){return'option[value="'+t+'"]'}),e.length-i.length+n.length!==0||a.$input.attr("multiple")||n.push(''),a.$input.find(i.join(", ")).remove(),a.$input.append(n.join(""))):(a.$input.val(a.getValue()),a.$input.attr("value",a.$input.val())),a.isSetup&&!t.silent&&a.trigger("change",a.$input.val())},updatePlaceholder:function(){var t;this.settings.placeholder&&(t=this.$control_input,this.items.length?t.removeAttr("placeholder"):t.attr("placeholder",this.settings.placeholder),t.triggerHandler("update",{force:!0}))},open:function(){var t=this;t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.focus(),t.isOpen=!0,t.refreshState(),t.$dropdown.css({visibility:"hidden",display:"block"}),t.setupDropdownHeight(),t.positionDropdown(),t.$dropdown.css({visibility:"visible"}),t.trigger("dropdown_open",t.$dropdown))},close:function(){var t=this,e=t.isOpen;"single"===t.settings.mode&&t.items.length&&(t.hideInput(),t.isBlurring)&&t.$control_input[0].blur(),t.isOpen=!1,t.$dropdown.hide(),t.setActiveOption(null),t.refreshState(),e&&t.trigger("dropdown_close",t.$dropdown)},positionDropdown:function(){var t=this.$control,e="body"===this.settings.dropdownParent?t.offset():t.position(),t=(e.top+=t.outerHeight(!0),t[0].getBoundingClientRect().width);this.settings.minWidth&&this.settings.minWidth>t&&(t=this.settings.minWidth),this.$dropdown.css({width:t,top:e.top,left:e.left})},setupDropdownHeight:function(){if("object"==typeof this.settings.dropdownSize&&"auto"!==this.settings.dropdownSize.sizeType){var t=this.settings.dropdownSize.sizeValue;if("numberItems"===this.settings.dropdownSize.sizeType){for(var e=this.$dropdown_content.find("*").not(".optgroup, .highlight").not(this.settings.ignoreOnDropwdownHeight),n=0,i=0,o=0,s=0,r=0;r'+i+""+l)),{placeholder:n,options:[],optgroups:[],items:[]});if("select"===e)u(t,i);else{var o,s,r,a,l=t,p=i,n=l.attr(m);if(n)for(p.options=JSON.parse(n),o=0,s=p.options.length;owindow.innerHeight?o.top:o.bottom,i={width:t.outerWidth(),left:e.left};n===o.top?(n={bottom:e.top,top:"unset"},"body"===this.settings.dropdownParent&&(n.top=e.top-this.$dropdown.outerHeight(!0)-t.outerHeight(!0),n.bottom="unset"),Object.assign(i,n),this.$dropdown.addClass("selectize-position-top"),this.$control.addClass("selectize-position-top")):(Object.assign(i,{top:e.top,bottom:"unset"}),this.$dropdown.removeClass("selectize-position-top"),this.$control.removeClass("selectize-position-top")),this.$dropdown.css(i)}}),Selectize.define("auto_select_on_type",function(t){var n,i=this;i.onBlur=(n=i.onBlur,function(t){var e=i.getFirstItemMatchedByTextContent(i.lastValue,!0);return void 0!==e.attr("data-value")&&i.getValue()!==e.attr("data-value")&&i.setValue(e.attr("data-value")),n.apply(this,arguments)})}),Selectize.define("autofill_disable",function(t){var e,n=this;n.setup=(e=n.setup,function(){e.apply(n,arguments),n.$control_input.attr({autocomplete:"new-password",autofill:"no"})})}),Selectize.define("clear_button",function(e){var t,n=this;e=$.extend({title:"Clear",className:"clear",label:"×",html:function(t){return' '+t.label+""}},e),n.setup=(t=n.setup,function(){t.apply(n,arguments),n.$button_clear=$(e.html(e)),"single"===n.settings.mode&&n.$wrapper.addClass("single"),n.$wrapper.append(n.$button_clear),""!==n.getValue()&&0!==n.getValue().length||n.$wrapper.find("."+e.className).css("display","none"),n.on("change",function(){""===n.getValue()||0===n.getValue().length?n.$wrapper.find("."+e.className).css("display","none"):n.$wrapper.find("."+e.className).css("display","")}),n.$wrapper.on("click","."+e.className,function(t){t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),n.isLocked||(n.clear(),n.$wrapper.find("."+e.className).css("display","none"))})})}),Selectize.define("drag_drop",function(t){if(!$.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');var i,e,n,o;"multi"===this.settings.mode&&((i=this).lock=(e=i.lock,function(){var t=i.$control.data("sortable");return t&&t.disable(),e.apply(i,arguments)}),i.unlock=(n=i.unlock,function(){var t=i.$control.data("sortable");return t&&t.enable(),n.apply(i,arguments)}),i.setup=(o=i.setup,function(){o.apply(this,arguments);var n=i.$control.sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:i.isLocked,start:function(t,e){e.placeholder.css("width",e.helper.css("width")),n.addClass("dragging")},stop:function(){n.removeClass("dragging");var t=i.$activeItems?i.$activeItems.slice():null,e=[];n.children("[data-value]").each(function(){e.push($(this).attr("data-value"))}),i.isFocused=!1,i.setValue(e),i.isFocused=!0,i.setActiveItem(t),i.positionDropdown()}})}))}),Selectize.define("dropdown_header",function(t){var e,n=this;t=$.extend({title:"Untitled",headerClass:"selectize-dropdown-header",titleRowClass:"selectize-dropdown-header-title",labelClass:"selectize-dropdown-header-label",closeClass:"selectize-dropdown-header-close",html:function(t){return'
'+t.title+'×
'}},t),n.setup=(e=n.setup,function(){e.apply(n,arguments),n.$dropdown_header=$(t.html(t)),n.$dropdown.prepend(n.$dropdown_header),n.$dropdown_header.find("."+t.closeClass).on("click",function(){n.close()})})}),Selectize.define("optgroup_columns",function(r){function t(){var t,e,n,i,o=$("[data-group]",a.$dropdown_content),s=o.length;if(s&&a.$dropdown_content.width()){if(r.equalizeHeight){for(t=e=0;t
',t=t.firstChild,n.body.appendChild(t),e=l.width=t.offsetWidth-t.clientWidth,n.body.removeChild(t)),e});(r.equalizeHeight||r.equalizeWidth)&&(hook.after(this,"positionDropdown",t),hook.after(this,"refreshOptions",t))}),Selectize.define("remove_button",function(t){var s,e,n,i,r;"single"!==this.settings.mode&&(t=$.extend({label:"×",title:"Remove",className:"remove",append:!0},t),i=s=this,r=''+e.label+"",s.setup=(n=i.setup,function(){var o;e.append&&(o=i.settings.render.item,i.settings.render.item=function(t){return e=o.apply(s,arguments),n=r,i=e.search(/(<\/[^>]+>\s*)$/),e.substring(0,i)+n+e.substring(i);var e,n,i}),n.apply(s,arguments),s.$control.on("click","."+e.className,function(t){if(t.preventDefault(),!i.isLocked)return t=$(t.currentTarget).parent(),i.setActiveItem(t),i.deleteSelection()&&i.setCaret(i.items.length),!1})}))}),Selectize.define("restore_on_backspace",function(n){var i,t=this;n.text=n.text||function(t){return t[this.settings.labelField]},this.onKeyDown=(i=t.onKeyDown,function(t){var e;if(!(t.keyCode===KEY_BACKSPACE&&""===this.$control_input.val()&&!this.$activeItems.length&&0<=(e=this.caretPos-1)&&e"+(e.length-n)+""))}}}(),this.onFocus=function(){const e=t.onFocus;return function(t){e.apply(this,t),t&&((t=this.$control).find(".item").show(),t.find("span").remove())}}()}); + return Selectize; + })); From 15af22525f154b26a35c6cbb826461e191838046 Mon Sep 17 00:00:00 2001 From: Armand Tresova Date: Mon, 16 Dec 2024 13:29:53 -0500 Subject: [PATCH 04/17] Release v1.9.0 Prep --- CITATION.cff | 2 +- SECURITY.md | 3 +- composer.json | 2 +- includes/class.cooked-functions.php | 5 --- includes/class.cooked-taxonomies.php | 9 ++--- includes/widgets/recipe-list.php | 52 ++++++++++++++-------------- package.json | 2 +- readme.txt | 12 +++++-- templates/front/recipe-list.php | 2 +- 9 files changed, 43 insertions(+), 46 deletions(-) diff --git a/CITATION.cff b/CITATION.cff index bf559b0..1981a62 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -6,7 +6,7 @@ authors: given-names: Justin - family-names: Tresova given-names: Armand -version: 1.8.3 +version: 1.9.0 doi: 10.5281/zenodo.1171250 date-released: 2017-05-08 url: "https://github.com/XjSv/cooked" \ No newline at end of file diff --git a/SECURITY.md b/SECURITY.md index f7fe71b..69259a9 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -5,7 +5,8 @@ Versions that are currently being supported with security updates. | Version | Supported | | ------- | ------------------ | -| 1.8.9 | :white_check_mark: | +| 1.9.0 | :white_check_mark: | +| 1.8.9 | :x: | | 1.8.8 | :x: | | 1.8.7 | :x: | | 1.8.6 | :x: | diff --git a/composer.json b/composer.json index 5c93d36..ae186af 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "recipe" ], "homepage": "https://wordpress.org/plugins/cooked/", - "version": "1.8.9", + "version": "1.9.0", "type": "wordpress-plugin", "license": "GPL-3.0-or-later", "prefer-stable": true, diff --git a/includes/class.cooked-functions.php b/includes/class.cooked-functions.php index 1ce9e09..3d02a0e 100644 --- a/includes/class.cooked-functions.php +++ b/includes/class.cooked-functions.php @@ -227,9 +227,4 @@ function update_print_options( printOpt ) { } - public static function get_current_url() { - global $wp; - return home_url(add_query_arg([], $wp->request)); - } - } diff --git a/includes/class.cooked-taxonomies.php b/includes/class.cooked-taxonomies.php index 0dbc8ca..076ca1a 100644 --- a/includes/class.cooked-taxonomies.php +++ b/includes/class.cooked-taxonomies.php @@ -69,9 +69,7 @@ public static function get() { } public static function single_taxonomy_block( $term_id = false, $style = "block", $taxonomy = "cp_recipe_category" ) { - - if ( !$term_id ) - return; + if ( !$term_id ) return; $term = get_term( $term_id ); if ( !empty($term) ): @@ -88,12 +86,10 @@ public static function single_taxonomy_block( $term_id = false, $style = "block" endif; endif; - } public static function card( $term_id = false, $width = false, $hide_image = false, $hide_total = false, $style = false ) { - if ( !$term_id ) - return false; + if ( !$term_id ) return false; $term = get_term( $term_id ); if ( !empty($term) ): @@ -148,7 +144,6 @@ public static function card( $term_id = false, $width = false, $hide_image = fal endif; return false; - } public static function term_link_filter( $url, $term, $taxonomy ) { diff --git a/includes/widgets/recipe-list.php b/includes/widgets/recipe-list.php index e3e2dcf..e1254fb 100644 --- a/includes/widgets/recipe-list.php +++ b/includes/widgets/recipe-list.php @@ -3,10 +3,11 @@ class Cooked_Widget_Recipe_List extends WP_Widget { public function __construct() { - $widget_ops = array( + $widget_ops = [ 'classname' => 'cooked_widget_recipe_list', 'description' => 'Display a list of recipes.', - ); + ]; + parent::__construct( 'cooked_widget_recipe_list', 'Cooked - Recipe List', $widget_ops ); } @@ -17,29 +18,29 @@ public function widget( $args, $instance ) { echo wp_kses_post( $args['before_title'] ) . apply_filters( 'widget_title', $instance['title'] ) . wp_kses_post( $args['after_title'] ); } - $recipes = ( isset($instance['orderby']) && $instance['orderby'] == 'ids' && isset($instance['recipes']) && !empty($instance['recipes']) ? ' recipes="' . implode( ',', $instance['recipes'] ) . '"' : '' ); - $orderby = ( !$recipes && isset($instance['orderby']) && $instance['orderby'] ? ' orderby="' . esc_attr( $instance['orderby'] ) . '"' : '' ); - $show = ( !$recipes && isset($instance['show']) && $instance['show'] ? ' show="' . esc_attr( $instance['show'] ) . '"' : '' ); - $width = ( isset($instance['width']) && $instance['width'] ? ' width="' . esc_attr( $instance['width'] ) . '"' : '' ); - $hide_image = ( isset($instance['hide_image']) && $instance['hide_image'] ? ' hide_image="true"' : '' ); - $hide_author = ( isset($instance['hide_author']) && $instance['hide_author'] ? ' hide_author="true"' : '' ); + $recipes = isset($instance['orderby']) && $instance['orderby'] == 'ids' && isset($instance['recipes']) && !empty($instance['recipes']) ? ' recipes="' . implode( ',', $instance['recipes'] ) . '"' : ''; + $orderby = !$recipes && isset($instance['orderby']) && $instance['orderby'] ? ' orderby="' . esc_attr( $instance['orderby'] ) . '"' : ''; + $show = !$recipes && isset($instance['show']) && $instance['show'] ? ' show="' . esc_attr( $instance['show'] ) . '"' : ''; + $width = isset($instance['width']) && $instance['width'] ? ' width="' . esc_attr( $instance['width'] ) . '"' : ''; + $hide_image = isset($instance['hide_image']) && $instance['hide_image'] ? ' hide_image="true"' : ''; + $hide_author = isset($instance['hide_author']) && $instance['hide_author'] ? ' hide_author="true"' : ''; + echo do_shortcode( '[cooked-recipe-list' . wp_kses_post( $orderby . $show . $recipes . $width . $hide_image . $hide_author ) . ']' ); echo wp_kses_post( $args['after_widget'] ); } public function form( $instance ) { - - $title = ( !empty( $instance['title'] ) ? $instance['title'] : false ); - $orderby = ( !empty( $instance['orderby'] ) ? $instance['orderby'] : 'date' ); - $show = ( !empty( $instance['show'] ) ? $instance['show'] : 5 ); - $recipes = ( !empty( $instance['recipes'] ) ? $instance['recipes'] : '' ); - $width = ( !empty( $instance['width'] ) ? $instance['width'] : '100%' ); - $hide_image = ( isset( $instance['hide_image'] ) && $instance['hide_image'] ? true : false ); + $title = !empty( $instance['title'] ) ? $instance['title'] : false; + $orderby = !empty( $instance['orderby'] ) ? $instance['orderby'] : 'date'; + $show = !empty( $instance['show'] ) ? $instance['show'] : 5; + $recipes = !empty( $instance['recipes'] ) ? $instance['recipes'] : ''; + $width = !empty( $instance['width'] ) ? $instance['width'] : '100%'; + $hide_image = isset( $instance['hide_image'] ) && $instance['hide_image'] ? true : false; $hide_author = ( isset( $instance['hide_author'] ) && $instance['hide_author'] ? true : false ); - $recipes_style = ( $orderby == 'date' ? ' style="display:none;' : '' ); - $show_style = ( $orderby == 'ids' ? ' style="display:none;' : '' ); + $recipes_style = $orderby == 'date' ? ' style="display:none;' : ''; + $show_style = $orderby == 'ids' ? ' style="display:none;' : ''; ?> @@ -97,15 +98,14 @@ public function form( $instance ) { } public function update( $new_instance, $old_instance ) { - - $instance = array(); - $instance['title'] = ( !empty( $new_instance['title'] ) ? wp_strip_all_tags( $new_instance['title'] ) : '' ); - $instance['orderby'] = ( !empty( $new_instance['orderby'] ) ? wp_strip_all_tags( $new_instance['orderby'] ) : 'date' ); - $instance['width'] = ( !empty( $new_instance['width'] ) ? wp_strip_all_tags( $new_instance['width'] ) : '100%' ); - $instance['show'] = ( !empty( $new_instance['show'] ) ? wp_strip_all_tags( $new_instance['show'] ) : 5 ); - $instance['recipes'] = ( !empty( $new_instance['recipes'] ) ? $new_instance['recipes'] : '' ); - $instance['hide_image'] = ( !empty( $new_instance['hide_image'] ) ? wp_strip_all_tags( $new_instance['hide_image'] ) : false ); - $instance['hide_author'] = ( !empty( $new_instance['hide_author'] ) ? wp_strip_all_tags( $new_instance['hide_author'] ) : false ); + $instance = []; + $instance['title'] = !empty( $new_instance['title'] ) ? wp_strip_all_tags( $new_instance['title'] ) : ''; + $instance['orderby'] = !empty( $new_instance['orderby'] ) ? wp_strip_all_tags( $new_instance['orderby'] ) : 'date'; + $instance['width'] = !empty( $new_instance['width'] ) ? wp_strip_all_tags( $new_instance['width'] ) : '100%'; + $instance['show'] = !empty( $new_instance['show'] ) ? wp_strip_all_tags( $new_instance['show'] ) : 5; + $instance['recipes'] = !empty( $new_instance['recipes'] ) ? $new_instance['recipes'] : ''; + $instance['hide_image'] = !empty( $new_instance['hide_image'] ) ? wp_strip_all_tags( $new_instance['hide_image'] ) : false; + $instance['hide_author'] = !empty( $new_instance['hide_author'] ) ? wp_strip_all_tags( $new_instance['hide_author'] ) : false; return $instance; } diff --git a/package.json b/package.json index 55601b0..44d7109 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cooked", - "version": "1.8.9", + "version": "1.9.0", "description": "Cooked is the absolute best way to create & display recipes with WordPress. SEO optimized (rich snippets), galleries, cooking timers, printable recipes and much more.", "main": "index.js", "scripts": { diff --git a/readme.txt b/readme.txt index 5121c02..189e68f 100644 --- a/readme.txt +++ b/readme.txt @@ -2,8 +2,8 @@ Contributors: xjsv, boxystudio Tags: recipe, recipes, food, cooking, nutrition Requires at least: 4.7 -Tested up to: 6.7 -Stable tag: 1.8.9 +Tested up to: 6.7.1 +Stable tag: 1.9.0 Requires PHP: 7.4 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -76,10 +76,16 @@ Be sure to check the [Cooked Documentation](https://github.com/XjSv/Cooked/wiki) == Upgrade Notice == -Version 1.8.9 includes improvements to translation handling and a fix for incorrect textdomain loading when using Loco Translate. +Version 1.8.10 includes improvements to translation handling and a fix for incorrect textdomain loading when using Loco Translate. == Changelog == += 1.9.0 = +* **TWEAK:** Updated the Drag & Drop library to the latest version. +* **FIX:** Fixed issue preventing users from adding or editing links within recipe direction text areas. +* **NEW:** Added pretty URL's to the Browse Recipe page when searching and filtering recipes. +* **FIX:** Fixed issue with the recipe search when filters are applied. + = 1.8.9 = * **NEW:** Improved SEO by dynamically updating the canonical URL on the Browse Recipe page to match active category/tag filters. Supports Rank Math SEO and Yoast SEO. * **TWEAK:** Enhanced translation handling to better support custom language files and prevent conflicts. diff --git a/templates/front/recipe-list.php b/templates/front/recipe-list.php index 69347c5..a111fff 100644 --- a/templates/front/recipe-list.php +++ b/templates/front/recipe-list.php @@ -50,7 +50,7 @@ endif; if ( isset( $recipe_args['tax_query'][0]['terms'][0] ) ): - switch( $recipe_args['tax_query'][0]['taxonomy'] ): + switch ( $recipe_args['tax_query'][0]['taxonomy'] ): case 'cp_recipe_category': $shortcode = 'categories'; break; From cd22143e347e158d1a3e6b135696477eb4189f7d Mon Sep 17 00:00:00 2001 From: Armand Tresova Date: Mon, 16 Dec 2024 13:32:06 -0500 Subject: [PATCH 05/17] Release v1.9.0 Prep --- composer.lock | 2 +- languages/cooked.po | 396 ++++++------ languages/cooked.pot | 400 ++++++------ package-lock.json | 1082 ++++++++++++++++++--------------- vendor/composer/installed.php | 8 +- 5 files changed, 984 insertions(+), 904 deletions(-) diff --git a/composer.lock b/composer.lock index 3680520..49100a7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d87435867fa2441c8dfe23b914fc4592", + "content-hash": "c124dd25ca026690af382086abb20239", "packages": [ { "name": "nxp/math-executor", diff --git a/languages/cooked.po b/languages/cooked.po index 23c9410..d6dcd6d 100644 --- a/languages/cooked.po +++ b/languages/cooked.po @@ -36,75 +36,75 @@ msgstr "" msgid "https://goratech.dev" msgstr "" -#: includes/class.cooked-admin-enqueues.php:127 +#: includes/class.cooked-admin-enqueues.php:137 msgid "remaining" msgstr "" -#: includes/class.cooked-admin-enqueues.php:128 -#: includes/class.cooked-recipe-meta.php:616 -#: includes/class.cooked-recipe-meta.php:664 -#: includes/class.cooked-recipe-meta.php:705 +#: includes/class.cooked-admin-enqueues.php:138 +#: includes/class.cooked-recipe-meta.php:614 +#: includes/class.cooked-recipe-meta.php:647 +#: includes/class.cooked-recipe-meta.php:674 msgid "Add Image" msgstr "" -#: includes/class.cooked-admin-enqueues.php:129 -#: includes/class.cooked-recipe-meta.php:616 +#: includes/class.cooked-admin-enqueues.php:139 +#: includes/class.cooked-recipe-meta.php:614 msgid "Change Image" msgstr "" -#: includes/class.cooked-admin-enqueues.php:130 +#: includes/class.cooked-admin-enqueues.php:140 msgid "Use this Image" msgstr "" -#: includes/class.cooked-admin-enqueues.php:131 -#: includes/class.cooked-recipe-meta.php:915 +#: includes/class.cooked-admin-enqueues.php:141 +#: includes/class.cooked-recipe-meta.php:884 msgid "Add to Gallery" msgstr "" -#: includes/class.cooked-admin-enqueues.php:132 +#: includes/class.cooked-admin-enqueues.php:142 msgid "Edit Gallery Item" msgstr "" -#: includes/class.cooked-admin-enqueues.php:133 +#: includes/class.cooked-admin-enqueues.php:143 msgid "Update Gallery Item" msgstr "" -#: includes/class.cooked-admin-enqueues.php:134 +#: includes/class.cooked-admin-enqueues.php:144 msgid "Saved" msgstr "" -#: includes/class.cooked-admin-enqueues.php:135 +#: includes/class.cooked-admin-enqueues.php:145 msgid "Applied" msgstr "" -#: includes/class.cooked-admin-enqueues.php:136 +#: includes/class.cooked-admin-enqueues.php:146 msgid "Are you sure you want to apply this new template to all of your recipes?" msgstr "" -#: includes/class.cooked-admin-enqueues.php:137 +#: includes/class.cooked-admin-enqueues.php:147 msgid "Are you sure you want to reset this recipe template to the Cooked plugin default?" msgstr "" #. translators: confirmation for migrating all ### recipes, where ### displays the total number for the migration. -#: includes/class.cooked-admin-enqueues.php:139 +#: includes/class.cooked-admin-enqueues.php:149 msgid "Please confirm that you are ready to migrate all %s recipes." msgstr "" -#: includes/class.cooked-admin-enqueues.php:140 +#: includes/class.cooked-admin-enqueues.php:150 msgid "Please confirm that you are ready to import all recipes." msgstr "" #: includes/class.cooked-admin-menus.php:34 #: includes/class.cooked-admin-menus.php:57 -#: includes/class.cooked-post-types.php:352 -#: includes/class.cooked-post-types.php:364 +#: includes/class.cooked-post-types.php:457 +#: includes/class.cooked-post-types.php:469 #: includes/class.cooked-users.php:125 msgid "Recipes" msgstr "" #: includes/class.cooked-admin-menus.php:35 #: includes/class.cooked-admin-menus.php:59 -#: includes/class.cooked-post-types.php:354 +#: includes/class.cooked-post-types.php:459 msgid "Add New" msgstr "" @@ -112,7 +112,7 @@ msgstr "" #: includes/class.cooked-admin-menus.php:43 #: includes/class.cooked-admin-menus.php:63 #: includes/class.cooked-recipe-meta.php:95 -#: includes/class.cooked-shortcodes.php:106 +#: includes/class.cooked-shortcodes.php:138 #: templates/admin/welcome.php:18 msgid "Settings" msgstr "" @@ -131,7 +131,7 @@ msgid "Upgrade to Pro" msgstr "" #: includes/class.cooked-admin-menus.php:58 -#: includes/class.cooked-post-types.php:359 +#: includes/class.cooked-post-types.php:464 msgid "All Recipes" msgstr "" @@ -146,8 +146,8 @@ msgstr "" #: includes/class.cooked-functions.php:127 #: includes/class.cooked-recipe-meta.php:135 #: includes/class.cooked-recipe-meta.php:221 -#: includes/class.cooked-recipe-meta.php:993 -#: includes/class.cooked-recipes.php:636 +#: includes/class.cooked-recipe-meta.php:962 +#: includes/class.cooked-recipes.php:639 #: templates/front/recipe.php:34 msgid "Ingredients" msgstr "" @@ -156,8 +156,8 @@ msgstr "" #: includes/class.cooked-functions.php:128 #: includes/class.cooked-recipe-meta.php:135 #: includes/class.cooked-recipe-meta.php:227 -#: includes/class.cooked-recipe-meta.php:1024 -#: includes/class.cooked-recipes.php:640 +#: includes/class.cooked-recipe-meta.php:993 +#: includes/class.cooked-recipes.php:643 #: templates/front/recipe.php:35 msgid "Directions" msgstr "" @@ -168,7 +168,7 @@ msgid "Error importing recipe." msgstr "" #: includes/class.cooked-enqueues.php:35 -#: includes/class.cooked-recipe-meta.php:1239 +#: includes/class.cooked-recipe-meta.php:1208 msgid "Timer" msgstr "" @@ -194,7 +194,7 @@ msgid "Information" msgstr "" #: includes/class.cooked-functions.php:125 -#: includes/class.cooked-recipe-meta.php:1184 +#: includes/class.cooked-recipe-meta.php:1153 #: includes/class.cooked-settings.php:170 msgid "Excerpt" msgstr "" @@ -204,10 +204,10 @@ msgid "Images" msgstr "" #: includes/class.cooked-functions.php:129 -#: includes/class.cooked-recipe-meta.php:1208 -#: includes/class.cooked-recipes.php:643 +#: includes/class.cooked-recipe-meta.php:1177 +#: includes/class.cooked-recipes.php:646 #: includes/class.cooked-settings.php:171 -#: includes/class.cooked-shortcodes.php:712 +#: includes/class.cooked-shortcodes.php:744 msgid "Notes" msgstr "" @@ -835,47 +835,47 @@ msgstr "" msgid "Photo" msgstr "" -#: includes/class.cooked-post-types.php:334 +#: includes/class.cooked-post-types.php:439 msgid "Recipe Archive" msgstr "" -#: includes/class.cooked-post-types.php:353 +#: includes/class.cooked-post-types.php:458 msgid "Recipe" msgstr "" -#: includes/class.cooked-post-types.php:355 +#: includes/class.cooked-post-types.php:460 msgid "Add New Recipe" msgstr "" -#: includes/class.cooked-post-types.php:356 +#: includes/class.cooked-post-types.php:461 msgid "New Recipe" msgstr "" -#: includes/class.cooked-post-types.php:357 +#: includes/class.cooked-post-types.php:462 msgid "Edit Recipe" msgstr "" -#: includes/class.cooked-post-types.php:358 +#: includes/class.cooked-post-types.php:463 msgid "View Recipe" msgstr "" -#: includes/class.cooked-post-types.php:360 +#: includes/class.cooked-post-types.php:465 msgid "Search Recipes" msgstr "" -#: includes/class.cooked-post-types.php:361 +#: includes/class.cooked-post-types.php:466 msgid "No recipes found." msgstr "" -#: includes/class.cooked-post-types.php:362 +#: includes/class.cooked-post-types.php:467 msgid "No recipes found in trash." msgstr "" -#: includes/class.cooked-post-types.php:390 +#: includes/class.cooked-post-types.php:495 msgid "Recipe title ..." msgstr "" -#: includes/class.cooked-post-types.php:408 +#: includes/class.cooked-post-types.php:513 msgid "Cooked Browse Recipes Page" msgstr "" @@ -901,7 +901,7 @@ msgid "Layout" msgstr "" #: includes/class.cooked-recipe-meta.php:239 -#: includes/class.cooked-recipe-meta.php:1105 +#: includes/class.cooked-recipe-meta.php:1074 msgid "Gallery" msgstr "" @@ -954,367 +954,367 @@ msgstr "" msgid "Using the built-in recipe shortcodes found on the \"Shortcodes\" tab, you can create the layout of your recipe below. Use the \"Save as Default\" button to save your template." msgstr "" -#: includes/class.cooked-recipe-meta.php:347 +#: includes/class.cooked-recipe-meta.php:346 msgid "Recipe Excerpt" msgstr "" -#: includes/class.cooked-recipe-meta.php:347 +#: includes/class.cooked-recipe-meta.php:346 msgid "The excerpt is used on recipe listing templates, where the full recipe should not be displayed." msgstr "" -#: includes/class.cooked-recipe-meta.php:370 +#: includes/class.cooked-recipe-meta.php:369 msgid "SEO Description" msgstr "" -#: includes/class.cooked-recipe-meta.php:370 +#: includes/class.cooked-recipe-meta.php:369 msgid "This description is used for SEO purposes and is optional. By default, Cooked will use the Recipe Excerpt above if available or the Recipe Title if not." msgstr "" -#: includes/class.cooked-recipe-meta.php:381 +#: includes/class.cooked-recipe-meta.php:380 #: includes/class.cooked-settings.php:169 msgid "Difficulty Level" msgstr "" -#: includes/class.cooked-recipe-meta.php:390 -#: includes/class.cooked-recipe-meta.php:967 +#: includes/class.cooked-recipe-meta.php:389 +#: includes/class.cooked-recipe-meta.php:936 #: includes/class.cooked-settings.php:172 -#: includes/class.cooked-shortcodes.php:401 -#: includes/class.cooked-shortcodes.php:609 +#: includes/class.cooked-shortcodes.php:433 +#: includes/class.cooked-shortcodes.php:641 msgid "Prep Time" msgstr "" -#: includes/class.cooked-recipe-meta.php:392 -#: includes/class.cooked-recipe-meta.php:397 -#: includes/class.cooked-recipe-meta.php:402 +#: includes/class.cooked-recipe-meta.php:391 +#: includes/class.cooked-recipe-meta.php:396 +#: includes/class.cooked-recipe-meta.php:401 msgid "minutes" msgstr "" -#: includes/class.cooked-recipe-meta.php:395 -#: includes/class.cooked-recipe-meta.php:968 +#: includes/class.cooked-recipe-meta.php:394 +#: includes/class.cooked-recipe-meta.php:937 #: includes/class.cooked-settings.php:173 -#: includes/class.cooked-shortcodes.php:402 -#: includes/class.cooked-shortcodes.php:618 +#: includes/class.cooked-shortcodes.php:434 +#: includes/class.cooked-shortcodes.php:650 msgid "Cook Time" msgstr "" -#: includes/class.cooked-recipe-meta.php:400 -#: includes/class.cooked-recipe-meta.php:969 +#: includes/class.cooked-recipe-meta.php:399 +#: includes/class.cooked-recipe-meta.php:938 #: includes/class.cooked-settings.php:174 -#: includes/class.cooked-shortcodes.php:403 -#: includes/class.cooked-shortcodes.php:629 -#: includes/class.cooked-shortcodes.php:636 +#: includes/class.cooked-shortcodes.php:435 +#: includes/class.cooked-shortcodes.php:661 +#: includes/class.cooked-shortcodes.php:668 msgid "Total Time" msgstr "" -#: includes/class.cooked-recipe-meta.php:408 +#: includes/class.cooked-recipe-meta.php:407 msgid "Recipe Notes" msgstr "" -#: includes/class.cooked-recipe-meta.php:408 +#: includes/class.cooked-recipe-meta.php:407 msgid "The notes are displayed in the recipe." msgstr "" -#: includes/class.cooked-recipe-meta.php:434 +#: includes/class.cooked-recipe-meta.php:432 msgid "Amount" msgstr "" -#: includes/class.cooked-recipe-meta.php:435 +#: includes/class.cooked-recipe-meta.php:433 msgid "Measurement" msgstr "" -#: includes/class.cooked-recipe-meta.php:436 +#: includes/class.cooked-recipe-meta.php:434 msgid "Item" msgstr "" -#: includes/class.cooked-recipe-meta.php:473 -#: includes/class.cooked-recipe-meta.php:524 -#: includes/class.cooked-recipe-meta.php:571 +#: includes/class.cooked-recipe-meta.php:471 +#: includes/class.cooked-recipe-meta.php:522 +#: includes/class.cooked-recipe-meta.php:569 msgid "ex. Eggs, Milk, etc." msgstr "" -#: includes/class.cooked-recipe-meta.php:487 -#: includes/class.cooked-recipe-meta.php:582 -#: includes/class.cooked-recipe-meta.php:647 -#: includes/class.cooked-recipe-meta.php:718 +#: includes/class.cooked-recipe-meta.php:485 +#: includes/class.cooked-recipe-meta.php:580 +#: includes/class.cooked-recipe-meta.php:630 +#: includes/class.cooked-recipe-meta.php:687 msgid "Section Heading" msgstr "" -#: includes/class.cooked-recipe-meta.php:541 +#: includes/class.cooked-recipe-meta.php:539 msgid "Add Ingredient" msgstr "" -#: includes/class.cooked-recipe-meta.php:542 -#: includes/class.cooked-recipe-meta.php:697 +#: includes/class.cooked-recipe-meta.php:540 +#: includes/class.cooked-recipe-meta.php:666 msgid "Add Section Heading" msgstr "" -#: includes/class.cooked-recipe-meta.php:696 +#: includes/class.cooked-recipe-meta.php:665 msgid "Add Direction" msgstr "" -#: includes/class.cooked-recipe-meta.php:731 +#: includes/class.cooked-recipe-meta.php:700 msgid "Nutrition Information" msgstr "" -#: includes/class.cooked-recipe-meta.php:769 -#: includes/class.cooked-shortcodes.php:997 +#: includes/class.cooked-recipe-meta.php:738 +#: includes/class.cooked-shortcodes.php:1029 msgid "Nutrition Facts" msgstr "" -#: includes/class.cooked-recipe-meta.php:787 -#: includes/class.cooked-shortcodes.php:965 +#: includes/class.cooked-recipe-meta.php:756 +#: includes/class.cooked-shortcodes.php:997 msgid "Amount per serving" msgstr "" -#: includes/class.cooked-recipe-meta.php:797 -#: includes/class.cooked-shortcodes.php:975 +#: includes/class.cooked-recipe-meta.php:766 +#: includes/class.cooked-shortcodes.php:1007 msgid "% Daily Value *" msgstr "" -#: includes/class.cooked-recipe-meta.php:816 -#: includes/class.cooked-shortcodes.php:907 +#: includes/class.cooked-recipe-meta.php:785 +#: includes/class.cooked-shortcodes.php:939 msgid "Includes" msgstr "" -#: includes/class.cooked-recipe-meta.php:848 -#: includes/class.cooked-shortcodes.php:1001 +#: includes/class.cooked-recipe-meta.php:817 +#: includes/class.cooked-shortcodes.php:1033 msgid "The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice." msgstr "" -#: includes/class.cooked-recipe-meta.php:864 +#: includes/class.cooked-recipe-meta.php:833 msgid "Recipe Gallery Type" msgstr "" -#: includes/class.cooked-recipe-meta.php:877 +#: includes/class.cooked-recipe-meta.php:846 msgid "Choose one..." msgstr "" #. translators: a title for the video section of the recipe editor, where users can paste a YouToub or Vimeo URL into the field below. -#: includes/class.cooked-recipe-meta.php:891 +#: includes/class.cooked-recipe-meta.php:860 msgid "%1$s or %2$s Video" msgstr "" #. translators: a message describing how to display a video from YouTube or Vimeo. -#: includes/class.cooked-recipe-meta.php:895 +#: includes/class.cooked-recipe-meta.php:864 msgid "If you would like to display a video as the first item in your gallery, you can paste a valid %1$s or %2$s URL below." msgstr "" -#: includes/class.cooked-recipe-meta.php:900 +#: includes/class.cooked-recipe-meta.php:869 msgid "Gallery Items" msgstr "" -#: includes/class.cooked-recipe-meta.php:931 +#: includes/class.cooked-recipe-meta.php:900 msgid "Recipe Information" msgstr "" -#: includes/class.cooked-recipe-meta.php:932 +#: includes/class.cooked-recipe-meta.php:901 msgid "This will display the recipe author, cooking times, etc." msgstr "" #. translators: "include and exclude" section title #. translators: "left and right" section title -#: includes/class.cooked-recipe-meta.php:941 -#: includes/class.cooked-recipe-meta.php:951 +#: includes/class.cooked-recipe-meta.php:910 +#: includes/class.cooked-recipe-meta.php:920 msgid "\"%1$s\" and \"%2$s\"" msgstr "" -#: includes/class.cooked-recipe-meta.php:943 +#: includes/class.cooked-recipe-meta.php:912 msgid "This will allow you to include or exclude content from the shortcode output." msgstr "" -#: includes/class.cooked-recipe-meta.php:952 +#: includes/class.cooked-recipe-meta.php:921 msgid "Used like \"include\", but will position the content to the left or right." msgstr "" -#: includes/class.cooked-recipe-meta.php:962 +#: includes/class.cooked-recipe-meta.php:931 +#: includes/class.cooked-recipe-meta.php:977 #: includes/class.cooked-recipe-meta.php:1008 -#: includes/class.cooked-recipe-meta.php:1039 -#: includes/class.cooked-recipe-meta.php:1064 -#: includes/class.cooked-recipe-meta.php:1088 -#: includes/class.cooked-recipe-meta.php:1148 -#: includes/class.cooked-recipe-meta.php:1193 -#: includes/class.cooked-recipe-meta.php:1223 -#: includes/class.cooked-recipe-meta.php:1268 +#: includes/class.cooked-recipe-meta.php:1033 +#: includes/class.cooked-recipe-meta.php:1057 +#: includes/class.cooked-recipe-meta.php:1117 +#: includes/class.cooked-recipe-meta.php:1162 +#: includes/class.cooked-recipe-meta.php:1192 +#: includes/class.cooked-recipe-meta.php:1237 msgid "Available Variables" msgstr "" -#: includes/class.cooked-recipe-meta.php:966 +#: includes/class.cooked-recipe-meta.php:935 #: includes/class.cooked-settings.php:167 -#: includes/class.cooked-shortcodes.php:398 -#: includes/class.cooked-shortcodes.php:563 +#: includes/class.cooked-shortcodes.php:430 +#: includes/class.cooked-shortcodes.php:595 msgid "Author" msgstr "" -#: includes/class.cooked-recipe-meta.php:970 -#: includes/class.cooked-shortcodes.php:399 -#: includes/class.cooked-shortcodes.php:574 +#: includes/class.cooked-recipe-meta.php:939 +#: includes/class.cooked-shortcodes.php:431 +#: includes/class.cooked-shortcodes.php:606 msgid "Difficulty" msgstr "" -#: includes/class.cooked-recipe-meta.php:971 +#: includes/class.cooked-recipe-meta.php:940 msgid "Servings Switcher" msgstr "" -#: includes/class.cooked-recipe-meta.php:972 +#: includes/class.cooked-recipe-meta.php:941 #: includes/class.cooked-settings.php:168 -#: includes/class.cooked-shortcodes.php:656 -#: includes/class.cooked-shortcodes.php:659 +#: includes/class.cooked-shortcodes.php:688 +#: includes/class.cooked-shortcodes.php:691 #: includes/class.cooked-taxonomies.php:39 msgid "Category" msgstr "" -#: includes/class.cooked-recipe-meta.php:973 +#: includes/class.cooked-recipe-meta.php:942 msgid "Print Mode" msgstr "" -#: includes/class.cooked-recipe-meta.php:974 +#: includes/class.cooked-recipe-meta.php:943 msgid "Full-Screen Mode" msgstr "" -#: includes/class.cooked-recipe-meta.php:994 +#: includes/class.cooked-recipe-meta.php:963 msgid "This will display the list of ingredients, added via the \"Ingredients\" tab." msgstr "" -#: includes/class.cooked-recipe-meta.php:1000 +#: includes/class.cooked-recipe-meta.php:969 msgid "This will allow you to hide or show the checkboxes:" msgstr "" -#: includes/class.cooked-recipe-meta.php:1010 +#: includes/class.cooked-recipe-meta.php:979 msgid "Show checkboxes" msgstr "" -#: includes/class.cooked-recipe-meta.php:1011 +#: includes/class.cooked-recipe-meta.php:980 msgid "Hide checkboxes" msgstr "" -#: includes/class.cooked-recipe-meta.php:1025 +#: includes/class.cooked-recipe-meta.php:994 msgid "This will display the list of directions, added via the \"Directions\" tab." msgstr "" -#: includes/class.cooked-recipe-meta.php:1031 +#: includes/class.cooked-recipe-meta.php:1000 msgid "This will allow you to hide or show the numbers:" msgstr "" -#: includes/class.cooked-recipe-meta.php:1041 +#: includes/class.cooked-recipe-meta.php:1010 msgid "Show numbers" msgstr "" -#: includes/class.cooked-recipe-meta.php:1042 +#: includes/class.cooked-recipe-meta.php:1011 msgid "Hide numbers" msgstr "" -#: includes/class.cooked-recipe-meta.php:1055 +#: includes/class.cooked-recipe-meta.php:1024 msgid "Featured Image" msgstr "" -#: includes/class.cooked-recipe-meta.php:1056 +#: includes/class.cooked-recipe-meta.php:1025 msgid "This will display the featured image, if one is set." msgstr "" -#: includes/class.cooked-recipe-meta.php:1066 -#: includes/class.cooked-recipe-meta.php:1090 -#: includes/class.cooked-recipe-meta.php:1195 +#: includes/class.cooked-recipe-meta.php:1035 +#: includes/class.cooked-recipe-meta.php:1059 +#: includes/class.cooked-recipe-meta.php:1164 msgid "None" msgstr "" -#: includes/class.cooked-recipe-meta.php:1079 +#: includes/class.cooked-recipe-meta.php:1048 msgid "Nutrition Label" msgstr "" -#: includes/class.cooked-recipe-meta.php:1080 +#: includes/class.cooked-recipe-meta.php:1049 msgid "This will display the Nutrition Facts label, if data is present." msgstr "" -#: includes/class.cooked-recipe-meta.php:1106 +#: includes/class.cooked-recipe-meta.php:1075 msgid "This will display the gallery, if one is set or created from the \"Gallery\" tab." msgstr "" -#: includes/class.cooked-recipe-meta.php:1114 +#: includes/class.cooked-recipe-meta.php:1083 msgid "Set the width of the gallery." msgstr "" -#: includes/class.cooked-recipe-meta.php:1121 +#: includes/class.cooked-recipe-meta.php:1090 msgid "Set the image size ratio." msgstr "" -#: includes/class.cooked-recipe-meta.php:1131 +#: includes/class.cooked-recipe-meta.php:1100 msgid "Set the navigation style." msgstr "" -#: includes/class.cooked-recipe-meta.php:1138 +#: includes/class.cooked-recipe-meta.php:1107 msgid "Enable or disable \"Full-Screen\" mode." msgstr "" #. translators: related to the width of slideshows: "80% or 300px" section title -#: includes/class.cooked-recipe-meta.php:1153 +#: includes/class.cooked-recipe-meta.php:1122 msgid "ex: \"%1$s\" or \"%2$s\"" msgstr "" #. translators: related to the image ratio for slideshows: "ex: 800/600" section title -#: includes/class.cooked-recipe-meta.php:1158 +#: includes/class.cooked-recipe-meta.php:1127 msgid "ex: \"%s\"" msgstr "" #. translators: related to the navigation style for slideshows: "dots, thumbs or false" section title -#: includes/class.cooked-recipe-meta.php:1163 +#: includes/class.cooked-recipe-meta.php:1132 msgid "\"%1$s\", \"%2$s\", or \"%3$s\"" msgstr "" #. translators: related to allowing full screen for slideshows: "true or false" section title -#: includes/class.cooked-recipe-meta.php:1168 +#: includes/class.cooked-recipe-meta.php:1137 msgid "\"%1$s\" or \"%2$s\"" msgstr "" -#: includes/class.cooked-recipe-meta.php:1185 +#: includes/class.cooked-recipe-meta.php:1154 msgid "This will display the excerpt, if one is available from the \"Layout & Content\" tab." msgstr "" -#: includes/class.cooked-recipe-meta.php:1209 +#: includes/class.cooked-recipe-meta.php:1178 msgid "This will display the notes, if one is available from the \"Layout & Content\" tab." msgstr "" -#: includes/class.cooked-recipe-meta.php:1215 +#: includes/class.cooked-recipe-meta.php:1184 msgid "This will allow you to hide or show the header for the notes section:" msgstr "" -#: includes/class.cooked-recipe-meta.php:1225 +#: includes/class.cooked-recipe-meta.php:1194 msgid "Show header" msgstr "" -#: includes/class.cooked-recipe-meta.php:1226 +#: includes/class.cooked-recipe-meta.php:1195 msgid "Hide header" msgstr "" -#: includes/class.cooked-recipe-meta.php:1240 +#: includes/class.cooked-recipe-meta.php:1209 msgid "This will display a special link to start a cooking timer." msgstr "" #. translators: "seconds, minutes and hours" section title -#: includes/class.cooked-recipe-meta.php:1249 +#: includes/class.cooked-recipe-meta.php:1218 msgid "\"%1$s\", \"%2$s\" and \"%3$s\"" msgstr "" -#: includes/class.cooked-recipe-meta.php:1251 +#: includes/class.cooked-recipe-meta.php:1220 msgid "Use just one or a combination of all three to set the timer length" msgstr "" -#: includes/class.cooked-recipe-meta.php:1258 +#: includes/class.cooked-recipe-meta.php:1227 msgid "Add a short description for this timer, if applicable." msgstr "" -#: includes/class.cooked-recipe-meta.php:1270 +#: includes/class.cooked-recipe-meta.php:1239 msgid "Time in seconds" msgstr "" -#: includes/class.cooked-recipe-meta.php:1271 +#: includes/class.cooked-recipe-meta.php:1240 msgid "Time in minutes" msgstr "" -#: includes/class.cooked-recipe-meta.php:1272 +#: includes/class.cooked-recipe-meta.php:1241 msgid "Time in hours" msgstr "" -#: includes/class.cooked-recipe-meta.php:1273 +#: includes/class.cooked-recipe-meta.php:1242 msgid "Timer Description" msgstr "" @@ -1331,123 +1331,123 @@ msgstr "" msgid "All %s" msgstr "" -#: includes/class.cooked-recipes.php:651 +#: includes/class.cooked-recipes.php:654 msgid "Beginner" msgstr "" -#: includes/class.cooked-recipes.php:652 +#: includes/class.cooked-recipes.php:655 msgid "Intermediate" msgstr "" -#: includes/class.cooked-recipes.php:653 +#: includes/class.cooked-recipes.php:656 msgid "Advanced" msgstr "" -#: includes/class.cooked-recipes.php:679 +#: includes/class.cooked-recipes.php:682 msgid "Cooked Gallery" msgstr "" -#: includes/class.cooked-recipes.php:683 +#: includes/class.cooked-recipes.php:686 msgid "Envira Gallery" msgstr "" -#: includes/class.cooked-recipes.php:687 +#: includes/class.cooked-recipes.php:690 msgid "Soliloquy Slider" msgstr "" -#: includes/class.cooked-recipes.php:691 +#: includes/class.cooked-recipes.php:694 msgid "Slider Revolution" msgstr "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:766 +#: includes/class.cooked-recipes.php:769 msgid "Quarter (%s Serving)" msgid_plural "Quarter (%s Servings)" msgstr[0] "" msgstr[1] "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:769 +#: includes/class.cooked-recipes.php:772 msgid "Half (%s Serving)" msgid_plural "Half (%s Servings)" msgstr[0] "" msgstr[1] "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:772 +#: includes/class.cooked-recipes.php:775 msgid "Default (%s Serving)" msgid_plural "Default (%s Servings)" msgstr[0] "" msgstr[1] "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:775 +#: includes/class.cooked-recipes.php:778 msgid "Double (%s Servings)" msgstr "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:778 +#: includes/class.cooked-recipes.php:781 msgid "Triple (%s Servings)" msgstr "" -#: includes/class.cooked-recipes.php:792 -#: includes/class.cooked-shortcodes.php:400 +#: includes/class.cooked-recipes.php:795 +#: includes/class.cooked-shortcodes.php:432 msgid "Yields" msgstr "" #. translators: singular and plural "serving" sizes -#: includes/class.cooked-recipes.php:796 -#: includes/class.cooked-recipes.php:806 +#: includes/class.cooked-recipes.php:799 +#: includes/class.cooked-recipes.php:809 msgid "%s Serving" msgid_plural "%s Servings" msgstr[0] "" msgstr[1] "" #. translators: singular and plural "steps" -#: includes/class.cooked-recipes.php:906 +#: includes/class.cooked-recipes.php:909 #: includes/class.cooked-seo.php:85 msgid "Step %d" msgstr "" -#: includes/class.cooked-recipes.php:960 +#: includes/class.cooked-recipes.php:964 msgid "Browse" msgstr "" -#: includes/class.cooked-recipes.php:977 +#: includes/class.cooked-recipes.php:981 #: includes/class.cooked-settings.php:108 msgid "No categories" msgstr "" -#: includes/class.cooked-recipes.php:980 +#: includes/class.cooked-recipes.php:984 #: includes/class.cooked-settings.php:155 #: includes/class.cooked-taxonomies.php:38 #: includes/class.cooked-taxonomies.php:48 msgid "Categories" msgstr "" -#: includes/class.cooked-recipes.php:982 +#: includes/class.cooked-recipes.php:986 #: includes/class.cooked-taxonomies.php:41 #: includes/widgets/recipe-categories.php:48 msgid "All Categories" msgstr "" -#: includes/class.cooked-recipes.php:1069 +#: includes/class.cooked-recipes.php:1065 msgid "Find a recipe..." msgstr "" -#: includes/class.cooked-recipes.php:1089 +#: includes/class.cooked-recipes.php:1080 msgid "Newest first" msgstr "" -#: includes/class.cooked-recipes.php:1093 +#: includes/class.cooked-recipes.php:1084 msgid "Oldest first" msgstr "" -#: includes/class.cooked-recipes.php:1097 +#: includes/class.cooked-recipes.php:1088 msgid "Alphabetical (A-Z)" msgstr "" -#: includes/class.cooked-recipes.php:1101 +#: includes/class.cooked-recipes.php:1092 msgid "Alphabetical (Z-A)" msgstr "" @@ -1766,11 +1766,11 @@ msgid "Begin Migration" msgstr "" #. translators: referring to the bottom of the Settings page. -#: includes/class.cooked-shortcodes.php:106 +#: includes/class.cooked-shortcodes.php:138 msgid "Public recipes are currently disabled. You can change this at the bottom of the %s page." msgstr "" -#: includes/class.cooked-shortcodes.php:254 +#: includes/class.cooked-shortcodes.php:286 msgid "(recipe not found or in draft status)" msgstr "" @@ -1808,7 +1808,7 @@ msgid "No Categories" msgstr "" #. translators: for displaying singular or plural versions depending on the number. -#: includes/class.cooked-taxonomies.php:139 +#: includes/class.cooked-taxonomies.php:135 msgid "%s Recipe" msgid_plural "%s Recipes" msgstr[0] "" @@ -1830,7 +1830,7 @@ msgstr "" #: includes/widgets/recipe-card.php:79 #: includes/widgets/recipe-categories.php:40 -#: includes/widgets/recipe-list.php:47 +#: includes/widgets/recipe-list.php:48 msgid "Widget Title (optional):" msgstr "" @@ -1859,12 +1859,12 @@ msgid "Modern Centered" msgstr "" #: includes/widgets/recipe-card.php:103 -#: includes/widgets/recipe-list.php:82 +#: includes/widgets/recipe-list.php:83 msgid "Width:" msgstr "" #: includes/widgets/recipe-card.php:109 -#: includes/widgets/recipe-list.php:88 +#: includes/widgets/recipe-list.php:89 msgid "Hide Image" msgstr "" @@ -1873,7 +1873,7 @@ msgid "Hide Title" msgstr "" #: includes/widgets/recipe-card.php:119 -#: includes/widgets/recipe-list.php:93 +#: includes/widgets/recipe-list.php:94 msgid "Hide Author" msgstr "" @@ -1885,23 +1885,23 @@ msgstr "" msgid "Hide Empty Categories" msgstr "" -#: includes/widgets/recipe-list.php:52 +#: includes/widgets/recipe-list.php:53 msgid "Sorted by:" msgstr "" -#: includes/widgets/recipe-list.php:54 +#: includes/widgets/recipe-list.php:55 msgid "Most Recent" msgstr "" -#: includes/widgets/recipe-list.php:55 +#: includes/widgets/recipe-list.php:56 msgid "Choose Recipes" msgstr "" -#: includes/widgets/recipe-list.php:61 +#: includes/widgets/recipe-list.php:62 msgid "Show:" msgstr "" -#: includes/widgets/recipe-list.php:72 +#: includes/widgets/recipe-list.php:73 msgid "Recipes:" msgstr "" diff --git a/languages/cooked.pot b/languages/cooked.pot index 34740e0..ec61ae2 100644 --- a/languages/cooked.pot +++ b/languages/cooked.pot @@ -2,14 +2,14 @@ # This file is distributed under the GPL2. msgid "" msgstr "" -"Project-Id-Version: Cooked - Recipe Management 1.8.9\n" +"Project-Id-Version: Cooked - Recipe Management 1.9.0\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/cooked\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-11-17T12:55:16-05:00\n" +"POT-Creation-Date: 2024-12-16T13:30:20-05:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.11.0\n" "X-Domain: cooked\n" @@ -39,75 +39,75 @@ msgstr "" msgid "https://goratech.dev" msgstr "" -#: includes/class.cooked-admin-enqueues.php:127 +#: includes/class.cooked-admin-enqueues.php:137 msgid "remaining" msgstr "" -#: includes/class.cooked-admin-enqueues.php:128 -#: includes/class.cooked-recipe-meta.php:616 -#: includes/class.cooked-recipe-meta.php:664 -#: includes/class.cooked-recipe-meta.php:705 +#: includes/class.cooked-admin-enqueues.php:138 +#: includes/class.cooked-recipe-meta.php:614 +#: includes/class.cooked-recipe-meta.php:647 +#: includes/class.cooked-recipe-meta.php:674 msgid "Add Image" msgstr "" -#: includes/class.cooked-admin-enqueues.php:129 -#: includes/class.cooked-recipe-meta.php:616 +#: includes/class.cooked-admin-enqueues.php:139 +#: includes/class.cooked-recipe-meta.php:614 msgid "Change Image" msgstr "" -#: includes/class.cooked-admin-enqueues.php:130 +#: includes/class.cooked-admin-enqueues.php:140 msgid "Use this Image" msgstr "" -#: includes/class.cooked-admin-enqueues.php:131 -#: includes/class.cooked-recipe-meta.php:915 +#: includes/class.cooked-admin-enqueues.php:141 +#: includes/class.cooked-recipe-meta.php:884 msgid "Add to Gallery" msgstr "" -#: includes/class.cooked-admin-enqueues.php:132 +#: includes/class.cooked-admin-enqueues.php:142 msgid "Edit Gallery Item" msgstr "" -#: includes/class.cooked-admin-enqueues.php:133 +#: includes/class.cooked-admin-enqueues.php:143 msgid "Update Gallery Item" msgstr "" -#: includes/class.cooked-admin-enqueues.php:134 +#: includes/class.cooked-admin-enqueues.php:144 msgid "Saved" msgstr "" -#: includes/class.cooked-admin-enqueues.php:135 +#: includes/class.cooked-admin-enqueues.php:145 msgid "Applied" msgstr "" -#: includes/class.cooked-admin-enqueues.php:136 +#: includes/class.cooked-admin-enqueues.php:146 msgid "Are you sure you want to apply this new template to all of your recipes?" msgstr "" -#: includes/class.cooked-admin-enqueues.php:137 +#: includes/class.cooked-admin-enqueues.php:147 msgid "Are you sure you want to reset this recipe template to the Cooked plugin default?" msgstr "" #. translators: confirmation for migrating all ### recipes, where ### displays the total number for the migration. -#: includes/class.cooked-admin-enqueues.php:139 +#: includes/class.cooked-admin-enqueues.php:149 msgid "Please confirm that you are ready to migrate all %s recipes." msgstr "" -#: includes/class.cooked-admin-enqueues.php:140 +#: includes/class.cooked-admin-enqueues.php:150 msgid "Please confirm that you are ready to import all recipes." msgstr "" #: includes/class.cooked-admin-menus.php:34 #: includes/class.cooked-admin-menus.php:57 -#: includes/class.cooked-post-types.php:352 -#: includes/class.cooked-post-types.php:364 +#: includes/class.cooked-post-types.php:457 +#: includes/class.cooked-post-types.php:469 #: includes/class.cooked-users.php:125 msgid "Recipes" msgstr "" #: includes/class.cooked-admin-menus.php:35 #: includes/class.cooked-admin-menus.php:59 -#: includes/class.cooked-post-types.php:354 +#: includes/class.cooked-post-types.php:459 msgid "Add New" msgstr "" @@ -115,7 +115,7 @@ msgstr "" #: includes/class.cooked-admin-menus.php:43 #: includes/class.cooked-admin-menus.php:63 #: includes/class.cooked-recipe-meta.php:95 -#: includes/class.cooked-shortcodes.php:106 +#: includes/class.cooked-shortcodes.php:138 #: templates/admin/welcome.php:18 msgid "Settings" msgstr "" @@ -134,7 +134,7 @@ msgid "Upgrade to Pro" msgstr "" #: includes/class.cooked-admin-menus.php:58 -#: includes/class.cooked-post-types.php:359 +#: includes/class.cooked-post-types.php:464 msgid "All Recipes" msgstr "" @@ -149,8 +149,8 @@ msgstr "" #: includes/class.cooked-functions.php:127 #: includes/class.cooked-recipe-meta.php:135 #: includes/class.cooked-recipe-meta.php:221 -#: includes/class.cooked-recipe-meta.php:993 -#: includes/class.cooked-recipes.php:636 +#: includes/class.cooked-recipe-meta.php:962 +#: includes/class.cooked-recipes.php:639 #: templates/front/recipe.php:34 msgid "Ingredients" msgstr "" @@ -159,8 +159,8 @@ msgstr "" #: includes/class.cooked-functions.php:128 #: includes/class.cooked-recipe-meta.php:135 #: includes/class.cooked-recipe-meta.php:227 -#: includes/class.cooked-recipe-meta.php:1024 -#: includes/class.cooked-recipes.php:640 +#: includes/class.cooked-recipe-meta.php:993 +#: includes/class.cooked-recipes.php:643 #: templates/front/recipe.php:35 msgid "Directions" msgstr "" @@ -171,7 +171,7 @@ msgid "Error importing recipe." msgstr "" #: includes/class.cooked-enqueues.php:35 -#: includes/class.cooked-recipe-meta.php:1239 +#: includes/class.cooked-recipe-meta.php:1208 msgid "Timer" msgstr "" @@ -197,7 +197,7 @@ msgid "Information" msgstr "" #: includes/class.cooked-functions.php:125 -#: includes/class.cooked-recipe-meta.php:1184 +#: includes/class.cooked-recipe-meta.php:1153 #: includes/class.cooked-settings.php:170 msgid "Excerpt" msgstr "" @@ -207,10 +207,10 @@ msgid "Images" msgstr "" #: includes/class.cooked-functions.php:129 -#: includes/class.cooked-recipe-meta.php:1208 -#: includes/class.cooked-recipes.php:643 +#: includes/class.cooked-recipe-meta.php:1177 +#: includes/class.cooked-recipes.php:646 #: includes/class.cooked-settings.php:171 -#: includes/class.cooked-shortcodes.php:712 +#: includes/class.cooked-shortcodes.php:744 msgid "Notes" msgstr "" @@ -838,47 +838,47 @@ msgstr "" msgid "Photo" msgstr "" -#: includes/class.cooked-post-types.php:334 +#: includes/class.cooked-post-types.php:439 msgid "Recipe Archive" msgstr "" -#: includes/class.cooked-post-types.php:353 +#: includes/class.cooked-post-types.php:458 msgid "Recipe" msgstr "" -#: includes/class.cooked-post-types.php:355 +#: includes/class.cooked-post-types.php:460 msgid "Add New Recipe" msgstr "" -#: includes/class.cooked-post-types.php:356 +#: includes/class.cooked-post-types.php:461 msgid "New Recipe" msgstr "" -#: includes/class.cooked-post-types.php:357 +#: includes/class.cooked-post-types.php:462 msgid "Edit Recipe" msgstr "" -#: includes/class.cooked-post-types.php:358 +#: includes/class.cooked-post-types.php:463 msgid "View Recipe" msgstr "" -#: includes/class.cooked-post-types.php:360 +#: includes/class.cooked-post-types.php:465 msgid "Search Recipes" msgstr "" -#: includes/class.cooked-post-types.php:361 +#: includes/class.cooked-post-types.php:466 msgid "No recipes found." msgstr "" -#: includes/class.cooked-post-types.php:362 +#: includes/class.cooked-post-types.php:467 msgid "No recipes found in trash." msgstr "" -#: includes/class.cooked-post-types.php:390 +#: includes/class.cooked-post-types.php:495 msgid "Recipe title ..." msgstr "" -#: includes/class.cooked-post-types.php:408 +#: includes/class.cooked-post-types.php:513 msgid "Cooked Browse Recipes Page" msgstr "" @@ -904,7 +904,7 @@ msgid "Layout" msgstr "" #: includes/class.cooked-recipe-meta.php:239 -#: includes/class.cooked-recipe-meta.php:1105 +#: includes/class.cooked-recipe-meta.php:1074 msgid "Gallery" msgstr "" @@ -957,367 +957,367 @@ msgstr "" msgid "Using the built-in recipe shortcodes found on the \"Shortcodes\" tab, you can create the layout of your recipe below. Use the \"Save as Default\" button to save your template." msgstr "" -#: includes/class.cooked-recipe-meta.php:347 +#: includes/class.cooked-recipe-meta.php:346 msgid "Recipe Excerpt" msgstr "" -#: includes/class.cooked-recipe-meta.php:347 +#: includes/class.cooked-recipe-meta.php:346 msgid "The excerpt is used on recipe listing templates, where the full recipe should not be displayed." msgstr "" -#: includes/class.cooked-recipe-meta.php:370 +#: includes/class.cooked-recipe-meta.php:369 msgid "SEO Description" msgstr "" -#: includes/class.cooked-recipe-meta.php:370 +#: includes/class.cooked-recipe-meta.php:369 msgid "This description is used for SEO purposes and is optional. By default, Cooked will use the Recipe Excerpt above if available or the Recipe Title if not." msgstr "" -#: includes/class.cooked-recipe-meta.php:381 +#: includes/class.cooked-recipe-meta.php:380 #: includes/class.cooked-settings.php:169 msgid "Difficulty Level" msgstr "" -#: includes/class.cooked-recipe-meta.php:390 -#: includes/class.cooked-recipe-meta.php:967 +#: includes/class.cooked-recipe-meta.php:389 +#: includes/class.cooked-recipe-meta.php:936 #: includes/class.cooked-settings.php:172 -#: includes/class.cooked-shortcodes.php:401 -#: includes/class.cooked-shortcodes.php:609 +#: includes/class.cooked-shortcodes.php:433 +#: includes/class.cooked-shortcodes.php:641 msgid "Prep Time" msgstr "" -#: includes/class.cooked-recipe-meta.php:392 -#: includes/class.cooked-recipe-meta.php:397 -#: includes/class.cooked-recipe-meta.php:402 +#: includes/class.cooked-recipe-meta.php:391 +#: includes/class.cooked-recipe-meta.php:396 +#: includes/class.cooked-recipe-meta.php:401 msgid "minutes" msgstr "" -#: includes/class.cooked-recipe-meta.php:395 -#: includes/class.cooked-recipe-meta.php:968 +#: includes/class.cooked-recipe-meta.php:394 +#: includes/class.cooked-recipe-meta.php:937 #: includes/class.cooked-settings.php:173 -#: includes/class.cooked-shortcodes.php:402 -#: includes/class.cooked-shortcodes.php:618 +#: includes/class.cooked-shortcodes.php:434 +#: includes/class.cooked-shortcodes.php:650 msgid "Cook Time" msgstr "" -#: includes/class.cooked-recipe-meta.php:400 -#: includes/class.cooked-recipe-meta.php:969 +#: includes/class.cooked-recipe-meta.php:399 +#: includes/class.cooked-recipe-meta.php:938 #: includes/class.cooked-settings.php:174 -#: includes/class.cooked-shortcodes.php:403 -#: includes/class.cooked-shortcodes.php:629 -#: includes/class.cooked-shortcodes.php:636 +#: includes/class.cooked-shortcodes.php:435 +#: includes/class.cooked-shortcodes.php:661 +#: includes/class.cooked-shortcodes.php:668 msgid "Total Time" msgstr "" -#: includes/class.cooked-recipe-meta.php:408 +#: includes/class.cooked-recipe-meta.php:407 msgid "Recipe Notes" msgstr "" -#: includes/class.cooked-recipe-meta.php:408 +#: includes/class.cooked-recipe-meta.php:407 msgid "The notes are displayed in the recipe." msgstr "" -#: includes/class.cooked-recipe-meta.php:434 +#: includes/class.cooked-recipe-meta.php:432 msgid "Amount" msgstr "" -#: includes/class.cooked-recipe-meta.php:435 +#: includes/class.cooked-recipe-meta.php:433 msgid "Measurement" msgstr "" -#: includes/class.cooked-recipe-meta.php:436 +#: includes/class.cooked-recipe-meta.php:434 msgid "Item" msgstr "" -#: includes/class.cooked-recipe-meta.php:473 -#: includes/class.cooked-recipe-meta.php:524 -#: includes/class.cooked-recipe-meta.php:571 +#: includes/class.cooked-recipe-meta.php:471 +#: includes/class.cooked-recipe-meta.php:522 +#: includes/class.cooked-recipe-meta.php:569 msgid "ex. Eggs, Milk, etc." msgstr "" -#: includes/class.cooked-recipe-meta.php:487 -#: includes/class.cooked-recipe-meta.php:582 -#: includes/class.cooked-recipe-meta.php:647 -#: includes/class.cooked-recipe-meta.php:718 +#: includes/class.cooked-recipe-meta.php:485 +#: includes/class.cooked-recipe-meta.php:580 +#: includes/class.cooked-recipe-meta.php:630 +#: includes/class.cooked-recipe-meta.php:687 msgid "Section Heading" msgstr "" -#: includes/class.cooked-recipe-meta.php:541 +#: includes/class.cooked-recipe-meta.php:539 msgid "Add Ingredient" msgstr "" -#: includes/class.cooked-recipe-meta.php:542 -#: includes/class.cooked-recipe-meta.php:697 +#: includes/class.cooked-recipe-meta.php:540 +#: includes/class.cooked-recipe-meta.php:666 msgid "Add Section Heading" msgstr "" -#: includes/class.cooked-recipe-meta.php:696 +#: includes/class.cooked-recipe-meta.php:665 msgid "Add Direction" msgstr "" -#: includes/class.cooked-recipe-meta.php:731 +#: includes/class.cooked-recipe-meta.php:700 msgid "Nutrition Information" msgstr "" -#: includes/class.cooked-recipe-meta.php:769 -#: includes/class.cooked-shortcodes.php:997 +#: includes/class.cooked-recipe-meta.php:738 +#: includes/class.cooked-shortcodes.php:1029 msgid "Nutrition Facts" msgstr "" -#: includes/class.cooked-recipe-meta.php:787 -#: includes/class.cooked-shortcodes.php:965 +#: includes/class.cooked-recipe-meta.php:756 +#: includes/class.cooked-shortcodes.php:997 msgid "Amount per serving" msgstr "" -#: includes/class.cooked-recipe-meta.php:797 -#: includes/class.cooked-shortcodes.php:975 +#: includes/class.cooked-recipe-meta.php:766 +#: includes/class.cooked-shortcodes.php:1007 msgid "% Daily Value *" msgstr "" -#: includes/class.cooked-recipe-meta.php:816 -#: includes/class.cooked-shortcodes.php:907 +#: includes/class.cooked-recipe-meta.php:785 +#: includes/class.cooked-shortcodes.php:939 msgid "Includes" msgstr "" -#: includes/class.cooked-recipe-meta.php:848 -#: includes/class.cooked-shortcodes.php:1001 +#: includes/class.cooked-recipe-meta.php:817 +#: includes/class.cooked-shortcodes.php:1033 msgid "The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice." msgstr "" -#: includes/class.cooked-recipe-meta.php:864 +#: includes/class.cooked-recipe-meta.php:833 msgid "Recipe Gallery Type" msgstr "" -#: includes/class.cooked-recipe-meta.php:877 +#: includes/class.cooked-recipe-meta.php:846 msgid "Choose one..." msgstr "" #. translators: a title for the video section of the recipe editor, where users can paste a YouToub or Vimeo URL into the field below. -#: includes/class.cooked-recipe-meta.php:891 +#: includes/class.cooked-recipe-meta.php:860 msgid "%1$s or %2$s Video" msgstr "" #. translators: a message describing how to display a video from YouTube or Vimeo. -#: includes/class.cooked-recipe-meta.php:895 +#: includes/class.cooked-recipe-meta.php:864 msgid "If you would like to display a video as the first item in your gallery, you can paste a valid %1$s or %2$s URL below." msgstr "" -#: includes/class.cooked-recipe-meta.php:900 +#: includes/class.cooked-recipe-meta.php:869 msgid "Gallery Items" msgstr "" -#: includes/class.cooked-recipe-meta.php:931 +#: includes/class.cooked-recipe-meta.php:900 msgid "Recipe Information" msgstr "" -#: includes/class.cooked-recipe-meta.php:932 +#: includes/class.cooked-recipe-meta.php:901 msgid "This will display the recipe author, cooking times, etc." msgstr "" #. translators: "include and exclude" section title #. translators: "left and right" section title -#: includes/class.cooked-recipe-meta.php:941 -#: includes/class.cooked-recipe-meta.php:951 +#: includes/class.cooked-recipe-meta.php:910 +#: includes/class.cooked-recipe-meta.php:920 msgid "\"%1$s\" and \"%2$s\"" msgstr "" -#: includes/class.cooked-recipe-meta.php:943 +#: includes/class.cooked-recipe-meta.php:912 msgid "This will allow you to include or exclude content from the shortcode output." msgstr "" -#: includes/class.cooked-recipe-meta.php:952 +#: includes/class.cooked-recipe-meta.php:921 msgid "Used like \"include\", but will position the content to the left or right." msgstr "" -#: includes/class.cooked-recipe-meta.php:962 +#: includes/class.cooked-recipe-meta.php:931 +#: includes/class.cooked-recipe-meta.php:977 #: includes/class.cooked-recipe-meta.php:1008 -#: includes/class.cooked-recipe-meta.php:1039 -#: includes/class.cooked-recipe-meta.php:1064 -#: includes/class.cooked-recipe-meta.php:1088 -#: includes/class.cooked-recipe-meta.php:1148 -#: includes/class.cooked-recipe-meta.php:1193 -#: includes/class.cooked-recipe-meta.php:1223 -#: includes/class.cooked-recipe-meta.php:1268 +#: includes/class.cooked-recipe-meta.php:1033 +#: includes/class.cooked-recipe-meta.php:1057 +#: includes/class.cooked-recipe-meta.php:1117 +#: includes/class.cooked-recipe-meta.php:1162 +#: includes/class.cooked-recipe-meta.php:1192 +#: includes/class.cooked-recipe-meta.php:1237 msgid "Available Variables" msgstr "" -#: includes/class.cooked-recipe-meta.php:966 +#: includes/class.cooked-recipe-meta.php:935 #: includes/class.cooked-settings.php:167 -#: includes/class.cooked-shortcodes.php:398 -#: includes/class.cooked-shortcodes.php:563 +#: includes/class.cooked-shortcodes.php:430 +#: includes/class.cooked-shortcodes.php:595 msgid "Author" msgstr "" -#: includes/class.cooked-recipe-meta.php:970 -#: includes/class.cooked-shortcodes.php:399 -#: includes/class.cooked-shortcodes.php:574 +#: includes/class.cooked-recipe-meta.php:939 +#: includes/class.cooked-shortcodes.php:431 +#: includes/class.cooked-shortcodes.php:606 msgid "Difficulty" msgstr "" -#: includes/class.cooked-recipe-meta.php:971 +#: includes/class.cooked-recipe-meta.php:940 msgid "Servings Switcher" msgstr "" -#: includes/class.cooked-recipe-meta.php:972 +#: includes/class.cooked-recipe-meta.php:941 #: includes/class.cooked-settings.php:168 -#: includes/class.cooked-shortcodes.php:656 -#: includes/class.cooked-shortcodes.php:659 +#: includes/class.cooked-shortcodes.php:688 +#: includes/class.cooked-shortcodes.php:691 #: includes/class.cooked-taxonomies.php:39 msgid "Category" msgstr "" -#: includes/class.cooked-recipe-meta.php:973 +#: includes/class.cooked-recipe-meta.php:942 msgid "Print Mode" msgstr "" -#: includes/class.cooked-recipe-meta.php:974 +#: includes/class.cooked-recipe-meta.php:943 msgid "Full-Screen Mode" msgstr "" -#: includes/class.cooked-recipe-meta.php:994 +#: includes/class.cooked-recipe-meta.php:963 msgid "This will display the list of ingredients, added via the \"Ingredients\" tab." msgstr "" -#: includes/class.cooked-recipe-meta.php:1000 +#: includes/class.cooked-recipe-meta.php:969 msgid "This will allow you to hide or show the checkboxes:" msgstr "" -#: includes/class.cooked-recipe-meta.php:1010 +#: includes/class.cooked-recipe-meta.php:979 msgid "Show checkboxes" msgstr "" -#: includes/class.cooked-recipe-meta.php:1011 +#: includes/class.cooked-recipe-meta.php:980 msgid "Hide checkboxes" msgstr "" -#: includes/class.cooked-recipe-meta.php:1025 +#: includes/class.cooked-recipe-meta.php:994 msgid "This will display the list of directions, added via the \"Directions\" tab." msgstr "" -#: includes/class.cooked-recipe-meta.php:1031 +#: includes/class.cooked-recipe-meta.php:1000 msgid "This will allow you to hide or show the numbers:" msgstr "" -#: includes/class.cooked-recipe-meta.php:1041 +#: includes/class.cooked-recipe-meta.php:1010 msgid "Show numbers" msgstr "" -#: includes/class.cooked-recipe-meta.php:1042 +#: includes/class.cooked-recipe-meta.php:1011 msgid "Hide numbers" msgstr "" -#: includes/class.cooked-recipe-meta.php:1055 +#: includes/class.cooked-recipe-meta.php:1024 msgid "Featured Image" msgstr "" -#: includes/class.cooked-recipe-meta.php:1056 +#: includes/class.cooked-recipe-meta.php:1025 msgid "This will display the featured image, if one is set." msgstr "" -#: includes/class.cooked-recipe-meta.php:1066 -#: includes/class.cooked-recipe-meta.php:1090 -#: includes/class.cooked-recipe-meta.php:1195 +#: includes/class.cooked-recipe-meta.php:1035 +#: includes/class.cooked-recipe-meta.php:1059 +#: includes/class.cooked-recipe-meta.php:1164 msgid "None" msgstr "" -#: includes/class.cooked-recipe-meta.php:1079 +#: includes/class.cooked-recipe-meta.php:1048 msgid "Nutrition Label" msgstr "" -#: includes/class.cooked-recipe-meta.php:1080 +#: includes/class.cooked-recipe-meta.php:1049 msgid "This will display the Nutrition Facts label, if data is present." msgstr "" -#: includes/class.cooked-recipe-meta.php:1106 +#: includes/class.cooked-recipe-meta.php:1075 msgid "This will display the gallery, if one is set or created from the \"Gallery\" tab." msgstr "" -#: includes/class.cooked-recipe-meta.php:1114 +#: includes/class.cooked-recipe-meta.php:1083 msgid "Set the width of the gallery." msgstr "" -#: includes/class.cooked-recipe-meta.php:1121 +#: includes/class.cooked-recipe-meta.php:1090 msgid "Set the image size ratio." msgstr "" -#: includes/class.cooked-recipe-meta.php:1131 +#: includes/class.cooked-recipe-meta.php:1100 msgid "Set the navigation style." msgstr "" -#: includes/class.cooked-recipe-meta.php:1138 +#: includes/class.cooked-recipe-meta.php:1107 msgid "Enable or disable \"Full-Screen\" mode." msgstr "" #. translators: related to the width of slideshows: "80% or 300px" section title -#: includes/class.cooked-recipe-meta.php:1153 +#: includes/class.cooked-recipe-meta.php:1122 msgid "ex: \"%1$s\" or \"%2$s\"" msgstr "" #. translators: related to the image ratio for slideshows: "ex: 800/600" section title -#: includes/class.cooked-recipe-meta.php:1158 +#: includes/class.cooked-recipe-meta.php:1127 msgid "ex: \"%s\"" msgstr "" #. translators: related to the navigation style for slideshows: "dots, thumbs or false" section title -#: includes/class.cooked-recipe-meta.php:1163 +#: includes/class.cooked-recipe-meta.php:1132 msgid "\"%1$s\", \"%2$s\", or \"%3$s\"" msgstr "" #. translators: related to allowing full screen for slideshows: "true or false" section title -#: includes/class.cooked-recipe-meta.php:1168 +#: includes/class.cooked-recipe-meta.php:1137 msgid "\"%1$s\" or \"%2$s\"" msgstr "" -#: includes/class.cooked-recipe-meta.php:1185 +#: includes/class.cooked-recipe-meta.php:1154 msgid "This will display the excerpt, if one is available from the \"Layout & Content\" tab." msgstr "" -#: includes/class.cooked-recipe-meta.php:1209 +#: includes/class.cooked-recipe-meta.php:1178 msgid "This will display the notes, if one is available from the \"Layout & Content\" tab." msgstr "" -#: includes/class.cooked-recipe-meta.php:1215 +#: includes/class.cooked-recipe-meta.php:1184 msgid "This will allow you to hide or show the header for the notes section:" msgstr "" -#: includes/class.cooked-recipe-meta.php:1225 +#: includes/class.cooked-recipe-meta.php:1194 msgid "Show header" msgstr "" -#: includes/class.cooked-recipe-meta.php:1226 +#: includes/class.cooked-recipe-meta.php:1195 msgid "Hide header" msgstr "" -#: includes/class.cooked-recipe-meta.php:1240 +#: includes/class.cooked-recipe-meta.php:1209 msgid "This will display a special link to start a cooking timer." msgstr "" #. translators: "seconds, minutes and hours" section title -#: includes/class.cooked-recipe-meta.php:1249 +#: includes/class.cooked-recipe-meta.php:1218 msgid "\"%1$s\", \"%2$s\" and \"%3$s\"" msgstr "" -#: includes/class.cooked-recipe-meta.php:1251 +#: includes/class.cooked-recipe-meta.php:1220 msgid "Use just one or a combination of all three to set the timer length" msgstr "" -#: includes/class.cooked-recipe-meta.php:1258 +#: includes/class.cooked-recipe-meta.php:1227 msgid "Add a short description for this timer, if applicable." msgstr "" -#: includes/class.cooked-recipe-meta.php:1270 +#: includes/class.cooked-recipe-meta.php:1239 msgid "Time in seconds" msgstr "" -#: includes/class.cooked-recipe-meta.php:1271 +#: includes/class.cooked-recipe-meta.php:1240 msgid "Time in minutes" msgstr "" -#: includes/class.cooked-recipe-meta.php:1272 +#: includes/class.cooked-recipe-meta.php:1241 msgid "Time in hours" msgstr "" -#: includes/class.cooked-recipe-meta.php:1273 +#: includes/class.cooked-recipe-meta.php:1242 msgid "Timer Description" msgstr "" @@ -1334,123 +1334,123 @@ msgstr "" msgid "All %s" msgstr "" -#: includes/class.cooked-recipes.php:651 +#: includes/class.cooked-recipes.php:654 msgid "Beginner" msgstr "" -#: includes/class.cooked-recipes.php:652 +#: includes/class.cooked-recipes.php:655 msgid "Intermediate" msgstr "" -#: includes/class.cooked-recipes.php:653 +#: includes/class.cooked-recipes.php:656 msgid "Advanced" msgstr "" -#: includes/class.cooked-recipes.php:679 +#: includes/class.cooked-recipes.php:682 msgid "Cooked Gallery" msgstr "" -#: includes/class.cooked-recipes.php:683 +#: includes/class.cooked-recipes.php:686 msgid "Envira Gallery" msgstr "" -#: includes/class.cooked-recipes.php:687 +#: includes/class.cooked-recipes.php:690 msgid "Soliloquy Slider" msgstr "" -#: includes/class.cooked-recipes.php:691 +#: includes/class.cooked-recipes.php:694 msgid "Slider Revolution" msgstr "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:766 +#: includes/class.cooked-recipes.php:769 msgid "Quarter (%s Serving)" msgid_plural "Quarter (%s Servings)" msgstr[0] "" msgstr[1] "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:769 +#: includes/class.cooked-recipes.php:772 msgid "Half (%s Serving)" msgid_plural "Half (%s Servings)" msgstr[0] "" msgstr[1] "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:772 +#: includes/class.cooked-recipes.php:775 msgid "Default (%s Serving)" msgid_plural "Default (%s Servings)" msgstr[0] "" msgstr[1] "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:775 +#: includes/class.cooked-recipes.php:778 msgid "Double (%s Servings)" msgstr "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:778 +#: includes/class.cooked-recipes.php:781 msgid "Triple (%s Servings)" msgstr "" -#: includes/class.cooked-recipes.php:792 -#: includes/class.cooked-shortcodes.php:400 +#: includes/class.cooked-recipes.php:795 +#: includes/class.cooked-shortcodes.php:432 msgid "Yields" msgstr "" #. translators: singular and plural "serving" sizes -#: includes/class.cooked-recipes.php:796 -#: includes/class.cooked-recipes.php:806 +#: includes/class.cooked-recipes.php:799 +#: includes/class.cooked-recipes.php:809 msgid "%s Serving" msgid_plural "%s Servings" msgstr[0] "" msgstr[1] "" #. translators: singular and plural "steps" -#: includes/class.cooked-recipes.php:906 +#: includes/class.cooked-recipes.php:909 #: includes/class.cooked-seo.php:85 msgid "Step %d" msgstr "" -#: includes/class.cooked-recipes.php:960 +#: includes/class.cooked-recipes.php:964 msgid "Browse" msgstr "" -#: includes/class.cooked-recipes.php:977 +#: includes/class.cooked-recipes.php:981 #: includes/class.cooked-settings.php:108 msgid "No categories" msgstr "" -#: includes/class.cooked-recipes.php:980 +#: includes/class.cooked-recipes.php:984 #: includes/class.cooked-settings.php:155 #: includes/class.cooked-taxonomies.php:38 #: includes/class.cooked-taxonomies.php:48 msgid "Categories" msgstr "" -#: includes/class.cooked-recipes.php:982 +#: includes/class.cooked-recipes.php:986 #: includes/class.cooked-taxonomies.php:41 #: includes/widgets/recipe-categories.php:48 msgid "All Categories" msgstr "" -#: includes/class.cooked-recipes.php:1069 +#: includes/class.cooked-recipes.php:1065 msgid "Find a recipe..." msgstr "" -#: includes/class.cooked-recipes.php:1089 +#: includes/class.cooked-recipes.php:1080 msgid "Newest first" msgstr "" -#: includes/class.cooked-recipes.php:1093 +#: includes/class.cooked-recipes.php:1084 msgid "Oldest first" msgstr "" -#: includes/class.cooked-recipes.php:1097 +#: includes/class.cooked-recipes.php:1088 msgid "Alphabetical (A-Z)" msgstr "" -#: includes/class.cooked-recipes.php:1101 +#: includes/class.cooked-recipes.php:1092 msgid "Alphabetical (Z-A)" msgstr "" @@ -1769,11 +1769,11 @@ msgid "Begin Migration" msgstr "" #. translators: referring to the bottom of the Settings page. -#: includes/class.cooked-shortcodes.php:106 +#: includes/class.cooked-shortcodes.php:138 msgid "Public recipes are currently disabled. You can change this at the bottom of the %s page." msgstr "" -#: includes/class.cooked-shortcodes.php:254 +#: includes/class.cooked-shortcodes.php:286 msgid "(recipe not found or in draft status)" msgstr "" @@ -1811,7 +1811,7 @@ msgid "No Categories" msgstr "" #. translators: for displaying singular or plural versions depending on the number. -#: includes/class.cooked-taxonomies.php:139 +#: includes/class.cooked-taxonomies.php:135 msgid "%s Recipe" msgid_plural "%s Recipes" msgstr[0] "" @@ -1833,7 +1833,7 @@ msgstr "" #: includes/widgets/recipe-card.php:79 #: includes/widgets/recipe-categories.php:40 -#: includes/widgets/recipe-list.php:47 +#: includes/widgets/recipe-list.php:48 msgid "Widget Title (optional):" msgstr "" @@ -1862,12 +1862,12 @@ msgid "Modern Centered" msgstr "" #: includes/widgets/recipe-card.php:103 -#: includes/widgets/recipe-list.php:82 +#: includes/widgets/recipe-list.php:83 msgid "Width:" msgstr "" #: includes/widgets/recipe-card.php:109 -#: includes/widgets/recipe-list.php:88 +#: includes/widgets/recipe-list.php:89 msgid "Hide Image" msgstr "" @@ -1876,7 +1876,7 @@ msgid "Hide Title" msgstr "" #: includes/widgets/recipe-card.php:119 -#: includes/widgets/recipe-list.php:93 +#: includes/widgets/recipe-list.php:94 msgid "Hide Author" msgstr "" @@ -1888,23 +1888,23 @@ msgstr "" msgid "Hide Empty Categories" msgstr "" -#: includes/widgets/recipe-list.php:52 +#: includes/widgets/recipe-list.php:53 msgid "Sorted by:" msgstr "" -#: includes/widgets/recipe-list.php:54 +#: includes/widgets/recipe-list.php:55 msgid "Most Recent" msgstr "" -#: includes/widgets/recipe-list.php:55 +#: includes/widgets/recipe-list.php:56 msgid "Choose Recipes" msgstr "" -#: includes/widgets/recipe-list.php:61 +#: includes/widgets/recipe-list.php:62 msgid "Show:" msgstr "" -#: includes/widgets/recipe-list.php:72 +#: includes/widgets/recipe-list.php:73 msgid "Recipes:" msgstr "" diff --git a/package-lock.json b/package-lock.json index f180c5f..784ec5d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cooked", - "version": "1.8.9", + "version": "1.9.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cooked", - "version": "1.8.9", + "version": "1.9.0", "license": "ISC", "devDependencies": { "@playwright/test": "^1.48.2", @@ -20,6 +20,62 @@ "sass": "^1.75.0" } }, + "node_modules/@formatjs/ecma402-abstract": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-2.3.1.tgz", + "integrity": "sha512-Ip9uV+/MpLXWRk03U/GzeJMuPeOXpJBSB5V1tjA6kJhvqssye5J5LoYLc7Z5IAHb7nR62sRoguzrFiVCP/hnzw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@formatjs/fast-memoize": "2.2.5", + "@formatjs/intl-localematcher": "0.5.9", + "decimal.js": "10", + "tslib": "2" + } + }, + "node_modules/@formatjs/fast-memoize": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/@formatjs/fast-memoize/-/fast-memoize-2.2.5.tgz", + "integrity": "sha512-6PoewUMrrcqxSoBXAOJDiW1m+AmkrAj0RiXnOMD59GRaswjXhm3MDhgepXPBgonc09oSirAJTsAggzAGQf6A6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "2" + } + }, + "node_modules/@formatjs/icu-messageformat-parser": { + "version": "2.9.7", + "resolved": "https://registry.npmjs.org/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.9.7.tgz", + "integrity": "sha512-cuEHyRM5VqLQobANOjtjlgU7+qmk9Q3fDQuBiRRJ3+Wp3ZoZhpUPtUfuimZXsir6SaI2TaAJ+SLo9vLnV5QcbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@formatjs/ecma402-abstract": "2.3.1", + "@formatjs/icu-skeleton-parser": "1.8.11", + "tslib": "2" + } + }, + "node_modules/@formatjs/icu-skeleton-parser": { + "version": "1.8.11", + "resolved": "https://registry.npmjs.org/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.8.11.tgz", + "integrity": "sha512-8LlHHE/yL/zVJZHAX3pbKaCjZKmBIO6aJY1mkVh4RMSEu/2WRZ4Ysvv3kKXJ9M8RJLBHdnk1/dUQFdod1Dt7Dw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@formatjs/ecma402-abstract": "2.3.1", + "tslib": "2" + } + }, + "node_modules/@formatjs/intl-localematcher": { + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.5.9.tgz", + "integrity": "sha512-8zkGu/sv5euxbjfZ/xmklqLyDGQSxsLqg8XOq88JW3cmJtzhCP8EtSJXlaKZnVO4beEaoiT9wj4eIoCQ9smwxA==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "2" + } + }, "node_modules/@gulpjs/messages": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@gulpjs/messages/-/messages-1.1.0.tgz", @@ -353,14 +409,24 @@ "url": "https://opencollective.com/parcel" } }, + "node_modules/@paulirish/trace_engine": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@paulirish/trace_engine/-/trace_engine-0.0.39.tgz", + "integrity": "sha512-2Y/ejHX5DDi5bjfWY/0c/BLVSfQ61Jw1Hy60Hnh0hfEO632D3FVctkzT4Q/lVAdvIPR0bUaok9JDTr1pu/OziA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "third-party-web": "latest" + } + }, "node_modules/@playwright/test": { - "version": "1.48.2", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.48.2.tgz", - "integrity": "sha512-54w1xCWfXuax7dz4W2M9uw0gDyh+ti/0K/MxcCUxChFh37kkdxPdfZDw5QBbuPUJHr1CiHJ1hXgSs+GgeQc5Zw==", + "version": "1.49.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.49.1.tgz", + "integrity": "sha512-Ky+BVzPz8pL6PQxHqNRW1k3mIyv933LML7HktS8uik0bUXNCdPhoS/kLihiO1tMf/egaJb4IutXd7UywvXEW+g==", "dev": true, "license": "Apache-2.0", "dependencies": { - "playwright": "1.48.2" + "playwright": "1.49.1" }, "bin": { "playwright": "cli.js" @@ -370,33 +436,26 @@ } }, "node_modules/@puppeteer/browsers": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-1.4.6.tgz", - "integrity": "sha512-x4BEjr2SjOPowNeiguzjozQbsc6h437ovD/wu+JpaenxVLm3jkgzHY2xOslMTp50HoTvQreMjiexiGQw1sqZlQ==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.6.1.tgz", + "integrity": "sha512-aBSREisdsGH890S2rQqK82qmQYU3uFpSH8wcZWHgHzl3LfzsxAKbLNiAG9mO8v1Y0UICBeClICxPJvyr0rcuxg==", "dev": true, "license": "Apache-2.0", "dependencies": { - "debug": "4.3.4", - "extract-zip": "2.0.1", - "progress": "2.0.3", - "proxy-agent": "6.3.0", - "tar-fs": "3.0.4", - "unbzip2-stream": "1.4.3", - "yargs": "17.7.1" + "debug": "^4.4.0", + "extract-zip": "^2.0.1", + "progress": "^2.0.3", + "proxy-agent": "^6.5.0", + "semver": "^7.6.3", + "tar-fs": "^3.0.6", + "unbzip2-stream": "^1.4.3", + "yargs": "^17.7.2" }, "bin": { "browsers": "lib/cjs/main-cli.js" }, "engines": { - "node": ">=16.3.0" - }, - "peerDependencies": { - "typescript": ">= 4.7.4" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "node": ">=18" } }, "node_modules/@puppeteer/browsers/node_modules/cliui": { @@ -415,13 +474,13 @@ } }, "node_modules/@puppeteer/browsers/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -433,16 +492,29 @@ } }, "node_modules/@puppeteer/browsers/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true, "license": "MIT" }, + "node_modules/@puppeteer/browsers/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@puppeteer/browsers/node_modules/yargs": { - "version": "17.7.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz", - "integrity": "sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "license": "MIT", "dependencies": { @@ -458,132 +530,91 @@ "node": ">=12" } }, - "node_modules/@sentry/core": { - "version": "6.19.7", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-6.19.7.tgz", - "integrity": "sha512-tOfZ/umqB2AcHPGbIrsFLcvApdTm9ggpi/kQZFkej7kMphjT+SGBiQfYtjyg9jcRW+ilAR4JXC9BGKsdEQ+8Vw==", + "node_modules/@sentry-internal/tracing": { + "version": "7.120.2", + "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.120.2.tgz", + "integrity": "sha512-eo2F8cP6X+vr54Mp6vu+NoQEDz0M5O24Tz8jPY0T1CpiWdwCmHb7Sln+oLXeQ3/LlWdVQihBfKDBZfBdUfsBTg==", "dev": true, - "license": "BSD-3-Clause", + "license": "MIT", "dependencies": { - "@sentry/hub": "6.19.7", - "@sentry/minimal": "6.19.7", - "@sentry/types": "6.19.7", - "@sentry/utils": "6.19.7", - "tslib": "^1.9.3" + "@sentry/core": "7.120.2", + "@sentry/types": "7.120.2", + "@sentry/utils": "7.120.2" }, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/@sentry/core/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true, - "license": "0BSD" - }, - "node_modules/@sentry/hub": { - "version": "6.19.7", - "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-6.19.7.tgz", - "integrity": "sha512-y3OtbYFAqKHCWezF0EGGr5lcyI2KbaXW2Ik7Xp8Mu9TxbSTuwTe4rTntwg8ngPjUQU3SUHzgjqVB8qjiGqFXCA==", + "node_modules/@sentry/core": { + "version": "7.120.2", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.120.2.tgz", + "integrity": "sha512-eurLBFQJC7WWWYoEna25Z9I/GJjqAmH339tv52XP8sqXV7B5hRcHDcfrsT/UGHpU316M24p3lWhj0eimtCZ0SQ==", "dev": true, - "license": "BSD-3-Clause", + "license": "MIT", "dependencies": { - "@sentry/types": "6.19.7", - "@sentry/utils": "6.19.7", - "tslib": "^1.9.3" + "@sentry/types": "7.120.2", + "@sentry/utils": "7.120.2" }, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/@sentry/hub/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true, - "license": "0BSD" - }, - "node_modules/@sentry/minimal": { - "version": "6.19.7", - "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-6.19.7.tgz", - "integrity": "sha512-wcYmSJOdvk6VAPx8IcmZgN08XTXRwRtB1aOLZm+MVHjIZIhHoBGZJYTVQS/BWjldsamj2cX3YGbGXNunaCfYJQ==", + "node_modules/@sentry/integrations": { + "version": "7.120.2", + "resolved": "https://registry.npmjs.org/@sentry/integrations/-/integrations-7.120.2.tgz", + "integrity": "sha512-bMvL2fD3TGLM5YAUoQ2Qz6bYeVU8f7YRFNSjKNxK4EbvFgAU9j1FD6EKg0V0RNOJYnJjGIZYMmcWTXBbVTJL6w==", "dev": true, - "license": "BSD-3-Clause", + "license": "MIT", "dependencies": { - "@sentry/hub": "6.19.7", - "@sentry/types": "6.19.7", - "tslib": "^1.9.3" + "@sentry/core": "7.120.2", + "@sentry/types": "7.120.2", + "@sentry/utils": "7.120.2", + "localforage": "^1.8.1" }, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/@sentry/minimal/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true, - "license": "0BSD" - }, "node_modules/@sentry/node": { - "version": "6.19.7", - "resolved": "https://registry.npmjs.org/@sentry/node/-/node-6.19.7.tgz", - "integrity": "sha512-gtmRC4dAXKODMpHXKfrkfvyBL3cI8y64vEi3fDD046uqYcrWdgoQsffuBbxMAizc6Ez1ia+f0Flue6p15Qaltg==", + "version": "7.120.2", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.120.2.tgz", + "integrity": "sha512-ZnW9gpIGaoU+vYZyVZca9dObfmWYiXEWIMUM/JXaFb8AhP1OXvYweNiU0Pe/gNrz4oGAogU8scJc70ar7Vj0ww==", "dev": true, - "license": "BSD-3-Clause", + "license": "MIT", "dependencies": { - "@sentry/core": "6.19.7", - "@sentry/hub": "6.19.7", - "@sentry/types": "6.19.7", - "@sentry/utils": "6.19.7", - "cookie": "^0.4.1", - "https-proxy-agent": "^5.0.0", - "lru_map": "^0.3.3", - "tslib": "^1.9.3" + "@sentry-internal/tracing": "7.120.2", + "@sentry/core": "7.120.2", + "@sentry/integrations": "7.120.2", + "@sentry/types": "7.120.2", + "@sentry/utils": "7.120.2" }, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/@sentry/node/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true, - "license": "0BSD" - }, "node_modules/@sentry/types": { - "version": "6.19.7", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-6.19.7.tgz", - "integrity": "sha512-jH84pDYE+hHIbVnab3Hr+ZXr1v8QABfhx39KknxqKWr2l0oEItzepV0URvbEhB446lk/S/59230dlUUIBGsXbg==", + "version": "7.120.2", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.120.2.tgz", + "integrity": "sha512-FWVoiblHQJ892GaOqdXx/5/n5XDLF28z81vJ0lCY49PMh8waz8LJ0b9RSmt9tasSDl0OQ7eUlPl1xu1jTrv1NA==", "dev": true, - "license": "BSD-3-Clause", + "license": "MIT", "engines": { - "node": ">=6" + "node": ">=8" } }, "node_modules/@sentry/utils": { - "version": "6.19.7", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-6.19.7.tgz", - "integrity": "sha512-z95ECmE3i9pbWoXQrD/7PgkBAzJYR+iXtPuTkpBjDKs86O3mT+PXOT3BAn79w2wkn7/i3vOGD2xVr1uiMl26dA==", + "version": "7.120.2", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.120.2.tgz", + "integrity": "sha512-jgnQlw11mRfQrQRAXbq4zEd+tbYwHel5eqeS/oU6EImXRjmHNtS79nB8MHvJeQu1FMCpFs1Ymrrs5FICwS6VeQ==", "dev": true, - "license": "BSD-3-Clause", + "license": "MIT", "dependencies": { - "@sentry/types": "6.19.7", - "tslib": "^1.9.3" + "@sentry/types": "7.120.2" }, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/@sentry/utils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true, - "license": "0BSD" - }, "node_modules/@tootallnate/quickjs-emscripten": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", @@ -592,13 +623,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.9.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.0.tgz", - "integrity": "sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==", + "version": "22.10.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.2.tgz", + "integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.19.8" + "undici-types": "~6.20.0" } }, "node_modules/@types/yauzl": { @@ -613,16 +644,16 @@ } }, "node_modules/@wordpress/e2e-test-utils-playwright": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils-playwright/-/e2e-test-utils-playwright-1.12.0.tgz", - "integrity": "sha512-Lb5Z+Ia80679efJOl3W8drIbXDlahbRIrJrQmd096n0mbRaplm+JLFydLYlT4F+5XxYbrrwTkqBcNXIA2JlXHw==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/@wordpress/e2e-test-utils-playwright/-/e2e-test-utils-playwright-1.14.0.tgz", + "integrity": "sha512-G9r3ZysgzAmUbR4bjGAEEP6P2RCIAG8uMU7yyzxOAHegINSbF3shEZKvVNBeKxNwHKAVa9koh/niGN3U4Kr6Rw==", "dev": true, "license": "GPL-2.0-or-later", "dependencies": { "change-case": "^4.1.2", "form-data": "^4.0.0", "get-port": "^5.1.1", - "lighthouse": "^10.4.0", + "lighthouse": "^12.2.2", "mime": "^3.0.0", "web-vitals": "^4.2.1" }, @@ -635,16 +666,13 @@ } }, "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", + "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", "dev": true, "license": "MIT", - "dependencies": { - "debug": "4" - }, "engines": { - "node": ">= 6.0.0" + "node": ">= 14" } }, "node_modules/ansi-colors": { @@ -806,9 +834,9 @@ "license": "MIT" }, "node_modules/axe-core": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.7.2.tgz", - "integrity": "sha512-zIURGIS1E1Q4pcrMjp+nnEh+16G56eG/MUllJH8yEvw7asDo7Ac9uhC9KIH5jzpITueEZolfYglnCGIuSBz39g==", + "version": "4.10.2", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.10.2.tgz", + "integrity": "sha512-RE3mdQ7P3FRSe7eqCWoeQ/Z9QXrtniSjp1wUjt5nRC3WIpz5rSCve6o3fsZ2aCpJtrZjSZgjwXAoTO5k4tEI0w==", "dev": true, "license": "MPL-2.0", "engines": { @@ -845,6 +873,49 @@ "license": "Apache-2.0", "optional": true }, + "node_modules/bare-fs": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-2.3.5.tgz", + "integrity": "sha512-SlE9eTxifPDJrT6YgemQ1WGFleevzwY+XAP1Xqgl56HtcrisC2CHCZ2tq6dBpcH2TnNxwUEUGhweo+lrQtYuiw==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "bare-events": "^2.0.0", + "bare-path": "^2.0.0", + "bare-stream": "^2.0.0" + } + }, + "node_modules/bare-os": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-2.4.4.tgz", + "integrity": "sha512-z3UiI2yi1mK0sXeRdc4O1Kk8aOa/e+FNWZcTiPB/dfTWyLypuE99LibgRaQki914Jq//yAWylcAt+mknKdixRQ==", + "dev": true, + "license": "Apache-2.0", + "optional": true + }, + "node_modules/bare-path": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-2.1.3.tgz", + "integrity": "sha512-lh/eITfU8hrj9Ru5quUp0Io1kJWIk1bTjzo7JH1P5dWmQ2EL4hFUlfI8FonAhSlgIfhn63p84CDY/x+PisgcXA==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "bare-os": "^2.1.0" + } + }, + "node_modules/bare-stream": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.6.1.tgz", + "integrity": "sha512-eVZbtKM+4uehzrsj49KtCy3Pbg7kO1pJ3SKZ1SFrIH/0pnj9scuGGgUlNDf/7qS8WKtGdiJY5Kyhs/ivYPTB/g==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "streamx": "^2.21.0" + } + }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -1061,16 +1132,16 @@ } }, "node_modules/chrome-launcher": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/chrome-launcher/-/chrome-launcher-0.15.2.tgz", - "integrity": "sha512-zdLEwNo3aUVzIhKhTtXfxhdvZhUghrnmkvcAq2NoDd+LeOHKf03H5jwZ8T/STsAlzyALkBVK552iaG1fGf1xVQ==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/chrome-launcher/-/chrome-launcher-1.1.2.tgz", + "integrity": "sha512-YclTJey34KUm5jB1aEJCq807bSievi7Nb/TU4Gu504fUYi3jw3KCIaH6L7nFWQhdEgH3V+wCh+kKD1P5cXnfxw==", "dev": true, "license": "Apache-2.0", "dependencies": { "@types/node": "*", "escape-string-regexp": "^4.0.0", "is-wsl": "^2.2.0", - "lighthouse-logger": "^1.0.0" + "lighthouse-logger": "^2.0.1" }, "bin": { "print-chrome-path": "bin/print-chrome-path.js" @@ -1080,13 +1151,15 @@ } }, "node_modules/chromium-bidi": { - "version": "0.4.16", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.16.tgz", - "integrity": "sha512-7ZbXdWERxRxSwo3txsBjjmc/NLxqb1Bk30mRb0BMS4YIaiV6zvKZqL/UAH+DdqcDYayDWk2n/y8klkBDODrPvA==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.8.0.tgz", + "integrity": "sha512-uJydbGdTw0DEUjhoogGveneJVWX/9YuqkWePzMmkBYwtdAqo5d3J/ovNKFr+/2hWXYmYCr6it8mSSTIj6SS6Ug==", "dev": true, "license": "Apache-2.0", "dependencies": { - "mitt": "3.0.0" + "mitt": "3.0.1", + "urlpattern-polyfill": "10.0.0", + "zod": "3.23.8" }, "peerDependencies": { "devtools-protocol": "*" @@ -1204,16 +1277,6 @@ "dev": true, "license": "MIT" }, - "node_modules/cookie": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", - "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/copy-props": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-4.0.0.tgz", @@ -1235,16 +1298,6 @@ "dev": true, "license": "MIT" }, - "node_modules/cross-fetch": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", - "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", - "dev": true, - "license": "MIT", - "dependencies": { - "node-fetch": "^2.6.12" - } - }, "node_modules/crypto-random-string": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", @@ -1273,23 +1326,22 @@ } }, "node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "license": "MIT", "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "ms": "2.0.0" } }, + "node_modules/decimal.js": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", + "dev": true, + "license": "MIT" + }, "node_modules/define-lazy-prop": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", @@ -1350,9 +1402,9 @@ } }, "node_modules/devtools-protocol": { - "version": "0.0.1155343", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1155343.tgz", - "integrity": "sha512-oD9vGBV2wTc7fAzAM6KC0chSgs234V8+qDEeK+mcbRj2UvcuA7lgBztGi/opj/iahcXD3BSj8Ymvib628yy9FA==", + "version": "0.0.1312386", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1312386.tgz", + "integrity": "sha512-DPnhUXvmvKT2dFA/j7B+riVLUt9Q6RKJlcppojL5CoRywJJKLDYnRlw0gTFKfgDPHP5E04UoB71SxoJlVZy8FA==", "dev": true, "license": "BSD-3-Clause" }, @@ -1559,6 +1611,31 @@ "@types/yauzl": "^2.9.1" } }, + "node_modules/extract-zip/node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/extract-zip/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, "node_modules/fast-fifo": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", @@ -1700,21 +1777,6 @@ "node": ">= 6" } }, - "node_modules/fs-extra": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", - "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, "node_modules/fs-mkdirp-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-2.0.1.tgz", @@ -1794,21 +1856,45 @@ } }, "node_modules/get-uri": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.3.tgz", - "integrity": "sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.4.tgz", + "integrity": "sha512-E1b1lFFLvLgak2whF2xDBcOy6NLVGZBqqjJjsIhvopKfWWEi64pLVTWWehV8KlLerZkfNTA95sTe2OdJKm1OzQ==", "dev": true, "license": "MIT", "dependencies": { "basic-ftp": "^5.0.2", "data-uri-to-buffer": "^6.0.2", - "debug": "^4.3.4", - "fs-extra": "^11.2.0" + "debug": "^4.3.4" }, "engines": { "node": ">= 14" } }, + "node_modules/get-uri/node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/get-uri/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", @@ -2214,33 +2300,70 @@ "node": ">= 14" } }, - "node_modules/http-proxy-agent/node_modules/agent-base": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", - "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "node_modules/http-proxy-agent/node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { - "debug": "^4.3.4" + "ms": "^2.1.3" }, "engines": { - "node": ">= 14" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, + "node_modules/http-proxy-agent/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", "dev": true, "license": "MIT", "dependencies": { - "agent-base": "6", + "agent-base": "^7.1.2", "debug": "4" }, "engines": { - "node": ">= 6" + "node": ">= 14" + } + }, + "node_modules/https-proxy-agent/node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, + "node_modules/https-proxy-agent/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, "node_modules/iconv-lite": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", @@ -2282,10 +2405,17 @@ "dev": true, "license": "MIT" }, + "node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", + "dev": true, + "license": "MIT" + }, "node_modules/immutable": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.0.2.tgz", - "integrity": "sha512-1NU7hWZDkV7hJ4PJ9dur9gTNQ4ePNPN4k9/0YhwjzykTi/+3Q5pF93YU5QoVj8BuOnhLgaY8gs0U2pj4kSYVcw==", + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.0.3.tgz", + "integrity": "sha512-P8IdPQHq3lA1xVeBRi5VPqUm5HDgKnx0Ru51wZz5mjxHr5n3RWhjIpOFU7ybkUxfB+5IToy+OLaHYDBIWsv+uw==", "dev": true, "license": "MIT" }, @@ -2324,23 +2454,18 @@ } }, "node_modules/intl-messageformat": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-4.4.0.tgz", - "integrity": "sha512-z+Bj2rS3LZSYU4+sNitdHrwnBhr0wO80ZJSW8EzKDBowwUe3Q/UsvgCGjrwa+HPzoGCLEb9HAjfJgo4j2Sac8w==", + "version": "10.7.10", + "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-10.7.10.tgz", + "integrity": "sha512-hp7iejCBiJdW3zmOe18FdlJu8U/JsADSDiBPQhfdSeI8B9POtvPRvPh3nMlvhYayGMKLv6maldhR7y3Pf1vkpw==", "dev": true, "license": "BSD-3-Clause", "dependencies": { - "intl-messageformat-parser": "^1.8.1" + "@formatjs/ecma402-abstract": "2.3.1", + "@formatjs/fast-memoize": "2.2.5", + "@formatjs/icu-messageformat-parser": "2.9.7", + "tslib": "2" } }, - "node_modules/intl-messageformat-parser": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/intl-messageformat-parser/-/intl-messageformat-parser-1.8.1.tgz", - "integrity": "sha512-IMSCKVf0USrM/959vj3xac7s8f87sc+80Y/ipBzdKy4ifBv5Gsj2tZ41EAaURVg01QU71fYr77uA8Meh6kELbg==", - "deprecated": "We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/ip-address": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", @@ -2383,9 +2508,9 @@ } }, "node_modules/is-core-module": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", - "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.0.tgz", + "integrity": "sha512-urTSINYfAYgcbLb0yDQ6egFm6h3Mo1DcF9EkyXSRjjzdHbsulg01qhwWuXdOoUBuTkbQ80KDboXa0vFJ+BDH+g==", "dev": true, "license": "MIT", "dependencies": { @@ -2627,19 +2752,6 @@ "dev": true, "license": "MIT" }, - "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, "node_modules/last-run": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/last-run/-/last-run-2.0.0.tgz", @@ -2660,6 +2772,16 @@ "node": ">=10.13.0" } }, + "node_modules/lie": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", + "integrity": "sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==", + "dev": true, + "license": "MIT", + "dependencies": { + "immediate": "~3.0.5" + } + }, "node_modules/liftoff": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-5.0.0.tgz", @@ -2680,36 +2802,37 @@ } }, "node_modules/lighthouse": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/lighthouse/-/lighthouse-10.4.0.tgz", - "integrity": "sha512-XQWHEWkJ8YxSPsxttBJORy5+hQrzbvGkYfeP3fJjyYKioWkF2MXfFqNK4ZuV4jL8pBu7Z91qnQP6In0bq1yXww==", + "version": "12.3.0", + "resolved": "https://registry.npmjs.org/lighthouse/-/lighthouse-12.3.0.tgz", + "integrity": "sha512-OaLE8DasnwQkn2CBo2lKtD+IQv42mNP3T+Vaw29I++rAh0Zpgc6SM15usdIYyzhRMR5EWFxze5Fyb+HENJSh2A==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@sentry/node": "^6.17.4", - "axe-core": "4.7.2", - "chrome-launcher": "^0.15.2", + "@paulirish/trace_engine": "0.0.39", + "@sentry/node": "^7.0.0", + "axe-core": "^4.10.2", + "chrome-launcher": "^1.1.2", "configstore": "^5.0.1", "csp_evaluator": "1.1.1", - "devtools-protocol": "0.0.1155343", + "devtools-protocol": "0.0.1312386", "enquirer": "^2.3.6", "http-link-header": "^1.1.1", - "intl-messageformat": "^4.4.0", + "intl-messageformat": "^10.5.3", "jpeg-js": "^0.4.4", - "js-library-detector": "^6.6.0", - "lighthouse-logger": "^1.4.1", - "lighthouse-stack-packs": "1.11.0", - "lodash": "^4.17.21", + "js-library-detector": "^6.7.0", + "lighthouse-logger": "^2.0.1", + "lighthouse-stack-packs": "1.12.2", + "lodash-es": "^4.17.21", "lookup-closest-locale": "6.2.0", "metaviewport-parser": "0.3.0", "open": "^8.4.0", "parse-cache-control": "1.0.1", - "ps-list": "^8.0.0", - "puppeteer-core": "^20.8.0", - "robots-parser": "^3.0.0", + "puppeteer-core": "^23.10.4", + "robots-parser": "^3.0.1", "semver": "^5.3.0", "speedline-core": "^1.4.3", - "third-party-web": "^0.23.3", + "third-party-web": "^0.26.1", + "tldts-icann": "^6.1.16", "ws": "^7.0.0", "yargs": "^17.3.1", "yargs-parser": "^21.0.0" @@ -2720,13 +2843,13 @@ "smokehouse": "cli/test/smokehouse/frontends/smokehouse-bin.js" }, "engines": { - "node": ">=16.16" + "node": ">=18.16" } }, "node_modules/lighthouse-logger": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/lighthouse-logger/-/lighthouse-logger-1.4.2.tgz", - "integrity": "sha512-gPWxznF6TKmUHrOQjlVo2UbaL2EJ71mb2CCeRs/2qBpi4L/g4LUVc9+3lKQ6DTUZwJswfM7ainGrLO1+fOqa2g==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/lighthouse-logger/-/lighthouse-logger-2.0.1.tgz", + "integrity": "sha512-ioBrW3s2i97noEmnXxmUq7cjIcVRjT5HBpAYy8zE11CxU9HqlWHHeRxfeN1tn8F7OEMVPIC9x1f8t3Z7US9ehQ==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -2734,27 +2857,10 @@ "marky": "^1.2.2" } }, - "node_modules/lighthouse-logger/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/lighthouse-logger/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true, - "license": "MIT" - }, "node_modules/lighthouse-stack-packs": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/lighthouse-stack-packs/-/lighthouse-stack-packs-1.11.0.tgz", - "integrity": "sha512-sRr0z1S/I26VffRLq9KJsKtLk856YrJlNGmcJmbLX8dFn3MuzVPUbstuChEhqnSxZb8TZmVfthuXuwhG9vRoSw==", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/lighthouse-stack-packs/-/lighthouse-stack-packs-1.12.2.tgz", + "integrity": "sha512-Ug8feS/A+92TMTCK6yHYLwaFMuelK/hAKRMdldYkMNwv+d9PtWxjXEg6rwKtsUXTADajhdrhXyuNCJ5/sfmPFw==", "dev": true, "license": "Apache-2.0" }, @@ -2792,10 +2898,20 @@ "node": ">=12" } }, - "node_modules/lodash": { + "node_modules/localforage": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.10.0.tgz", + "integrity": "sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "lie": "3.1.1" + } + }, + "node_modules/lodash-es": { "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", "dev": true, "license": "MIT" }, @@ -2823,13 +2939,6 @@ "tslib": "^2.0.3" } }, - "node_modules/lru_map": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", - "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==", - "dev": true, - "license": "MIT" - }, "node_modules/lru-cache": { "version": "7.18.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", @@ -2958,23 +3067,16 @@ } }, "node_modules/mitt": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.0.tgz", - "integrity": "sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", "dev": true, "license": "MIT" }, "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true, "license": "MIT" }, @@ -3017,27 +3119,6 @@ "license": "MIT", "optional": true }, - "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -3119,51 +3200,49 @@ } }, "node_modules/pac-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.2.tgz", - "integrity": "sha512-BFi3vZnO9X5Qt6NRz7ZOaPja3ic0PhlsmCRYLOpN11+mWBCR6XJDqW5RF3j8jm4WGGQZtBA+bTfxYzeKW73eHg==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.1.0.tgz", + "integrity": "sha512-Z5FnLVVZSnX7WjBg0mhDtydeRZ1xMcATZThjySQUHqr+0ksP8kqaw23fNKkaaN/Z8gwLUs/W7xdl0I75eP2Xyw==", "dev": true, "license": "MIT", "dependencies": { "@tootallnate/quickjs-emscripten": "^0.23.0", - "agent-base": "^7.0.2", + "agent-base": "^7.1.2", "debug": "^4.3.4", "get-uri": "^6.0.1", "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.5", + "https-proxy-agent": "^7.0.6", "pac-resolver": "^7.0.1", - "socks-proxy-agent": "^8.0.4" + "socks-proxy-agent": "^8.0.5" }, "engines": { "node": ">= 14" } }, - "node_modules/pac-proxy-agent/node_modules/agent-base": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", - "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "node_modules/pac-proxy-agent/node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { - "debug": "^4.3.4" + "ms": "^2.1.3" }, "engines": { - "node": ">= 14" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/pac-proxy-agent/node_modules/https-proxy-agent": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", - "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", + "node_modules/pac-proxy-agent/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "^7.0.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } + "license": "MIT" }, "node_modules/pac-resolver": { "version": "7.0.1", @@ -3301,13 +3380,13 @@ } }, "node_modules/playwright": { - "version": "1.48.2", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.48.2.tgz", - "integrity": "sha512-NjYvYgp4BPmiwfe31j4gHLa3J7bD2WiBz8Lk2RoSsmX38SVIARZ18VYjxLjAcDsAhA+F4iSEXTSGgjua0rrlgQ==", + "version": "1.49.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.49.1.tgz", + "integrity": "sha512-VYL8zLoNTBxVOrJBbDuRgDWa3i+mfQgDTrL8Ah9QXZ7ax4Dsj0MSq5bYgytRnDVVe+njoKnfsYkH3HzqVj5UZA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "playwright-core": "1.48.2" + "playwright-core": "1.49.1" }, "bin": { "playwright": "cli.js" @@ -3320,9 +3399,9 @@ } }, "node_modules/playwright-core": { - "version": "1.48.2", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.48.2.tgz", - "integrity": "sha512-sjjw+qrLFlriJo64du+EK0kJgZzoQPsabGF4lBvsid+3CNIZIYLgnMj9V6JY5VhM2Peh20DJWIVpVljLLnlawA==", + "version": "1.49.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.49.1.tgz", + "integrity": "sha512-BzmpVcs4kE2CH15rWfzpjzVGhWERJfmnXmniSyKeRZUs9Ws65m+RGIi7mjJK/euCegfn3i7jvqWeWyHe9y3Vgg==", "dev": true, "license": "Apache-2.0", "bin": { @@ -3394,51 +3473,49 @@ } }, "node_modules/proxy-agent": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.3.0.tgz", - "integrity": "sha512-0LdR757eTj/JfuU7TL2YCuAZnxWXu3tkJbg4Oq3geW/qFNT/32T0sp2HnZ9O0lMR4q3vwAt0+xCA8SR0WAD0og==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.5.0.tgz", + "integrity": "sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A==", "dev": true, "license": "MIT", "dependencies": { - "agent-base": "^7.0.2", + "agent-base": "^7.1.2", "debug": "^4.3.4", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.6", "lru-cache": "^7.14.1", - "pac-proxy-agent": "^7.0.0", + "pac-proxy-agent": "^7.1.0", "proxy-from-env": "^1.1.0", - "socks-proxy-agent": "^8.0.1" + "socks-proxy-agent": "^8.0.5" }, "engines": { "node": ">= 14" } }, - "node_modules/proxy-agent/node_modules/agent-base": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", - "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "node_modules/proxy-agent/node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { - "debug": "^4.3.4" + "ms": "^2.1.3" }, "engines": { - "node": ">= 14" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/proxy-agent/node_modules/https-proxy-agent": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", - "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", + "node_modules/proxy-agent/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true, - "license": "MIT", - "dependencies": { - "agent-base": "^7.0.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } + "license": "MIT" }, "node_modules/proxy-from-env": { "version": "1.1.0", @@ -3447,19 +3524,6 @@ "dev": true, "license": "MIT" }, - "node_modules/ps-list": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/ps-list/-/ps-list-8.1.1.tgz", - "integrity": "sha512-OPS9kEJYVmiO48u/B9qneqhkMvgCxT+Tm28VCEJpheTpl8cJ0ffZRRNgS5mrQRTrX5yRTpaJ+hRDeefXYmmorQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/pump": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", @@ -3472,39 +3536,31 @@ } }, "node_modules/puppeteer-core": { - "version": "20.9.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-20.9.0.tgz", - "integrity": "sha512-H9fYZQzMTRrkboEfPmf7m3CLDN6JvbxXA3qTtS+dFt27tR+CsFHzPsT6pzp6lYL6bJbAPaR0HaPO6uSi+F94Pg==", + "version": "23.10.4", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-23.10.4.tgz", + "integrity": "sha512-pQAY7+IFAndWDkDodsQGguW1/ifV5OMlGXJDspwtK49Asb7poJZ/V5rXJxVSpq57bWrJasjQBZ1X27z1oWVq4Q==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@puppeteer/browsers": "1.4.6", - "chromium-bidi": "0.4.16", - "cross-fetch": "4.0.0", - "debug": "4.3.4", - "devtools-protocol": "0.0.1147663", - "ws": "8.13.0" + "@puppeteer/browsers": "2.6.1", + "chromium-bidi": "0.8.0", + "debug": "^4.4.0", + "devtools-protocol": "0.0.1367902", + "typed-query-selector": "^2.12.0", + "ws": "^8.18.0" }, "engines": { - "node": ">=16.3.0" - }, - "peerDependencies": { - "typescript": ">= 4.7.4" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "node": ">=18" } }, "node_modules/puppeteer-core/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -3516,23 +3572,23 @@ } }, "node_modules/puppeteer-core/node_modules/devtools-protocol": { - "version": "0.0.1147663", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1147663.tgz", - "integrity": "sha512-hyWmRrexdhbZ1tcJUGpO95ivbRhWXz++F4Ko+n21AY5PNln2ovoJw+8ZMNDTtip+CNFQfrtLVh/w4009dXO/eQ==", + "version": "0.0.1367902", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1367902.tgz", + "integrity": "sha512-XxtPuC3PGakY6PD7dG66/o8KwJ/LkH2/EKe19Dcw58w53dv4/vSQEkn/SzuyhHE2q4zPgCkxQBxus3VV4ql+Pg==", "dev": true, "license": "BSD-3-Clause" }, "node_modules/puppeteer-core/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true, "license": "MIT" }, "node_modules/puppeteer-core/node_modules/ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", "dev": true, "license": "MIT", "engines": { @@ -3637,13 +3693,13 @@ } }, "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "version": "1.22.9", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.9.tgz", + "integrity": "sha512-QxrmX1DzraFIi9PxdG5VkRfRwIgjwyud+z/iBwfRRrVmHc+P9Q7u2lSSpQ6bjr2gy5lrqIiU9vb6iAeGf2400A==", "dev": true, "license": "MIT", "dependencies": { - "is-core-module": "^2.13.0", + "is-core-module": "^2.16.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -3731,9 +3787,9 @@ "license": "MIT" }, "node_modules/sass": { - "version": "1.81.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.81.0.tgz", - "integrity": "sha512-Q4fOxRfhmv3sqCLoGfvrC9pRV8btc0UtqL9mN6Yrv6Qi9ScL55CVH1vlPP863ISLEEMNLLuu9P+enCeGHlnzhA==", + "version": "1.83.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.83.0.tgz", + "integrity": "sha512-qsSxlayzoOjdvXMVLkzF84DJFc2HZEL/rFyGIKbbilYtAvlCxyuzUeff9LawTn4btVnLKg75Z8MMr1lxU1lfGw==", "dev": true, "license": "MIT", "dependencies": { @@ -3861,13 +3917,13 @@ } }, "node_modules/socks-proxy-agent": { - "version": "8.0.4", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz", - "integrity": "sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==", + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz", + "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==", "dev": true, "license": "MIT", "dependencies": { - "agent-base": "^7.1.1", + "agent-base": "^7.1.2", "debug": "^4.3.4", "socks": "^2.8.3" }, @@ -3875,19 +3931,31 @@ "node": ">= 14" } }, - "node_modules/socks-proxy-agent/node_modules/agent-base": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", - "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "node_modules/socks-proxy-agent/node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { - "debug": "^4.3.4" + "ms": "^2.1.3" }, "engines": { - "node": ">= 14" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, + "node_modules/socks-proxy-agent/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -3958,9 +4026,9 @@ "license": "MIT" }, "node_modules/streamx": { - "version": "2.20.2", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.20.2.tgz", - "integrity": "sha512-aDGDLU+j9tJcUdPGOaHmVF1u/hhI+CsGkT02V3OKlHDV7IukOI+nTWAGkiZEKCO35rWN1wIr4tS7YFr1f4qSvA==", + "version": "2.21.1", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.21.1.tgz", + "integrity": "sha512-PhP9wUnFLa+91CPy3N6tiQsK+gnYyUNuk15S3YG/zjYE7RuPeCjJngqnzpC31ow0lzBHQ+QGO4cNJnd0djYUsw==", "dev": true, "license": "MIT", "dependencies": { @@ -4058,15 +4126,18 @@ } }, "node_modules/tar-fs": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", - "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.6.tgz", + "integrity": "sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w==", "dev": true, "license": "MIT", "dependencies": { - "mkdirp-classic": "^0.5.2", "pump": "^3.0.0", "tar-stream": "^3.1.5" + }, + "optionalDependencies": { + "bare-fs": "^2.1.1", + "bare-path": "^2.1.0" } }, "node_modules/tar-stream": { @@ -4092,16 +4163,19 @@ } }, "node_modules/text-decoder": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.1.tgz", - "integrity": "sha512-x9v3H/lTKIJKQQe7RPQkLfKAnc9lUTkWDypIQgTzPJAq+5/GCDHonmshfvlsNSj58yyshbIJJDLmU15qNERrXQ==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.3.tgz", + "integrity": "sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA==", "dev": true, - "license": "Apache-2.0" + "license": "Apache-2.0", + "dependencies": { + "b4a": "^1.6.4" + } }, "node_modules/third-party-web": { - "version": "0.23.4", - "resolved": "https://registry.npmjs.org/third-party-web/-/third-party-web-0.23.4.tgz", - "integrity": "sha512-kwYnSZRhEvv0SBW2fp8SBBKRglMoBjV8xz6C31m0ewqOtknB5UL+Ihg+M81hyFY5ldkZuGWPb+e4GVDkzf/gYg==", + "version": "0.26.2", + "resolved": "https://registry.npmjs.org/third-party-web/-/third-party-web-0.26.2.tgz", + "integrity": "sha512-taJ0Us0lKoYBqcbccMuDElSUPOxmBfwlHe1OkHQ3KFf+RwovvBHdXhbFk9XJVQE2vHzxbTwvwg5GFsT9hbDokQ==", "dev": true, "license": "MIT" }, @@ -4122,6 +4196,23 @@ "readable-stream": "2 || 3" } }, + "node_modules/tldts-core": { + "version": "6.1.68", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.68.tgz", + "integrity": "sha512-85TdlS/DLW/gVdf2oyyzqp3ocS30WxjaL4la85EArl9cHUR/nizifKAJPziWewSZjDZS71U517/i6ciUeqtB5Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/tldts-icann": { + "version": "6.1.68", + "resolved": "https://registry.npmjs.org/tldts-icann/-/tldts-icann-6.1.68.tgz", + "integrity": "sha512-5Ue5gQ0sVFtK3KTRD7v9xB4CanUIFq1x8vZw8imTuwAqzo6SEvTh653qJM8AAtp2kLj+gJ9C+k+kabh1Zx4qZg==", + "dev": true, + "license": "MIT", + "dependencies": { + "tldts-core": "^6.1.68" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -4148,13 +4239,6 @@ "node": ">=10.13.0" } }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true, - "license": "MIT" - }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -4162,6 +4246,13 @@ "dev": true, "license": "0BSD" }, + "node_modules/typed-query-selector": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.0.tgz", + "integrity": "sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg==", + "dev": true, + "license": "MIT" + }, "node_modules/typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", @@ -4233,9 +4324,9 @@ } }, "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", "dev": true, "license": "MIT" }, @@ -4252,16 +4343,6 @@ "node": ">=8" } }, - "node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/upper-case": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-2.0.2.tgz", @@ -4282,6 +4363,13 @@ "tslib": "^2.0.3" } }, + "node_modules/urlpattern-polyfill": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", + "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==", + "dev": true, + "license": "MIT" + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -4411,24 +4499,6 @@ "dev": true, "license": "Apache-2.0" }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true, - "license": "BSD-2-Clause" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -4581,6 +4651,16 @@ "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" } + }, + "node_modules/zod": { + "version": "3.23.8", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", + "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } } } } diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 7a05ad2..f46f566 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -1,8 +1,8 @@ array( 'name' => 'xjsv/cooked', - 'pretty_version' => '1.8.9', - 'version' => '1.8.9.0', + 'pretty_version' => '1.9.0', + 'version' => '1.9.0.0', 'reference' => null, 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', @@ -20,8 +20,8 @@ 'dev_requirement' => false, ), 'xjsv/cooked' => array( - 'pretty_version' => '1.8.9', - 'version' => '1.8.9.0', + 'pretty_version' => '1.9.0', + 'version' => '1.9.0.0', 'reference' => null, 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', From da5a54338e9622c11caa86e1e5d72b38a0441687 Mon Sep 17 00:00:00 2001 From: Armand Tresova Date: Tue, 24 Dec 2024 14:30:35 -0500 Subject: [PATCH 06/17] PHP v8.3 Fixes --- cooked.php | 16 ++++++++++++---- includes/class.cooked-taxonomies.php | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/cooked.php b/cooked.php index 0629a98..5b2da89 100644 --- a/cooked.php +++ b/cooked.php @@ -6,7 +6,7 @@ Description: A recipe plugin for WordPress. Author: Gora Tech Author URI: https://goratech.dev -Version: 1.8.9 +Version: 1.9.0 Text Domain: cooked Domain Path: languages License: GPL2 @@ -30,7 +30,7 @@ require_once __DIR__ . '/vendor/autoload.php'; -define( 'COOKED_VERSION', '1.8.9' ); +define( 'COOKED_VERSION', '1.9.0' ); define( 'COOKED_DEV', false ); if ( ! class_exists( 'Cooked_Plugin' ) ) : @@ -188,7 +188,7 @@ final class Cooked_Plugin { * Cooked Rank Math SEO Object. * * @var object|Cooked_RankMathSEO - * @since 1.0.0 + * @since 1.8.9 */ public $rankmathseo; @@ -196,10 +196,18 @@ final class Cooked_Plugin { * Cooked Yoast SEO Object. * * @var object|Cooked_YoastSEO - * @since 1.0.0 + * @since 1.8.9 */ public $yoastseo; + /** + * Cooked Extra Object. + * + * @var object|Cooked_Extra + * @since 1.8.7 + */ + public $extra; + /** * Main Cooked_Plugin Instance. * diff --git a/includes/class.cooked-taxonomies.php b/includes/class.cooked-taxonomies.php index 076ca1a..4e490e4 100644 --- a/includes/class.cooked-taxonomies.php +++ b/includes/class.cooked-taxonomies.php @@ -60,7 +60,7 @@ public static function get() { ], $taxonomy_permalinks, $query_var ); - if ( !in_array( 'cp_recipe_category', $_cooked_settings['recipe_taxonomies'] ) ): unset( $taxonomies['cp_recipe_category'] ); endif; + if ( !empty($_cooked_settings['recipe_taxonomies']) && !in_array( 'cp_recipe_category', $_cooked_settings['recipe_taxonomies'] ) ): unset( $taxonomies['cp_recipe_category'] ); endif; // Filters add_filter( 'term_link', ['Cooked_Taxonomies', 'term_link_filter'], 10, 3); From 3ffb0c8c26d4043cb9ab040f0ce3557ea32cd6a3 Mon Sep 17 00:00:00 2001 From: Armand Tresova Date: Tue, 24 Dec 2024 19:48:20 -0500 Subject: [PATCH 07/17] Fixed bug when settings have never been saved Such as when first installing the plugin, the settings do not have default options. --- includes/class.cooked-settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class.cooked-settings.php b/includes/class.cooked-settings.php index 33e6f18..72be13a 100644 --- a/includes/class.cooked-settings.php +++ b/includes/class.cooked-settings.php @@ -77,7 +77,7 @@ public static function get() { foreach ( $tab['fields'] as $name => $field ) { if ( $field['type'] == 'nonce' || $field['type'] == 'misc_button' ) continue; - if ( $cooked_settings_saved && $version_compare >= 0 ) { + if ( !$cooked_settings_saved || ( $cooked_settings_saved && $version_compare >= 0 ) ) { if ( $field['type'] == 'checkboxes' ) { $_cooked_settings[$name] = isset($_cooked_settings[$name]) ? $_cooked_settings[$name] : ( isset( $field['default'] ) ? $field['default'] : [] ); } else { From 8f2f2483acac2c25ed3f33a2b8e0085a1fe55f15 Mon Sep 17 00:00:00 2001 From: Armand Tresova Date: Tue, 24 Dec 2024 19:54:41 -0500 Subject: [PATCH 08/17] PHP v8.3 Fixes And some code formatting. --- assets/admin/js/cooked-widgets.js | 22 ++-- includes/class.cooked-enqueues.php | 149 ++++++++++++++------------- includes/class.cooked-shortcodes.php | 12 +-- includes/class.cooked-taxonomies.php | 2 +- readme.txt | 1 + 5 files changed, 96 insertions(+), 90 deletions(-) diff --git a/assets/admin/js/cooked-widgets.js b/assets/admin/js/cooked-widgets.js index 0a68abf..b241b33 100644 --- a/assets/admin/js/cooked-widgets.js +++ b/assets/admin/js/cooked-widgets.js @@ -1,12 +1,11 @@ ;(function ( $, window, document, undefined ) { - $('body').on( 'change', '.cooked-widget-conditional', function(){ + $('body').on( 'change', '.cooked-widget-conditional', function() { var thisConditional = $(this); cooked_widget_conditional_init( thisConditional ); }); - $('body').on( 'click', '.cooked-recipe-finder-show', function(e){ - + $('body').on( 'click', '.cooked-recipe-finder-show', function(e) { e.preventDefault(); var thisFinderShowLink = $(this), thisFinderShow = thisFinderShowLink.attr('id'); @@ -29,10 +28,10 @@ closeAfterSelect: true, openOnFocus: false, options: [], - onInitialize: function(){ + onInitialize: function() { $( '#' + thisFinderID + '-selectized' ).focus(); }, - onItemAdd: function(){ + onItemAdd: function() { thisFinder.trigger('change'); }, render: { @@ -64,10 +63,10 @@ if (!res.hasOwnProperty(key)) continue; var obj = res[key]; for (var prop in obj) { - if(!obj.hasOwnProperty(prop)) continue; - if ( prop == 'id' ){ + if (!obj.hasOwnProperty(prop)) continue; + if (prop == 'id') { var id = obj[prop]; - } else if ( prop == 'title' ){ + } else if (prop == 'title') { var title = obj[prop].rendered; } } @@ -83,10 +82,9 @@ })(jQuery, window, document); -function cooked_widget_conditional_init( thisConditional ){ - - thisConditional_ID = thisConditional.attr('id'), - thisConditional_VAL = jQuery( '#' + thisConditional_ID + ' option:selected').val(); +function cooked_widget_conditional_init(thisConditional) { + thisConditional_ID = thisConditional.attr('id'); + thisConditional_VAL = jQuery('#' + thisConditional_ID + ' option:selected').val(); jQuery( 'body' ).find( '[data-condition="' + thisConditional_ID + '"]' ).each(function(){ var thisValue = jQuery(this).data('value'); diff --git a/includes/class.cooked-enqueues.php b/includes/class.cooked-enqueues.php index d57441c..782e06d 100644 --- a/includes/class.cooked-enqueues.php +++ b/includes/class.cooked-enqueues.php @@ -19,76 +19,83 @@ */ class Cooked_Enqueues { - function __construct() { - add_action('wp_enqueue_scripts', [&$this, 'enqueues'], 10, 1); - add_action('wp_enqueue_scripts', [&$this, 'css_colors'], 11); - add_action('wp_enqueue_scripts', [&$this, 'css_responsive'], 11); - add_action('wp_footer', [&$this, 'footer_enqueues']); - } - - public function enqueues($hook) { - global $_cooked_settings; - - $cooked_js_vars = [ - 'ajax_url' => admin_url('admin-ajax.php'), - 'timer_sound' => apply_filters('cooked_timer_sound_mp3', COOKED_URL . 'assets/audio/ding.mp3'), - 'i18n_timer' => __('Timer', 'cooked'), - ]; - - $min = COOKED_DEV ? '' : '.min'; - - wp_enqueue_style('cooked-essentials', COOKED_URL . 'assets/admin/css/essentials' . $min . '.css', [], COOKED_VERSION); - wp_enqueue_style('cooked-icons', COOKED_URL . 'assets/css/icons' . $min . '.css', [], COOKED_VERSION); - wp_enqueue_style('cooked-styling', COOKED_URL . 'assets/css/style' . $min . '.css', [], COOKED_VERSION ); - wp_register_style('cooked-fotorama', COOKED_URL . 'assets/css/fotorama/fotorama.min.css', [], '4.6.4'); - wp_register_script('cooked-fotorama', COOKED_URL . 'assets/js/fotorama/fotorama' . $min . '.js', ['jquery'], '4.6.4'); - wp_register_script('cooked-timer', COOKED_URL . 'assets/js/timer/jquery.simple.timer' . $min . '.js', ['jquery'], '0.0.5'); - wp_register_script('cooked-nosleep', COOKED_URL . 'assets/js/nosleep/NoSleep' . $min . '.js', [], '0.12.0'); - - // Compatibility with the Bridge Theme. - if (!defined('QODE_ROOT')) { - wp_register_script('cooked-appear', COOKED_URL . 'assets/js/appear/jquery.appear' . $min . '.js', ['jquery'], '0.3.6'); - } - - wp_register_script('cooked-functions', COOKED_URL . 'assets/js/cooked-functions' . $min . '.js', ['jquery'], COOKED_VERSION); - wp_localize_script('cooked-functions', 'cooked_js_vars', $cooked_js_vars); - } - - public function css_colors() { - if (!isset($_GET['print'])) { - $file = COOKED_DIR . 'assets/css/colors.php'; - $css = self::get_dynamic_css($file); - wp_add_inline_style('cooked-styling', $css); - } - } - - public function css_responsive() { - if (!isset($_GET['print'])) { - $file = COOKED_DIR . 'assets/css/responsive.php'; - $css = self::get_dynamic_css($file); - wp_add_inline_style('cooked-styling', $css); - } - } - - public static function get_dynamic_css($file = false) { - if (!$file || $file && !file_exists($file)) return; - - ob_start(); - include $file; - $css = ob_get_clean(); - $compressed_css = self::compress_css($css); - - return $compressed_css; - } - - public static function compress_css($css) { - // Remove tabs, spaces, newlines, etc. - $css = str_replace(["\r\n", "\r", "\n", "\t", ' ', ' ', ' '], '', $css); - return $css; - } - - public function footer_enqueues() { - wp_enqueue_script('cooked-functions'); - } + function __construct() { + add_action('wp_enqueue_scripts', [&$this, 'enqueues'], 10, 1); + add_action('wp_enqueue_scripts', [&$this, 'css_colors'], 11); + add_action('wp_enqueue_scripts', [&$this, 'css_responsive'], 11); + add_action('wp_footer', [&$this, 'footer_enqueues']); + } + + public function enqueues($hook) { + global $_cooked_settings; + + $cooked_js_vars = [ + 'ajax_url' => admin_url('admin-ajax.php'), + 'timer_sound' => apply_filters('cooked_timer_sound_mp3', COOKED_URL . 'assets/audio/ding.mp3'), + 'i18n_timer' => __('Timer', 'cooked'), + 'permalink_structure' => get_option('permalink_structure'), + 'browse_recipes_slug' => !isset($_cooked_settings['browse_recipes_slug']) ? 'browse-recipes' : $_cooked_settings['browse_recipes_slug'], + 'recipe_category_slug' => !isset($_cooked_settings['recipe_category_permalink']) ? 'recipe-category' : $_cooked_settings['recipe_category_permalink'], + 'recipe_cooking_method_slug' => !isset($_cooked_settings['recipe_cooking_method_permalink']) ? 'cooking-method' : $_cooked_settings['recipe_cooking_method_permalink'], + 'recipe_cuisine_slug' => !isset($_cooked_settings['recipe_cuisine_permalink']) ? 'cuisine' : $_cooked_settings['recipe_cuisine_permalink'], + 'recipe_tags_slug' => !isset($_cooked_settings['recipe_tag_permalink']) ? 'recipe-tag' : $_cooked_settings['recipe_tag_permalink'], + 'recipe_diet_slug' => !isset($_cooked_settings['recipe_diet_permalink']) ? 'diet' : $_cooked_settings['recipe_diet_permalink'], + ]; + + $min = COOKED_DEV ? '' : '.min'; + + wp_enqueue_style('cooked-essentials', COOKED_URL . 'assets/admin/css/essentials' . $min . '.css', [], COOKED_VERSION); + wp_enqueue_style('cooked-icons', COOKED_URL . 'assets/css/icons' . $min . '.css', [], COOKED_VERSION); + wp_enqueue_style('cooked-styling', COOKED_URL . 'assets/css/style' . $min . '.css', [], COOKED_VERSION ); + wp_register_style('cooked-fotorama', COOKED_URL . 'assets/css/fotorama/fotorama.min.css', [], '4.6.4'); + wp_register_script('cooked-fotorama', COOKED_URL . 'assets/js/fotorama/fotorama' . $min . '.js', ['jquery'], '4.6.4'); + wp_register_script('cooked-timer', COOKED_URL . 'assets/js/timer/jquery.simple.timer' . $min . '.js', ['jquery'], '0.0.5'); + wp_register_script('cooked-nosleep', COOKED_URL . 'assets/js/nosleep/NoSleep' . $min . '.js', [], '0.12.0'); + + // Compatibility with the Bridge Theme. + if (!defined('QODE_ROOT')) { + wp_register_script('cooked-appear', COOKED_URL . 'assets/js/appear/jquery.appear' . $min . '.js', ['jquery'], '0.3.6'); + } + + wp_register_script('cooked-functions', COOKED_URL . 'assets/js/cooked-functions' . $min . '.js', ['jquery'], COOKED_VERSION); + wp_localize_script('cooked-functions', 'cooked_js_vars', $cooked_js_vars); + } + + public function css_colors() { + if (!isset($_GET['print'])) { + $file = COOKED_DIR . 'assets/css/colors.php'; + $css = self::get_dynamic_css($file); + wp_add_inline_style('cooked-styling', $css); + } + } + + public function css_responsive() { + if (!isset($_GET['print'])) { + $file = COOKED_DIR . 'assets/css/responsive.php'; + $css = self::get_dynamic_css($file); + wp_add_inline_style('cooked-styling', $css); + } + } + + public static function get_dynamic_css($file = false) { + if (!$file || $file && !file_exists($file)) return; + + ob_start(); + include $file; + $css = ob_get_clean(); + $compressed_css = self::compress_css($css); + + return $compressed_css; + } + + public static function compress_css($css) { + // Remove tabs, spaces, newlines, etc. + $css = str_replace(["\r\n", "\r", "\n", "\t", ' ', ' ', ' '], '', $css); + return $css; + } + + public function footer_enqueues() { + wp_enqueue_script('cooked-functions'); + } } diff --git a/includes/class.cooked-shortcodes.php b/includes/class.cooked-shortcodes.php index 271201b..fa621d9 100644 --- a/includes/class.cooked-shortcodes.php +++ b/includes/class.cooked-shortcodes.php @@ -433,7 +433,7 @@ public function cooked_info_shortcode($atts, $content = null) { 'prep_time' => __('Prep Time', 'cooked'), 'cook_time' => __('Cook Time', 'cooked'), 'total_time' => __('Total Time', 'cooked'), - 'taxonomies' => $_cooked_settings['recipe_taxonomies'] + 'taxonomies' => !empty($_cooked_settings['recipe_taxonomies']) ? $_cooked_settings['recipe_taxonomies'] : [] ]); if ( $left ): @@ -636,7 +636,7 @@ public static function cooked_info_fullscreen() { public static function cooked_info_prep_time( $recipe ) { global $_cooked_settings; - if (in_array('timing_prep',$_cooked_settings['recipe_info_display_options'])) { + if (!empty($_cooked_settings['recipe_info_display_options']) && in_array('timing_prep',$_cooked_settings['recipe_info_display_options'])) { $prep_time = isset($recipe['prep_time']) ? esc_html( $recipe['prep_time'] ) : 0; echo $prep_time ? '' . __('Prep Time','cooked') . '' . Cooked_Measurements::time_format( $prep_time ) . '' : ''; } @@ -645,7 +645,7 @@ public static function cooked_info_prep_time( $recipe ) { public static function cooked_info_cook_time( $recipe ) { global $_cooked_settings; - if (in_array('timing_cook', $_cooked_settings['recipe_info_display_options'])) { + if (!empty($_cooked_settings['recipe_info_display_options']) && in_array('timing_cook', $_cooked_settings['recipe_info_display_options'])) { $cook_time = isset($recipe['cook_time']) ? esc_html( $recipe['cook_time'] ) : 0; echo $cook_time ? '' . __('Cook Time','cooked') . '' . Cooked_Measurements::time_format( $cook_time ) . '' : ''; } @@ -654,7 +654,7 @@ public static function cooked_info_cook_time( $recipe ) { public static function cooked_info_total_time( $recipe ) { global $_cooked_settings; - if (in_array('timing_total',$_cooked_settings['recipe_info_display_options'])) { + if (!empty($_cooked_settings['recipe_info_display_options']) && in_array('timing_total',$_cooked_settings['recipe_info_display_options'])) { $total_time = isset($recipe['total_time']) ? esc_html( $recipe['total_time'] ) : 0; if ( $total_time ) { @@ -676,14 +676,14 @@ public static function cooked_info_taxonomies() { $clickable = isset($_cooked_settings['advanced']) && !empty($_cooked_settings['advanced']) && in_array( 'disable_public_recipes', $_cooked_settings['advanced'] ) ? false : true; - if (in_array('taxonomies', $_cooked_settings['recipe_info_display_options'])): + if (!empty($_cooked_settings['recipe_info_display_options']) && in_array('taxonomies', $_cooked_settings['recipe_info_display_options'])): global $recipe_terms_list; $recipe_terms_list = ''; do_action( 'cooked_info_taxonomies_shortcode_before', $recipe_settings ); - if (in_array('cp_recipe_category', $_cooked_settings['recipe_taxonomies'])): + if (!empty($_cooked_settings['recipe_taxonomies']) && in_array('cp_recipe_category', $_cooked_settings['recipe_taxonomies'])): if ( $clickable ): $recipe_terms_list .= get_the_term_list( $recipe_settings['id'], 'cp_recipe_category', '' . __('Category','cooked') . '', ', ', '' ); else: diff --git a/includes/class.cooked-taxonomies.php b/includes/class.cooked-taxonomies.php index 4e490e4..e682d8e 100644 --- a/includes/class.cooked-taxonomies.php +++ b/includes/class.cooked-taxonomies.php @@ -25,7 +25,7 @@ public static function get() { $_cooked_settings = Cooked_Settings::get(); $front_page_id = get_option( 'page_on_front' ); - $query_var = ($_cooked_settings['browse_page'] == $front_page_id) ? false : true; + $query_var = (!empty($_cooked_settings['browse_page']) && $_cooked_settings['browse_page'] == $front_page_id) ? false : true; $taxonomy_permalinks = apply_filters( 'cooked_taxonomy_settings', [ 'cp_recipe_category' => (isset($_cooked_settings['recipe_category_permalink']) && $_cooked_settings['recipe_category_permalink'] ? $_cooked_settings['recipe_category_permalink'] : 'recipe-category') diff --git a/readme.txt b/readme.txt index 189e68f..00e1189 100644 --- a/readme.txt +++ b/readme.txt @@ -85,6 +85,7 @@ Version 1.8.10 includes improvements to translation handling and a fix for incor * **FIX:** Fixed issue preventing users from adding or editing links within recipe direction text areas. * **NEW:** Added pretty URL's to the Browse Recipe page when searching and filtering recipes. * **FIX:** Fixed issue with the recipe search when filters are applied. +* **FIX:** Fixed a couple of PHP v8.3 compatibility issues. = 1.8.9 = * **NEW:** Improved SEO by dynamically updating the canonical URL on the Browse Recipe page to match active category/tag filters. Supports Rank Math SEO and Yoast SEO. From 0b49db0ef26c69a20202ef2ec520d05b10035859 Mon Sep 17 00:00:00 2001 From: Armand Tresova Date: Tue, 24 Dec 2024 20:17:17 -0500 Subject: [PATCH 09/17] Converted cooked_msg to use the transient api --- includes/class.cooked-functions.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/includes/class.cooked-functions.php b/includes/class.cooked-functions.php index 3d02a0e..0dba092 100644 --- a/includes/class.cooked-functions.php +++ b/includes/class.cooked-functions.php @@ -227,4 +227,24 @@ function update_print_options( printOpt ) { } + // Store the message + public static function set_transient_message($message) { + $user_id = get_current_user_id(); + if ( !empty( $user_id ) && !empty( $message ) ) { + set_transient('cooked_user_' . $user_id . '_message', $message, 60); // Expires in 60 seconds + } + } + + // Retrieve and delete the message + public static function get_and_delete_transient_message() { + $user_id = get_current_user_id(); + if ( !empty( $user_id ) ) { + $message = get_transient('cooked_user_' . $user_id . '_message'); + if ( !empty( $message ) ) { + delete_transient('cooked_user_' . $user_id . '_message'); + return $message; + } + } + return false; + } } From 22cf2df9dd8ba38763cae5ece043785aa567ad6c Mon Sep 17 00:00:00 2001 From: Armand Tresova Date: Tue, 24 Dec 2024 20:22:47 -0500 Subject: [PATCH 10/17] Add Pretty URLS to Browse Recipe Page #82 Small PHP 8.3 error. --- assets/js/cooked-functions.js | 50 ++++++++++ assets/js/cooked-functions.min.js | 2 +- includes/class.cooked-admin-enqueues.php | 20 +++- includes/class.cooked-post-types.php | 115 ++++++++++++++++++++--- includes/class.cooked-recipes.php | 111 ++++++++++------------ includes/class.cooked-seo.php | 40 ++++---- 6 files changed, 244 insertions(+), 94 deletions(-) diff --git a/assets/js/cooked-functions.js b/assets/js/cooked-functions.js index 4574f42..cfad4df 100644 --- a/assets/js/cooked-functions.js +++ b/assets/js/cooked-functions.js @@ -109,6 +109,56 @@ var cooked_loading = false; var thisButton = $(this); thisButton.parents('form').trigger('submit'); }); + + // Add form submit handler for the Browse Search Form + if ( cooked_js_vars.permalink_structure ) { + $('.cooked-recipe-search form').on('submit', function(e) { + e.preventDefault(); + + // Get form values + const formValues = { + category: $(this).find('[name="cp_recipe_category"]').val() || '', + method: $(this).find('[name="cp_recipe_cooking_method"]').val() || '', + cuisine: $(this).find('[name="cp_recipe_cuisine"]').val() || '', + tags: $(this).find('[name="cp_recipe_tags"]').val() || '', + diet: $(this).find('[name="cp_recipe_diet"]').val() || '', + search: $(this).find('[name="cooked_search_s"]').val() || '', + sort: $(this).find('[name="cooked_browse_sort_by"]').val() || 'date_desc', + }; + + // Create URL segments + const urlSegments = []; + urlSegments.push(cooked_js_vars.browse_recipes_slug); + + // Add taxonomy segments + const taxonomyFields = [ + { value: formValues.category, prefix: cooked_js_vars.recipe_category_slug }, + { value: formValues.method, prefix: cooked_js_vars.recipe_cooking_method_slug }, + { value: formValues.cuisine, prefix: cooked_js_vars.recipe_cuisine_slug }, + { value: formValues.tags, prefix: cooked_js_vars.recipe_tags_slug }, + { value: formValues.diet, prefix: cooked_js_vars.recipe_diet_slug }, + ]; + + taxonomyFields.forEach(field => { + if (field.value) { + urlSegments.push(`${field.prefix}/${encodeURIComponent(field.value)}`); + } + }); + + // Add search segment + if (formValues.search) { + urlSegments.push(`search/${encodeURIComponent(formValues.search)}`); + } + + // Add sort segment + urlSegments.push(`sort/${encodeURIComponent(formValues.sort)}`); + + // Build and navigate to URL + const prettyUrl = '/' + urlSegments.filter(Boolean).join('/'); + + window.location.href = prettyUrl; + }); + } } /**** 6. Timers ****/ diff --git a/assets/js/cooked-functions.min.js b/assets/js/cooked-functions.min.js index ebcf565..11d6324 100644 --- a/assets/js/cooked-functions.min.js +++ b/assets/js/cooked-functions.min.js @@ -1 +1 @@ -var cooked_loading=!1;(k=>{$_Cooked_Ingredient_Boxes=k(".cooked-ingredient-checkbox"),$_Cooked_Fotorama=k(".cooked-recipe-gallery"),$_Cooked_Ajax_List=k(".cooked-recipe-loader"),$_Cooked_Recipe_Search=k(".cooked-recipe-search"),$_Cooked_Timers=k(".cooked-timer > a"),$_Cooked_FSM_Button=k(".cooked-fsm-button"),$_Cooked_Fotorama.length&&$_Cooked_Fotorama.on("fotorama:ready",function(e,o){setTimeout(function(){$_Cooked_Fotorama.addClass("cooked-gallery-loaded")},100)}),k(document).ready(function(){$_Cooked_Fotorama.length&&$_Cooked_Fotorama.fotorama();{function d(e){e.on("click",function(e){var o=k(this);o.hasClass("cooked-checked")?(o.parent().removeClass("cooked-checked"),o.removeClass("cooked-checked")):(o.parent().addClass("cooked-checked"),o.addClass("cooked-checked"))})}$_Cooked_Ingredient_Boxes.length&&d($_Cooked_Ingredient_Boxes)}var a,s;function i(e){e.on("click",function(e){e.preventDefault();var o,c,e=k(this),d="cookedTimer-"+e.data("timer-id"),s=k("#cooked-timers-wrap").find(".cooked-timer-block").length;k("div#"+d).length?(k("div#"+d).css({background:"#eeeeee"}),setTimeout(function(){k("div#"+d).css({background:""})},200)):4==s?(k("#cooked-timers-wrap").css({transform:"translate3d(0,0.5em,0)"}),setTimeout(function(){k("#cooked-timers-wrap").css({transform:""})},200)):(o=7.5*(s+=1),c=e.parents(".cooked-single-direction").length?e.parents(".cooked-single-direction").data("step"):cooked_js_vars.i18n_timer,c={id:d,seconds:e.data("seconds"),step:c,desc:e.data("desc")},k("#cooked-timers-wrap").length?(e=1==s?" cooked-visible":"",a",{id:"cooked-timers-wrap"}),s=t(c),e.append(s),k("body").append(e),n(k("#"+c.id).find(".cooked-timer-obj"),!1),setTimeout(function(){k("#cooked-timers-wrap").addClass("cooked-visible")},50)))})}function t(e,o="cooked-visible"){o=k("
",{id:e.id,class:"cooked-timer-block "+o}),k("",{class:"cooked-timer-step",text:e.step}).appendTo(o),k("",{class:"cooked-timer-desc",text:e.desc}).appendTo(o),k("
",{class:"cooked-timer-obj","data-seconds-left":e.seconds}).appendTo(o),k("",{class:"cooked-icon cooked-icon-times"}).appendTo(o),e=k("
",{class:"cooked-progress"});return k("").appendTo(e),e.appendTo(o),o}function n(o,e){var c=cooked_js_vars.timer_sound,d=new Audio(c),s=o.parents(".cooked-timer-block").attr("id"),i=o.data("seconds-left"),t=o.parents(".cooked-timer-block");o.startTimer({classNames:{hours:"cooked-timer-hours",minutes:"cooked-timer-minutes",seconds:"cooked-timer-seconds",clearDiv:"cooked-timer-clearDiv",timeout:"cooked-timer-timeout"},onComplete:function(){d.play(),o.addClass("cooked-timer-complete")}}),o.prepend(''),e&&(o.trigger("pause"),t.addClass("cooked-paused"),t.find("i.cooked-icon-pause").hide(),t.find("i.cooked-icon-play").css({display:"inline-block"}),t.addClass("cooked-paused"),k(this).parent().find("i.cooked-icon-play").css({display:"inline-block"})),r(t,10,10),o.on("update",function(e,o){r(t,o,i)}),o.on("complete",function(e,o){d.play(),t.find("i.cooked-icon-pause").hide(),t.find("i.cooked-icon-play").hide(),t.find(".cooked-timer-seconds").html("00")}),o.on("click","i.cooked-icon-pause",function(e){e.preventDefault(),k(this).hide(),t.addClass("cooked-paused"),k(this).parent().find("i.cooked-icon-play").css({display:"inline-block"}),o.trigger("pause")}),o.on("click","i.cooked-icon-play",function(e){e.preventDefault(),k(this).hide(),t.removeClass("cooked-paused cooked-complete"),k(this).parent().find("i.cooked-icon-pause").css({display:"inline-block"}),o.trigger("resume")}),o.on("click","i.cooked-icon-reverse",function(e){e.preventDefault(),t.removeClass("cooked-paused cooked-complete"),k(this).parent().find("i.cooked-icon-play").css({display:"inline-block"}),k(this).parent().find("i.cooked-icon-pause").hide(),o.remove(),k("#"+s).append('
'),n(k("#"+s).find(".cooked-timer-obj"),!0)}),t.on("click","i.cooked-icon-times",function(e){var o;e.preventDefault(),1==k("#cooked-timers-wrap").find(".cooked-timer-block").length?k("#cooked-timers-wrap").removeClass("cooked-visible"):(o=7.5*(e=k("#cooked-timers-wrap").find(".cooked-timer-block").length-1),k("#cooked-timers-wrap").css({height:o+"em"}),t.removeClass("cooked-visible"),e==a&&k("#cooked-timers-wrap").removeClass("cooked-multiples")),setTimeout(function(){t.remove()},200)})}function r(e,o,c){o=100-o/c*100;e.find(".cooked-progress > span").css({width:o+"%"}),100<=o&&e.addClass("cooked-complete")}k(".cooked-servings").length&&k(".cooked-servings").find("select").on("change",function(e){e.preventDefault();var e=k(this).children("option:selected").val(),o=new URL(window.location.href);o.searchParams.set("servings",e),window.location.href=o.toString()}),$_Cooked_Recipe_Search.length&&(k("body").on("click",function(e){var o=!1;0 a")),c=o.find(".cooked-ingredient-checkbox");i(e),d(c),s.enable(),o.on("click",".cooked-close-fsm",function(e){e.preventDefault(),o.removeClass("cooked-active"),k("body").removeClass("cooked-noscroll cooked-fsm-active"),s.disable(),setTimeout(function(){o.remove()},350)})}),k("body").on("click",".cooked-fsm-mobile-nav > a",function(e){e.preventDefault();var e=k(this),o=e.data("nav-id"),c=e.parents(".cooked-fsm");c.find(".cooked-fsm-mobile-nav > a").removeClass("cooked-active"),c.find(".cooked-fsm-content").removeClass("cooked-active"),e.addClass("cooked-active"),("ingredients"==o?c.find(".cooked-fsm-content.cooked-fsm-ingredients"):(c.find(".cooked-fsm-content.cooked-fsm-directions-wrap").addClass("cooked-active"),c.find(".cooked-fsm-content.cooked-fsm-directions").addClass("cooked-active"),c.find(".cooked-fsm-content.cooked-fsm-notes"))).addClass("cooked-active")}))})})(jQuery); \ No newline at end of file +var cooked_loading=!1;(l=>{$_Cooked_Ingredient_Boxes=l(".cooked-ingredient-checkbox"),$_Cooked_Fotorama=l(".cooked-recipe-gallery"),$_Cooked_Ajax_List=l(".cooked-recipe-loader"),$_Cooked_Recipe_Search=l(".cooked-recipe-search"),$_Cooked_Timers=l(".cooked-timer > a"),$_Cooked_FSM_Button=l(".cooked-fsm-button"),$_Cooked_Fotorama.length&&$_Cooked_Fotorama.on("fotorama:ready",function(e,o){setTimeout(function(){$_Cooked_Fotorama.addClass("cooked-gallery-loaded")},100)}),l(document).ready(function(){$_Cooked_Fotorama.length&&$_Cooked_Fotorama.fotorama();{function s(e){e.on("click",function(e){var o=l(this);o.hasClass("cooked-checked")?(o.parent().removeClass("cooked-checked"),o.removeClass("cooked-checked")):(o.parent().addClass("cooked-checked"),o.addClass("cooked-checked"))})}$_Cooked_Ingredient_Boxes.length&&s($_Cooked_Ingredient_Boxes)}var a,i;function d(e){e.on("click",function(e){e.preventDefault();var o,c,e=l(this),s="cookedTimer-"+e.data("timer-id"),i=l("#cooked-timers-wrap").find(".cooked-timer-block").length;l("div#"+s).length?(l("div#"+s).css({background:"#eeeeee"}),setTimeout(function(){l("div#"+s).css({background:""})},200)):4==i?(l("#cooked-timers-wrap").css({transform:"translate3d(0,0.5em,0)"}),setTimeout(function(){l("#cooked-timers-wrap").css({transform:""})},200)):(o=7.5*(i+=1),c=e.parents(".cooked-single-direction").length?e.parents(".cooked-single-direction").data("step"):cooked_js_vars.i18n_timer,c={id:s,seconds:e.data("seconds"),step:c,desc:e.data("desc")},l("#cooked-timers-wrap").length?(e=1==i?" cooked-visible":"",a",{id:"cooked-timers-wrap"}),i=t(c),e.append(i),l("body").append(e),n(l("#"+c.id).find(".cooked-timer-obj"),!1),setTimeout(function(){l("#cooked-timers-wrap").addClass("cooked-visible")},50)))})}function t(e,o="cooked-visible"){o=l("
",{id:e.id,class:"cooked-timer-block "+o}),l("",{class:"cooked-timer-step",text:e.step}).appendTo(o),l("",{class:"cooked-timer-desc",text:e.desc}).appendTo(o),l("
",{class:"cooked-timer-obj","data-seconds-left":e.seconds}).appendTo(o),l("",{class:"cooked-icon cooked-icon-times"}).appendTo(o),e=l("
",{class:"cooked-progress"});return l("").appendTo(e),e.appendTo(o),o}function n(o,e){var c=cooked_js_vars.timer_sound,s=new Audio(c),i=o.parents(".cooked-timer-block").attr("id"),d=o.data("seconds-left"),t=o.parents(".cooked-timer-block");o.startTimer({classNames:{hours:"cooked-timer-hours",minutes:"cooked-timer-minutes",seconds:"cooked-timer-seconds",clearDiv:"cooked-timer-clearDiv",timeout:"cooked-timer-timeout"},onComplete:function(){s.play(),o.addClass("cooked-timer-complete")}}),o.prepend(''),e&&(o.trigger("pause"),t.addClass("cooked-paused"),t.find("i.cooked-icon-pause").hide(),t.find("i.cooked-icon-play").css({display:"inline-block"}),t.addClass("cooked-paused"),l(this).parent().find("i.cooked-icon-play").css({display:"inline-block"})),r(t,10,10),o.on("update",function(e,o){r(t,o,d)}),o.on("complete",function(e,o){s.play(),t.find("i.cooked-icon-pause").hide(),t.find("i.cooked-icon-play").hide(),t.find(".cooked-timer-seconds").html("00")}),o.on("click","i.cooked-icon-pause",function(e){e.preventDefault(),l(this).hide(),t.addClass("cooked-paused"),l(this).parent().find("i.cooked-icon-play").css({display:"inline-block"}),o.trigger("pause")}),o.on("click","i.cooked-icon-play",function(e){e.preventDefault(),l(this).hide(),t.removeClass("cooked-paused cooked-complete"),l(this).parent().find("i.cooked-icon-pause").css({display:"inline-block"}),o.trigger("resume")}),o.on("click","i.cooked-icon-reverse",function(e){e.preventDefault(),t.removeClass("cooked-paused cooked-complete"),l(this).parent().find("i.cooked-icon-play").css({display:"inline-block"}),l(this).parent().find("i.cooked-icon-pause").hide(),o.remove(),l("#"+i).append('
'),n(l("#"+i).find(".cooked-timer-obj"),!0)}),t.on("click","i.cooked-icon-times",function(e){var o;e.preventDefault(),1==l("#cooked-timers-wrap").find(".cooked-timer-block").length?l("#cooked-timers-wrap").removeClass("cooked-visible"):(o=7.5*(e=l("#cooked-timers-wrap").find(".cooked-timer-block").length-1),l("#cooked-timers-wrap").css({height:o+"em"}),t.removeClass("cooked-visible"),e==a&&l("#cooked-timers-wrap").removeClass("cooked-multiples")),setTimeout(function(){t.remove()},200)})}function r(e,o,c){o=100-o/c*100;e.find(".cooked-progress > span").css({width:o+"%"}),100<=o&&e.addClass("cooked-complete")}l(".cooked-servings").length&&l(".cooked-servings").find("select").on("change",function(e){e.preventDefault();var e=l(this).children("option:selected").val(),o=new URL(window.location.href);o.searchParams.set("servings",e),window.location.href=o.toString()}),$_Cooked_Recipe_Search.length&&(l("body").on("click",function(e){var o=!1;0{e.value&&o.push(e.prefix+"/"+encodeURIComponent(e.value))}),e.search&&o.push("search/"+encodeURIComponent(e.search)),o.push("sort/"+encodeURIComponent(e.sort));e="/"+o.filter(Boolean).join("/");window.location.href=e}),$_Cooked_Timers.length&&(a=1,d($_Cooked_Timers)),$_Cooked_FSM_Button.length&&(i=new NoSleep,$_Cooked_FSM_Button.on("click",function(e){e.preventDefault();var e=l(this).data("recipe-id"),e=l('.cooked-fsm[data-recipe-id="'+e+'"]'),o=(l("body").addClass("cooked-noscroll cooked-fsm-active"),e.clone().appendTo("body")),e=(setTimeout(function(){o.addClass("cooked-visible")},10),setTimeout(function(){o.addClass("cooked-active")},50),o.find(".cooked-timer > a")),c=o.find(".cooked-ingredient-checkbox");d(e),s(c),i.enable(),o.on("click",".cooked-close-fsm",function(e){e.preventDefault(),o.removeClass("cooked-active"),l("body").removeClass("cooked-noscroll cooked-fsm-active"),i.disable(),setTimeout(function(){o.remove()},350)})}),l("body").on("click",".cooked-fsm-mobile-nav > a",function(e){e.preventDefault();var e=l(this),o=e.data("nav-id"),c=e.parents(".cooked-fsm");c.find(".cooked-fsm-mobile-nav > a").removeClass("cooked-active"),c.find(".cooked-fsm-content").removeClass("cooked-active"),e.addClass("cooked-active"),("ingredients"==o?c.find(".cooked-fsm-content.cooked-fsm-ingredients"):(c.find(".cooked-fsm-content.cooked-fsm-directions-wrap").addClass("cooked-active"),c.find(".cooked-fsm-content.cooked-fsm-directions").addClass("cooked-active"),c.find(".cooked-fsm-content.cooked-fsm-notes"))).addClass("cooked-active")}))})})(jQuery); \ No newline at end of file diff --git a/includes/class.cooked-admin-enqueues.php b/includes/class.cooked-admin-enqueues.php index 7706811..4a7cad4 100644 --- a/includes/class.cooked-admin-enqueues.php +++ b/includes/class.cooked-admin-enqueues.php @@ -54,6 +54,8 @@ public function widget_enqueues( $hook ) { } public function admin_enqueues( $hook ) { + global $_cooked_settings; + $cooked_admin_hooks = [ 'index.php', 'post-new.php', @@ -108,6 +110,7 @@ public function admin_enqueues( $hook ) { // Gonna need jQuery wp_enqueue_media(); + wp_enqueue_editor(); wp_enqueue_script( 'jquery' ); wp_enqueue_script( 'wp-color-picker' ); wp_enqueue_script( 'jquery-ui-core' ); @@ -120,6 +123,13 @@ public function admin_enqueues( $hook ) { wp_enqueue_script( 'cooked-switchery', COOKED_URL . 'assets/admin/js/switchery/switchery.min.js', [], COOKED_VERSION, true ); wp_enqueue_script( 'cooked-vue', COOKED_URL . 'assets/admin/js/vue/vue' . $min . '.js', [], COOKED_VERSION, false ); + $wp_editor_roles_allowed = false; + if (is_user_logged_in()) { + $user = wp_get_current_user(); + $user_role = $user->roles[0]; + $wp_editor_roles_allowed = isset( $_cooked_settings['recipe_wp_editor_roles'] ) && in_array( $user_role, $_cooked_settings['recipe_wp_editor_roles'] ) ? true : false; + } + $cooked_js_vars = [ 'ajax_url' => admin_url('admin-ajax.php'), 'cooked_plugin_url' => COOKED_URL, @@ -138,6 +148,14 @@ public function admin_enqueues( $hook ) { /* translators: confirmation for migrating all ### recipes, where ### displays the total number for the migration. */ 'i18n_confirm_migrate_recipes' => sprintf(__('Please confirm that you are ready to migrate all %s recipes.', 'cooked'), number_format($total_old_recipes)), 'i18n_confirm_import_recipes' => __('Please confirm that you are ready to import all recipes.', 'cooked'), + 'permalink_structure' => get_option('permalink_structure'), + 'wp_editor_roles_allowed' => esc_attr($wp_editor_roles_allowed), + 'browse_recipes_slug' => !isset($_cooked_settings['browse_recipes_slug']) ? 'browse-recipes' : $_cooked_settings['browse_recipes_slug'], + 'recipe_category_slug' => !isset($_cooked_settings['recipe_category_permalink']) ? 'recipe-category' : $_cooked_settings['recipe_category_permalink'], + 'recipe_cooking_method_slug' => !isset($_cooked_settings['recipe_cooking_method_permalink']) ? 'cooking-method' : $_cooked_settings['recipe_cooking_method_permalink'], + 'recipe_cuisine_slug' => !isset($_cooked_settings['recipe_cuisine_permalink']) ? 'cuisine' : $_cooked_settings['recipe_cuisine_permalink'], + 'recipe_tags_slug' => !isset($_cooked_settings['recipe_tag_permalink']) ? 'recipe-tag' : $_cooked_settings['recipe_tag_permalink'], + 'recipe_diet_slug' => !isset($_cooked_settings['recipe_diet_permalink']) ? 'diet' : $_cooked_settings['recipe_diet_permalink'], ]; // Cooked Admin Style Assets @@ -156,8 +174,6 @@ public function admin_enqueues( $hook ) { wp_localize_script('cooked-migration', 'cooked_js_vars', $cooked_js_vars ); wp_enqueue_script('cooked-functions'); wp_enqueue_script('cooked-migration'); - - wp_enqueue_editor(); endif; } } diff --git a/includes/class.cooked-post-types.php b/includes/class.cooked-post-types.php index b516eed..89d4342 100644 --- a/includes/class.cooked-post-types.php +++ b/includes/class.cooked-post-types.php @@ -172,6 +172,9 @@ public static function cooked_meta_tags() { public static function add_query_vars_filter( $vars ) { $vars[] = 'servings'; + // $vars[] = 'cp_recipe_category'; + // $vars[] = 'cooked_search_s'; + // $vars[] = 'cooked_browse_sort_by'; return $vars; } @@ -241,7 +244,6 @@ public static function init() { $parent_page_slug = ( isset($_cooked_settings['browse_page']) && $_cooked_settings['browse_page'] ? ltrim( untrailingslashit( str_replace( home_url(), '', get_permalink( $_cooked_settings['browse_page'] ) ) ), '/' ) : false ); if (!empty($_GET['settings-updated'])) { - // Recipe Permalink $permalink_parts = explode( '/', $_cooked_settings['recipe_permalink'] ); if ( isset( $permalink_parts[1] ) ): @@ -284,9 +286,9 @@ public static function init() { 'recipe_category_permalink' => (!$_cooked_settings['recipe_category_permalink'] ? 'recipe-category' : $recipe_category_permalink) ]); - foreach ( $taxonomy_settings_update as $setting_key => $setting_value ): + foreach ( $taxonomy_settings_update as $setting_key => $setting_value ) { $_cooked_settings[ $setting_key ] = $setting_value; - endforeach; + } update_option( 'cooked_settings', $_cooked_settings ); update_option( 'cooked_settings_saved', true ); @@ -296,21 +298,110 @@ public static function init() { global $cooked_taxonomies_for_menu; - if ( !empty($_cooked_taxonomies) ): - foreach ( $_cooked_taxonomies as $slug => $args ): + if ( !empty($_cooked_taxonomies) ) { + foreach ( $_cooked_taxonomies as $slug => $args ) { register_taxonomy( $slug, ['cp_recipe'], $args ); - if ( $parent_page_slug ): - add_rewrite_rule('^' . $parent_page_slug . '/' . $args['rewrite']['slug'] . '/([^/]*)/page/([^/]*)/?', 'index.php?page_id='.$_cooked_settings['browse_page'].'&paged=$matches[2]&'.$slug.'=$matches[1]', 'top'); - add_rewrite_rule('^' . $parent_page_slug . '/' . $args['rewrite']['slug'] . '/([^/]*)/?', 'index.php?page_id='.$_cooked_settings['browse_page'].'&'.$slug.'=$matches[1]', 'top'); - endif; + + if ( $parent_page_slug ) { + // Taxonomy search sort pagination + add_rewrite_rule( + '^' . $parent_page_slug . '/' . $args['rewrite']['slug'] . '/([^/]*)/search/([^/]*)/sort/([^/]*)/page/([^/]*)/?', + 'index.php?page_id=' . $_cooked_settings['browse_page'] . '&' . $slug . '=$matches[1]&cooked_search_s=$matches[2]&cooked_browse_sort_by=$matches[3]&paged=$matches[4]', + 'top' + ); + + // Taxonomy search sort + add_rewrite_rule( + '^' . $parent_page_slug . '/' . $args['rewrite']['slug'] . '/([^/]*)/search/([^/]*)/sort/([^/]*)/?', + 'index.php?page_id=' . $_cooked_settings['browse_page'] . '&' . $slug . '=$matches[1]&cooked_search_s=$matches[2]&cooked_browse_sort_by=$matches[3]', + 'top' + ); + + // Taxonomy sort pagination + add_rewrite_rule( + '^' . $parent_page_slug . '/' . $args['rewrite']['slug'] . '/([^/]*)/sort/([^/]*)/page/([^/]*)/?', + 'index.php?page_id=' . $_cooked_settings['browse_page'] . '&' . $slug . '=$matches[1]&cooked_browse_sort_by=$matches[2]&paged=$matches[3]', + 'top' + ); + + // Taxonomy sort + add_rewrite_rule( + '^' . $parent_page_slug . '/' . $args['rewrite']['slug'] . '/([^/]*)/sort/([^/]*)/?', + 'index.php?page_id=' . $_cooked_settings['browse_page'] . '&' . $slug . '=$matches[1]&cooked_browse_sort_by=$matches[2]', + 'top' + ); + + // Taxonomy search + add_rewrite_rule( + '^' . $parent_page_slug . '/' . $args['rewrite']['slug'] . '/([^/]*)/search/([^/]*)/?', + 'index.php?page_id=' . $_cooked_settings['browse_page'] . '&' . $slug . '=$matches[1]&cooked_search_s=$matches[2]', + 'top' + ); + + // Taxonomy pagination + add_rewrite_rule( + '^' . $parent_page_slug . '/' . $args['rewrite']['slug'] . '/([^/]*)/page/([^/]*)/?', + 'index.php?page_id=' . $_cooked_settings['browse_page'] . '&paged=$matches[2]&' . $slug . '=$matches[1]', + 'top' + ); + + // Taxonomy + add_rewrite_rule( + '^' . $parent_page_slug . '/' . $args['rewrite']['slug'] . '/([^/]*)/?', + 'index.php?page_id=' . $_cooked_settings['browse_page'] . '&' . $slug . '=$matches[1]', + 'top' + ); + } + + // Add additional rewrite tags for your query variables. + add_rewrite_tag('%' . $slug . '%', '([^&]+)'); + $cooked_taxonomies_for_menu[] = [ 'menu' => 'cooked_recipes_menu', 'name' => $args['labels']['menu_name'], 'capability' => 'manage_categories', 'url' => 'edit-tags.php?taxonomy=' . $slug . '&post_type=cp_recipe' ]; - endforeach; - endif; + } + } + + // Search sort + add_rewrite_rule( + '^' . $parent_page_slug . '/search/([^/]*)/sort/([^/]*)/?', + 'index.php?page_id=' . $_cooked_settings['browse_page'] . '&cooked_search_s=$matches[1]&cooked_browse_sort_by=$matches[2]', + 'top' + ); + + // Sort + add_rewrite_rule( + '^' . $parent_page_slug . '/sort/([^/]*)/?', + 'index.php?page_id=' . $_cooked_settings['browse_page'] . '&cooked_browse_sort_by=$matches[1]', + 'top' + ); + + // Search + add_rewrite_rule( + '^' . $parent_page_slug . '/search/([^/]*)/?', + 'index.php?page_id=' . $_cooked_settings['browse_page'] . '&cooked_search_s=$matches[1]', + 'top' + ); + + // Pagination + add_rewrite_rule( + '^' . $parent_page_slug . '/page/([^/]*)/?', + 'index.php?page_id=' . $_cooked_settings['browse_page'] . '&paged=$matches[1]', + 'top' + ); + + // Plain + add_rewrite_rule( + '^' . $parent_page_slug . '/?', + 'index.php?page_id=' . $_cooked_settings['browse_page'], + 'top' + ); + + add_rewrite_tag('%cooked_search_s%', '([^&]+)'); + add_rewrite_tag('%cooked_browse_sort_by%', '([^&]+)'); $post_types = self::get(); if ( !empty($post_types) ) { @@ -331,7 +422,7 @@ public static function get() { $recipe_permalink = isset($_cooked_settings['recipe_permalink']) && $_cooked_settings['recipe_permalink'] ? $_cooked_settings['recipe_permalink'] : 'recipes'; $public_recipes = true; - $has_archive_slug = sanitize_title_with_dashes( __('Recipe Archive','cooked') ); + $has_archive_slug = sanitize_title_with_dashes( __('Recipe Archive', 'cooked') ); $exclude_from_search = false; if ( !isset($_GET['print']) && isset( $_cooked_settings['advanced'] ) && in_array( 'disable_public_recipes', $_cooked_settings['advanced'] ) ) { diff --git a/includes/class.cooked-recipes.php b/includes/class.cooked-recipes.php index 63351a4..a56dece 100644 --- a/includes/class.cooked-recipes.php +++ b/includes/class.cooked-recipes.php @@ -183,28 +183,28 @@ public function check_recipe_query() { $recipe_query['cp_recipe_category'] = ( isset($_GET['cp_recipe_category']) && $_GET['cp_recipe_category'] ? intval($_GET['cp_recipe_category']) : ( isset($_cooked_settings['browse_default_cp_recipe_category']) && $_cooked_settings['browse_default_cp_recipe_category'] ? $_cooked_settings['browse_default_cp_recipe_category'] : false ) ); endif; - if ( !isset($recipe_query['cp_recipe_cooking_method']) ): - $recipe_query['cp_recipe_cooking_method'] = ( isset($_GET['cp_recipe_cooking_method']) && $_GET['cp_recipe_cooking_method'] ? intval($_GET['cp_recipe_cooking_method']) : ( isset($_cooked_settings['browse_default_cp_recipe_cooking_method']) && $_cooked_settings['browse_default_cp_recipe_cooking_method'] ? $_cooked_settings['browse_default_cp_recipe_cooking_method'] : false ) ); - endif; + // if ( !isset($recipe_query['cp_recipe_cooking_method']) ): + // $recipe_query['cp_recipe_cooking_method'] = ( isset($_GET['cp_recipe_cooking_method']) && $_GET['cp_recipe_cooking_method'] ? intval($_GET['cp_recipe_cooking_method']) : ( isset($_cooked_settings['browse_default_cp_recipe_cooking_method']) && $_cooked_settings['browse_default_cp_recipe_cooking_method'] ? $_cooked_settings['browse_default_cp_recipe_cooking_method'] : false ) ); + // endif; - if ( !isset($recipe_query['cp_recipe_cuisine']) ): - $recipe_query['cp_recipe_cuisine'] = ( isset($_GET['cp_recipe_cuisine']) && $_GET['cp_recipe_cuisine'] ? intval($_GET['cp_recipe_cuisine']) : ( isset($_cooked_settings['browse_default_cp_recipe_cuisine']) && $_cooked_settings['browse_default_cp_recipe_cuisine'] ? $_cooked_settings['browse_default_cp_recipe_cuisine'] : false ) ); - endif; + // if ( !isset($recipe_query['cp_recipe_cuisine']) ): + // $recipe_query['cp_recipe_cuisine'] = ( isset($_GET['cp_recipe_cuisine']) && $_GET['cp_recipe_cuisine'] ? intval($_GET['cp_recipe_cuisine']) : ( isset($_cooked_settings['browse_default_cp_recipe_cuisine']) && $_cooked_settings['browse_default_cp_recipe_cuisine'] ? $_cooked_settings['browse_default_cp_recipe_cuisine'] : false ) ); + // endif; - if ( !isset($recipe_query['cp_recipe_tags']) ): - $recipe_query['cp_recipe_tags'] = ( isset($_GET['cp_recipe_tags']) && $_GET['cp_recipe_tags'] ? intval($_GET['cp_recipe_tags']) : ( isset($_cooked_settings['browse_default_cp_recipe_tags']) && $_cooked_settings['browse_default_cp_recipe_tags'] ? $_cooked_settings['browse_default_cp_recipe_tags'] : false ) ); - endif; + // if ( !isset($recipe_query['cp_recipe_tags']) ): + // $recipe_query['cp_recipe_tags'] = ( isset($_GET['cp_recipe_tags']) && $_GET['cp_recipe_tags'] ? intval($_GET['cp_recipe_tags']) : ( isset($_cooked_settings['browse_default_cp_recipe_tags']) && $_cooked_settings['browse_default_cp_recipe_tags'] ? $_cooked_settings['browse_default_cp_recipe_tags'] : false ) ); + // endif; - if ( !isset($recipe_query['cp_recipe_diet']) ): - $recipe_query['cp_recipe_diet'] = ( isset($_GET['cp_recipe_diet']) && $_GET['cp_recipe_diet'] ? intval($_GET['cp_recipe_diet']) : ( isset($_cooked_settings['browse_default_cp_recipe_diet']) && $_cooked_settings['browse_default_cp_recipe_diet'] ? $_cooked_settings['browse_default_cp_recipe_diet'] : false ) ); - endif; + // if ( !isset($recipe_query['cp_recipe_diet']) ): + // $recipe_query['cp_recipe_diet'] = ( isset($_GET['cp_recipe_diet']) && $_GET['cp_recipe_diet'] ? intval($_GET['cp_recipe_diet']) : ( isset($_cooked_settings['browse_default_cp_recipe_diet']) && $_cooked_settings['browse_default_cp_recipe_diet'] ? $_cooked_settings['browse_default_cp_recipe_diet'] : false ) ); + // endif; } public static function cooked_pre_get_posts( $q ) { if ( $title = $q->get( '_cooked_title' ) ): add_filter( 'get_meta_sql', function( $sql ) use ( $title ) { - global $wpdb,$cooked_modified_where; + global $wpdb, $cooked_modified_where; if ( $cooked_modified_where ) return $sql; $cooked_modified_where = 1; @@ -212,23 +212,22 @@ public static function cooked_pre_get_posts( $q ) { // Modified WHERE $sql['where'] = sprintf( " AND ( %s OR %s ) ", - apply_filters( 'cooked_query_where_filter', $wpdb->prepare( "{$wpdb->posts}.post_title like '%%%s%%'", esc_like( $title ) ) ), + apply_filters( 'cooked_query_where_filter', $wpdb->prepare( "{$wpdb->posts}.post_title like '%%%s%%'", $wpdb->esc_like( $title ) ) ), mb_substr( $sql['where'], 5, mb_strlen( $sql['where'] ) ) ); return $sql; }); endif; - } public static function recipe_list( $orderby = 'date', $show = 5, $recipes = false, $width = false, $hide_image = false, $hide_author = false ) { global $_cooked_settings; - $width = ( !$width ? '100%' : $width ); + $width = !$width ? '100%' : $width; $pixel_width = stristr( $width, 'px', true ); $percent_width = stristr( $width, '%', true ); - $width = ( $pixel_width ? $pixel_width . 'px' : ( $percent_width ? $percent_width . '%' : ( is_numeric( $width ) ? $width . 'px' : '100%' ) ) ); + $width = $pixel_width ? $pixel_width . 'px' : ( $percent_width ? $percent_width . '%' : ( is_numeric( $width ) ? $width . 'px' : '100%' ) ); $args = [ 'post_type' => 'cp_recipe', @@ -238,19 +237,18 @@ public static function recipe_list( $orderby = 'date', $show = 5, $recipes = fal 'order' => 'DESC' ]; - if ( !empty($recipes) ): - + if ( !empty($recipes) ) { $args['posts_per_page'] = -1; $args['orderby'] = 'post__in'; $args['order'] = 'ASC'; $args['post__in'] = $recipes; - - endif; + } // Filter out the pending/draft recipes. $args = apply_filters( 'cooked_recipe_public_query_filters', $args ); $recipes = Cooked_Recipes::get( $args ); + if ( isset($recipes['raw']) ): unset( $recipes['raw'] ); endif; $recipe_list = []; @@ -411,6 +409,7 @@ public function custom_taxonomy_in_query($query) { global $pagenow; $taxonomies = apply_filters( 'cooked_active_taxonomies', ['cp_recipe_category'] ); $q_vars = &$query->query_vars; + foreach ( $taxonomies as $taxonomy ): if ( $pagenow == 'edit.php' && isset($q_vars['post_type']) && $q_vars['post_type'] == 'cp_recipe' && isset($q_vars[$taxonomy]) && is_numeric($q_vars[$taxonomy]) && $q_vars[$taxonomy] != 0 ): $term = get_term_by('id', $q_vars[$taxonomy], $taxonomy); @@ -420,7 +419,7 @@ public function custom_taxonomy_in_query($query) { } public static function list_view( $list_atts = false ) { - global $wp_query, $recipe_query, $atts, $_cooked_settings, $recipes, $recipe_query, $recipe_args, $current_recipe_page; + global $wp_query, $recipe_query, $atts, $_cooked_settings, $recipes, $recipe_args, $current_recipe_page; // Get the attributes for this view $atts = array_change_key_case( (array) $list_atts, CASE_LOWER );; @@ -428,14 +427,14 @@ public static function list_view( $list_atts = false ) { $ls_class = 'Cooked_Recipes'; // Change the recipe layout - if ( $atts['layout'] ): + if ( $atts['layout'] ) { $recipe_list_style = apply_filters( 'cooked_recipe_list_style', [ 'grid' => 'Cooked_Recipes' ], $atts['layout'] ); $list_style = esc_html( key( $recipe_list_style ) ); $ls_method = 'list_style_' . $list_style; $ls_class = current( $recipe_list_style ); $_cooked_settings['recipe_list_style'] = $list_style; - endif; + } $recipe_query = $wp_query->query; $tax_query = []; @@ -484,10 +483,12 @@ public static function list_view( $list_atts = false ) { endif; - $sorting_type = ( isset($_GET['cooked_browse_sort_by']) && $_GET['cooked_browse_sort_by'] ? sanitize_key($_GET['cooked_browse_sort_by']) : ( isset($_cooked_settings['browse_default_sort']) && $_cooked_settings['browse_default_sort'] ? $_cooked_settings['browse_default_sort'] : 'date_desc' ) ); - $sorting_types = explode( '_', $sorting_type ); + $sorting_type = get_query_var('cooked_browse_sort_by', isset($_cooked_settings['browse_default_sort']) && $_cooked_settings['browse_default_sort'] ? $_cooked_settings['browse_default_sort'] : 'date_desc' ); + $sorting_type = sanitize_key($sorting_type); + $sorting_types = explode('_', $sorting_type); - $text_search = ( isset($_GET['cooked_search_s']) && $_GET['cooked_search_s'] ? esc_html($_GET['cooked_search_s']) : '' ); + $text_search = get_query_var('cooked_search_s', ''); + $text_search = esc_html($text_search); $recipes_per_page = ( $atts['show'] ? $atts['show'] : ( isset($_cooked_settings['recipes_per_page']) && $_cooked_settings['recipes_per_page'] ? $_cooked_settings['recipes_per_page'] : get_option( 'posts_per_page' ) ) ); $current_recipe_page = Cooked_Recipes::current_page(); @@ -510,7 +511,7 @@ public static function list_view( $list_atts = false ) { if ( $text_search ): // Replace [+] [,] [;] with spaces - $prep_text = str_replace(array('+',',',';'),' ',$text_search); + $prep_text = str_replace(['+', ',', ';'], ' ', $text_search); // Replace duplicate spaces $prep_text = preg_replace('/\s+/', ' ', $prep_text); @@ -520,7 +521,7 @@ public static function list_view( $list_atts = false ) { if ( !empty($words) ): $meta_query['relation'] = 'AND'; - foreach( $words as $word ): + foreach ( $words as $word ): $meta_query[] = [ 'key' => '_recipe_settings', 'value' => $word, @@ -936,6 +937,7 @@ public static function recipe_search_box( $options = false ) { $filters_set[$query['taxonomy']] = implode( ',', $query['terms'] ); endif; endforeach; + if ( isset($filters_set) ): foreach ( $filters_set as $taxonomy => $filter ): $this_tax = get_term_by( 'slug', $filter, $taxonomy ); @@ -980,7 +982,7 @@ public static function recipe_search_box( $options = false ) { echo '' . __('Categories','cooked') . ''; echo '
'; echo ( $view_all_recipes_url ? '' . __( 'All Categories','cooked' ) . '' : '' ); - foreach( $terms_array as $key => $val ): + foreach ( $terms_array as $key => $val ): if ( $key ): $term = get_term( $key ); $term_link = ( !empty($term) ? get_term_link( $term ) : false ); @@ -989,7 +991,7 @@ public static function recipe_search_box( $options = false ) { $total_taxonomies++; $sub_terms_array = Cooked_Settings::terms_array( 'cp_recipe_category', false, false, true, false, $key ); if ( !empty($sub_terms_array) ): - foreach( $sub_terms_array as $sub_key => $sub_val ): + foreach ( $sub_terms_array as $sub_key => $sub_val ): if ( $sub_key ): $sub_term = get_term( $sub_key ); $sub_term_link = ( !empty($sub_term) ? get_term_link( $sub_term ) : false ); @@ -1030,31 +1032,18 @@ public static function recipe_search_box( $options = false ) { // @TODO: This only works if there is no taxonomy query or permalink structure meaning that it only work // when the permalink structure is the default one and no taxonomy filters are selected. // Need to find a better way to handle this so it works in all cases. - if ( !isset( $recipe_args['tax_query'] ) || !get_option('permalink_structure') ) { - $page_id = $_cooked_settings['browse_page'] ? $_cooked_settings['browse_page'] : get_the_ID(); - $form_redirect = get_permalink( $page_id ); - } else { - $form_redirect = ''; - $page_id = false; - } - - // $page_id = $_cooked_settings['browse_page'] ? $_cooked_settings['browse_page'] : get_the_ID(); - // $form_redirect = get_permalink( $page_id ); - - // Replace the form redirect logic with: - // $page_id = $_cooked_settings['browse_page'] ? $_cooked_settings['browse_page'] : get_the_ID(); - // $form_redirect = ''; - - // if (isset($recipe_args['tax_query'])) { - // // Get current URL if we have taxonomy filters - // $form_redirect = Cooked_Functions::get_current_url(); - // } else { - // // Default to browse page if no filters + // if ( !isset( $recipe_args['tax_query'] ) || !get_option('permalink_structure') ) { + // $page_id = $_cooked_settings['browse_page'] ? $_cooked_settings['browse_page'] : get_the_ID(); // $form_redirect = get_permalink($page_id); + // } else { + // $form_redirect = ''; + // $page_id = false; // } - // Remove any existing search params from the redirect URL - //$form_redirect = remove_query_arg(['cooked_search_s', 'cooked_browse_sort_by'], $form_redirect); + $page_id = $_cooked_settings['browse_page'] ? $_cooked_settings['browse_page'] : get_the_ID(); + $form_redirect = get_permalink($page_id); + + $cooked_search_s = get_query_var('cooked_search_s', ''); ob_start(); @@ -1062,21 +1051,21 @@ public static function recipe_search_box( $options = false ) { echo '
'; + echo ''; + if ( isset($recipe_args['tax_query'][0]['taxonomy']) ): + echo ''; + endif; + echo '
'; - echo ( !$options['hide_browse'] && $taxonomy_search_fields ? $taxonomy_search_fields : '' ); + echo !$options['hide_browse'] && $taxonomy_search_fields ? $taxonomy_search_fields : ''; - echo ''; + echo ''; echo ''; echo '
'; - echo ''; - if ( isset($recipe_args['tax_query'][0]['taxonomy']) && is_front_page() || isset($recipe_args['tax_query'][0]['taxonomy']) && !get_option('permalink_structure') ): - echo ''; - endif; - if ( isset( $recipe_args['orderby'] ) && is_array( $recipe_args['orderby'] ) ): $sorting_type = key($recipe_args['orderby']) . '_' . current( $recipe_args['orderby'] ); else: @@ -1105,7 +1094,7 @@ public static function recipe_search_box( $options = false ) { if ( !$options['hide_sorting'] ): echo ''; diff --git a/includes/class.cooked-seo.php b/includes/class.cooked-seo.php index 4c149a4..de0fcfe 100644 --- a/includes/class.cooked-seo.php +++ b/includes/class.cooked-seo.php @@ -56,8 +56,10 @@ public static function schema_values( $recipe = false ) { foreach ( $recipe['ingredients'] as $ing ): if ( isset( $ing['section_heading_name'] ) ): continue; endif; $ingredient = Cooked_Recipes::single_ingredient( $ing, false, true ); - $ingredient_cleaned = wp_strip_all_tags( preg_replace("~(?:\[/?)[^/\]]+/?\]~s", '', $ingredient) ); - $ingredients[] = $ingredient_cleaned; + if ( !empty( $ingredient ) ): + $ingredient_cleaned = wp_strip_all_tags( preg_replace("~(?:\[/?)[^/\]]+/?\]~s", '', $ingredient) ); + $ingredients[] = $ingredient_cleaned; + endif; endforeach; endif; @@ -71,24 +73,26 @@ public static function schema_values( $recipe = false ) { endif; $direction = Cooked_Recipes::single_direction( $dir, false, true ); - $direction_cleaned = wp_strip_all_tags( preg_replace("~(?:\[/?)[^/\]]+/?\]~s", '', $direction) ); - $image_id = isset($dir['image']) ? $dir['image'] : false; - - $image = ''; - if ( $image_id ): - $image = wp_get_attachment_image_src( $image_id, 'full' ); - $image = $image[0]; + if ( !empty( $direction ) ): + $direction_cleaned = wp_strip_all_tags( preg_replace("~(?:\[/?)[^/\]]+/?\]~s", '', $direction) ); + $image_id = isset($dir['image']) ? $dir['image'] : false; + + $image = ''; + if ( $image_id ): + $image = wp_get_attachment_image_src( $image_id, 'full' ); + $image = $image[0]; + endif; + + $directions[] = [ + '@type' => 'HowToStep', + 'name' => sprintf(__('Step %d', 'cooked'), $number), + 'text' => $direction_cleaned, + 'url' => get_permalink($rpost) . '#cooked-single-direction-step-' . $number, + 'image' => $image, + ]; endif; - - $directions[] = [ - '@type' => 'HowToStep', - 'name' => sprintf(__('Step %d', 'cooked'), $number), - 'text' => $direction_cleaned, - 'url' => get_permalink($rpost) . '#cooked-single-direction-step-' . $number, - 'image' => $image, - ]; - $number++; + endforeach; endif; From 67d1a2014b007bea6f76fe26bcdd8a1850a1f54f Mon Sep 17 00:00:00 2001 From: Armand Tresova Date: Tue, 24 Dec 2024 20:36:32 -0500 Subject: [PATCH 11/17] WP Editor Proper Initialization and Reinitialization #80 - The inline link selector is broken when manually initializing the WP editor. I don't know why this is but as a temporary solution I am switching it to use the wp_link_advanced which will open a modal to select or input the link. - Such as when reordering directions the WP editor needs to be reinitialization. - Also when adding a new direction initialization needs to happen on the textarea field. --- assets/admin/js/cooked-functions.js | 162 +++++++++++++----------- assets/admin/js/cooked-functions.min.js | 2 +- languages/cooked.po | 2 +- languages/cooked.pot | 4 +- package-lock.json | 63 +++++---- 5 files changed, 124 insertions(+), 109 deletions(-) diff --git a/assets/admin/js/cooked-functions.js b/assets/admin/js/cooked-functions.js index 4361298..be13978 100644 --- a/assets/admin/js/cooked-functions.js +++ b/assets/admin/js/cooked-functions.js @@ -29,10 +29,42 @@ var $_CookedConditionalTimeout = false; } // Cooked Sortables - if ($_CookedSortable.length){ - if ($_CookedSortable.find( '.cooked-icon-drag' )) { + if ($_CookedSortable.length) { + if ($_CookedSortable.find('.cooked-icon-drag')) { $_CookedSortable.sortable({ - handle: ".cooked-icon-drag" + stop: function(event, ui) { + let textarea = ui.item.find('textarea'); + let textareaName = textarea.attr('name'); + let fieldID = textarea.attr('id'); + + wp.editor.remove(fieldID); + wp.editor.initialize(fieldID, { + tinymce: { + wpautop: false, + toolbar1: 'bold,italic,underline,blockquote,strikethrough,bullist,numlist,alignleft,aligncenter,alignright,undo,redo,wp_link_advanced,unlink,fullscreen', + toolbar2: '', + toolbar3: '', + toolbar4: '', + height: 100, + textarea_name: textareaName, + plugins: 'link lists fullscreen wordpress wplink', + setup: function(editor) { + // @TODO: Inline Link editor does not work. + // editor.on('init', function() { + // if (typeof wpLink !== 'undefined') { + // editor.addCommand('WP_Link', function() { + // window.wpActiveEditor = editor.id; + // wpLink.open(editor.id); + // return false; + // }); + // } + // }); + } + }, + quicktags: true, + mediaButtons: false + }); + } }); } else { $_CookedSortable.sortable(); @@ -244,10 +276,9 @@ var $_CookedConditionalTimeout = false; } // Recipe Tabs - if ($_CookedRecipeTabs.length){ - - var $_CookedRecipeTab = $_CookedRecipeTabs.find('li'), - $_CookedRecipeTabsOffset = $_CookedRecipeTabs.offset().top - 32; // 32px for the admin bar + if ($_CookedRecipeTabs.length) { + var $_CookedRecipeTab = $_CookedRecipeTabs.find('li'), + $_CookedRecipeTabsOffset = $_CookedRecipeTabs.offset().top - 32; // 32px for the admin bar $(window).on('load scroll',function() { var scroll = $(window).scrollTop(); @@ -258,28 +289,24 @@ var $_CookedConditionalTimeout = false; } }); - $_CookedRecipeTab.on('click',function(e){ - + $_CookedRecipeTab.on('click', function(e) { e.preventDefault(); - window.scrollTo(0,0); + $_CookedRecipeTab.removeClass('active'); + window.scrollTo(0, 0); - var thisTab = $(this), - thisTabID = thisTab.attr('id'); + var thisTab = $(this), + thisTabID = thisTab.attr('id').split('cooked-recipe-tab-')[1]; - thisTabID = thisTabID.split('cooked-recipe-tab-'); - thisTabID = thisTabID[1]; $('.cooked-recipe-tab-content').hide(); - $('#cooked-recipe-tab-content-'+thisTabID).show(); + var $newTab = $('#cooked-recipe-tab-content-' + thisTabID); + $newTab.show(); - $_CookedRecipeTab.removeClass('active'); thisTab.addClass('active'); - }); } // Checkboxes - if ( $_CookedSettingsTabs.length || $_CookedRecipeTabs.length ){ - + if ( $_CookedSettingsTabs.length || $_CookedRecipeTabs.length ) { var greenSwitches = Array.prototype.slice.call(document.querySelectorAll('.cooked-switch')); var redSwitches = Array.prototype.slice.call(document.querySelectorAll('.cooked-switch-red')); var yellowSwitches = Array.prototype.slice.call(document.querySelectorAll('.cooked-switch-yellow')); @@ -300,16 +327,13 @@ var $_CookedConditionalTimeout = false; graySwitches.forEach(function( html ) { var graySwitchery = new Switchery( html, { color: '#aaaaaa', size: 'small' } ); }); - } // Settings Tabs - if ($_CookedSettingsTabs.length){ - + if ($_CookedSettingsTabs.length) { var CookedSettingsTabHash = window.location.hash; - - var $_CookedSettingsTab = $_CookedSettingsTabs.find('li'), - $_CookedSettingsTabOffset = $_CookedSettingsTabs.offset().top - 32; // 32px for the admin bar + var $_CookedSettingsTab = $_CookedSettingsTabs.find('li'), + $_CookedSettingsTabOffset = $_CookedSettingsTabs.offset().top - 32; // 32px for the admin bar $(window).on('load scroll',function() { var scroll = $(window).scrollTop(); @@ -322,13 +346,13 @@ var $_CookedConditionalTimeout = false; } }); - if ( CookedSettingsTabHash ){ + if ( CookedSettingsTabHash ) { var activeTab = CookedSettingsTabHash; activeTab = activeTab.split('#'); activeTab = activeTab[1]; $_CookedSettingsTabs.find('li').removeClass('active'); $_CookedSettingsTabs.find('a[href="'+CookedSettingsTabHash+'"]').parent().addClass('active'); - if ( activeTab == 'migration' ){ + if ( activeTab == 'migration' ) { $_CookedRecipeSettingsSubmit.hide(); } else { $_CookedRecipeSettingsSubmit.show(); @@ -343,8 +367,7 @@ var $_CookedConditionalTimeout = false; $('#cooked-settings-tab-content-'+activeTab).show(); } - $_CookedSettingsTab.on('click',function(e){ - + $_CookedSettingsTab.on('click',function(e) { $('.tab-content').hide(); var thisTab = $(this).find('a'); $_CookedSettingsTabs.find('li').removeClass('active'); @@ -354,7 +377,7 @@ var $_CookedConditionalTimeout = false; activeTab = activeTab.split('#'); activeTab = activeTab[1]; - if ( activeTab == 'migration' ){ + if ( activeTab == 'migration' ) { $_CookedRecipeSettingsSubmit.hide(); } else { $_CookedRecipeSettingsSubmit.show(); @@ -368,17 +391,15 @@ var $_CookedConditionalTimeout = false; } else { window.scrollTo(0,0); } - }); } if ($_CookedIngredientBuilder.length) { - cooked_reset_ingredient_builder(); $_CookedIngredientBuilder.on('keydown', 'input[data-ingredient-part="name"]', function(e) { - if ( e.keyCode === 9 || e.keyCode === 13 ){ - if ( $(this).parents('.cooked-ingredient-block').is(':last-child') ){ + if ( e.keyCode === 9 || e.keyCode === 13 ) { + if ( $(this).parents('.cooked-ingredient-block').is(':last-child') ) { e.preventDefault(); $('#cooked-recipe-tab-content-ingredients').find('.cooked-add-ingredient-button').trigger('click'); $_CookedIngredientBuilder.find('.cooked-ingredient-block:last-child input[data-ingredient-part="amount"]').focus(); @@ -424,14 +445,14 @@ var $_CookedConditionalTimeout = false; cooked_reset_ingredient_builder(); }); - $_CookedIngredientBuilder.parent().on('click','.cooked-add-heading-button',function(e){ + $_CookedIngredientBuilder.parent().on('click','.cooked-add-heading-button',function(e) { e.preventDefault(); var clonedHeadingTemplate = $_CookedIngredientBuilder.parent().find('.cooked-heading-template').clone().removeClass('cooked-template cooked-heading-template').addClass('cooked-ingredient-block cooked-ingredient-heading'); $_CookedIngredientBuilder.append(clonedHeadingTemplate); cooked_reset_ingredient_builder(); }); - $_CookedIngredientBuilder.parent().on('click','.cooked-delete-ingredient',function(e){ + $_CookedIngredientBuilder.parent().on('click','.cooked-delete-ingredient',function(e) { e.preventDefault(); $(this).parent().remove(); cooked_reset_ingredient_builder(); @@ -472,7 +493,7 @@ var $_CookedConditionalTimeout = false; // Instantiates the variable that holds the media library frame. var direction_image_frame, directionID; - $('body').on('click','.cooked-direction-img-placeholder, .cooked-direction-img',function(e) { + $('body').on('click', '.cooked-direction-img-placeholder, .cooked-direction-img', function(e) { e.preventDefault(); var thisButton = $(this).parent().find('.direction-image-button'); thisButton.trigger('click'); @@ -521,8 +542,7 @@ var $_CookedConditionalTimeout = false; cooked_init_gallery_sorting(); // Runs when the Add Images button is clicked in the Gallery tab. - $('body').on('click','.cooked-gallery-add-button',function(e){ - + $('body').on('click','.cooked-gallery-add-button', function(e) { var thisButton = $(this); e.preventDefault(); @@ -541,8 +561,7 @@ var $_CookedConditionalTimeout = false; }); // Runs when an image is selected. - gallery_images_frame.on('select', function(){ - + gallery_images_frame.on('select', function() { // Grabs the attachment selection and creates a JSON representation of the model. var media_attachments = gallery_images_frame.state().get('selection').toJSON(); var thisThumbnail; @@ -555,22 +574,19 @@ var $_CookedConditionalTimeout = false; } cooked_init_gallery_sorting(); - }); // Opens the media library frame. gallery_images_frame.open(); - }); - $('body').on('click','.cooked-recipe-gallery-item img',function(e){ + $('body').on('click','.cooked-recipe-gallery-item img', function(e) { e.preventDefault(); var thisButton = $(this).parent().find('.cooked-gallery-edit-button'); thisButton.trigger('click'); }); - $('body').on('click','.cooked-gallery-edit-button',function(e){ - + $('body').on('click','.cooked-gallery-edit-button', function(e) { var thisButton = $(this), attachment_id = thisButton.data('attachment-id'); @@ -595,8 +611,7 @@ var $_CookedConditionalTimeout = false; image_edit_frame.open(); // Runs when an image is selected. - image_edit_frame.on('select', function(){ - + image_edit_frame.on('select', function() { // Grabs the attachment selection and creates a JSON representation of the model. var media_attachments = image_edit_frame.state().get('selection').toJSON(); var thisThumbnail; @@ -609,17 +624,15 @@ var $_CookedConditionalTimeout = false; } cooked_init_gallery_sorting(); - }); - }); - $_CookedRecipeGallery.on('click','.remove-image-button',function(e){ + $_CookedRecipeGallery.on('click', '.remove-image-button', function(e) { var thisButton = $(this); directionID = thisButton.data('id'); e.preventDefault(); - if ( directionID ){ + if ( directionID ) { $('#direction-'+directionID+'-image-src').parent().removeClass('cooked-has-image').prop('src',false); $('input[name="_recipe_settings[directions]['+directionID+'][image]"]').val(''); $('.direction-image-button[data-id="'+directionID+'"]').prop( 'value',cooked_js_vars.i18n_image_title ); @@ -629,24 +642,20 @@ var $_CookedConditionalTimeout = false; }); } - if ( $_CookedNutritionFactsTab.length ){ - + if ( $_CookedNutritionFactsTab.length ) { init_nutrition_facts( $_CookedNutritionFactsTab ); - $_CookedNutritionFactsTab.on('keyup','input',function(e){ + $_CookedNutritionFactsTab.on('keyup', 'input', function(e) { init_nutrition_facts( $_CookedNutritionFactsTab ); }); - } /**** Time Pickers ****/ - if ( $('#cooked-prep-time').length ){ - $( '#cooked-prep-time,#cooked-cook-time' ).on('change',function(){ - + if ( $('#cooked-prep-time').length ) { + $( '#cooked-prep-time,#cooked-cook-time' ).on('change', function() { var prepTimeValue = parseInt( $( '#cooked-prep-time' ).val() ), - cookTimeValue = parseInt( $( '#cooked-cook-time' ).val() ); - cooked_updateTotalTimeValue( prepTimeValue, cookTimeValue ); - + cookTimeValue = parseInt( $( '#cooked-cook-time' ).val() ); + cooked_updateTotalTimeValue( prepTimeValue, cookTimeValue ); }); } @@ -833,26 +842,37 @@ function cooked_reset_direction_builder() { let theId = thisField.attr('id'); - if ( theId == '' ) { + if ( theId == '' || theId == undefined ) { directionPartName = directionPartName.replace( '_', '-' ); var fieldID = 'direction-' + randomKeyForInterval + '-' + directionPartName; thisField.attr('id', fieldID); - if (directionPartName === 'content') { + if (directionPartName === 'content' && thisField.is('textarea') && cooked_js_vars.wp_editor_roles_allowed) { // Init the WordPress Editor. - wp.editor.initialize( fieldID, { + wp.editor.initialize(fieldID, { tinymce: { wpautop: false, - toolbar1: 'bold,italic,underline,blockquote,strikethrough,bullist,numlist,alignleft,aligncenter,alignright,undo,redo,link,fullscreen', + toolbar1: 'bold,italic,underline,blockquote,strikethrough,bullist,numlist,alignleft,aligncenter,alignright,undo,redo,wp_link_advanced,unlink,fullscreen', toolbar2: '', toolbar3: '', toolbar4: '', - editor_height: 100, - textarea_name: '_recipe_settings[directions][' + randomKeyForInterval + '][' + directionPartName + ']' - }, - quicktags: { - buttons: 'strong,em,link,block,del,ins,img,ul,ol,li,code,more,close' + height: 100, + textarea_name: '_recipe_settings[directions][' + randomKeyForInterval + '][' + directionPartName + ']', + plugins: 'link lists fullscreen wordpress wplink', + setup: function(editor) { + // @TODO: Inline Link editor does not work. + // editor.on('init', function() { + // if (typeof wpLink !== 'undefined') { + // editor.addCommand('WP_Link', function() { + // window.wpActiveEditor = editor.id; + // wpLink.open(editor.id); + // return false; + // }); + // } + // }); + } }, + quicktags: true, mediaButtons: false }); } diff --git a/assets/admin/js/cooked-functions.min.js b/assets/admin/js/cooked-functions.min.js index f109421..a5b5ba8 100644 --- a/assets/admin/js/cooked-functions.min.js +++ b/assets/admin/js/cooked-functions.min.js @@ -1 +1 @@ -var $_CookedConditionalTimeout=!1,cooked_recipe_update_counter=((p=>{p(document).ready(function(){var r,o,t,e,i,n,a,d,c,l=p(".cooked-color-field"),s=p("#cooked_recipe_settings").find("select"),u=p("#cooked-recipe-tabs"),k=(p("#cooked-settings-wrap"),p("#cooked_recipe_settings")),_=k.find("input#submit");$_CookedTooltips=p(".cooked-tooltip"),$_CookedConditionals=p(".cooked-conditional-hidden"),$_CookedSortable=p(".cooked-sortable"),$_CookedRecipeSaveDefault=p(".cooked-layout-save-default"),$_CookedShortcodeField=p(".cooked-shortcode-field"),$_CookedIngredientBuilder=p("#cooked-ingredients-builder"),$_CookedAutoNutritionButton=p(".cooked-auto-nutrition-button"),$_CookedDirectionBuilder=p("#cooked-directions-builder"),$_CookedRecipeGallery=p("#cooked-recipe-image-gallery"),$_CookedNutritionFactsTab=p("#cooked-recipe-tab-content-nutrition"),$_CookedSettingsPanel=p("#cooked-settings-panel"),$_CookedSettingsTabs=p("#cooked-settings-tabs"),l.length&&l.wpColorPicker(),$_CookedSortable.length&&($_CookedSortable.find(".cooked-icon-drag")?$_CookedSortable.sortable({handle:".cooked-icon-drag"}):$_CookedSortable.sortable()),$_CookedRecipeSaveDefault.length&&($_CookedRecipeSaveDefault.tooltipster({theme:["tooltipster-light","tooltipster-sideTip-cooked"],trigger:"click",animation:"grow",delay:0,speed:200,maxWidth:275,contentAsHTML:!0,interactive:!0,functionReady:function(c,e){p(".cooked-save-default-all").on("click",function(e){e.preventDefault();var o,i=p(this),e=i.data("nonce"),n=i.data("bulk-nonce"),t=i.parent(),a=confirm(cooked_js_vars.i18n_confirm_save_default_all),d=p("#_recipe_settings_content"),r=tinymce.get("_recipe_settings_content");o=null===r?d.val():r.getContent(),a&&!i.hasClass("disabled")&&(t.find(".button, .button-primary").addClass("disabled"),p.post(cooked_js_vars.ajax_url,{action:"cooked_save_default",default_content:o,nonce:e},function(e){p.post(cooked_js_vars.ajax_url,{action:"cooked_get_recipe_ids",nonce:n},function(e){var t;i.removeClass("button-primary").addClass("button"),e&&(t=JSON.parse(e),0<(t=Object.keys(t).length))&&cooked_set_default_template(e,t,o,n,c)})}))}),p(".cooked-save-default-new").on("click",function(e){e.preventDefault();var t=p(this),e=t.data("nonce"),o=t.parent(),i=p("#_recipe_settings_content"),n=tinymce.get("_recipe_settings_content");i=null===n?i.val():n.getContent(),t.hasClass("disabled")||(o.find(".button, .button-primary").addClass("disabled"),p.post(cooked_js_vars.ajax_url,{action:"cooked_save_default",default_content:i,nonce:e},function(e){t.text(cooked_js_vars.i18n_saved),o.find(".button-primary").removeClass("disabled")}).fail(function(e){}))})}}),p(".cooked-layout-load-default").on("click",function(e){e.preventDefault();var e=p(this),t=e.parent(),o=confirm(cooked_js_vars.i18n_confirm_load_default),i=p("#_recipe_settings_content"),n=tinymce.get("_recipe_settings_content");o&&!e.hasClass("disabled")&&(t.find(".button, .button-primary").addClass("disabled"),p.post(cooked_js_vars.ajax_url,{action:"cooked_load_default"},function(e){null===n?i.val(e):(i.val(e),n.setContent(e)),t.find(".button, .button-primary").removeClass("disabled")}).fail(function(e){t.find(".button, .button-primary").removeClass("disabled")}))})),s.length&&s.each(function(){p(this).wrap('
')}),$_CookedTooltips.length&&$_CookedTooltips.tooltipster({theme:["tooltipster-light","tooltipster-sideTip-cooked"],animation:"grow",delay:100,speed:200,maxWidth:275,contentAsHTML:!0,interactive:!0}),$_CookedShortcodeField.length&&$_CookedShortcodeField.on("click",function(e){p(this).select()}),$_CookedConditionals.length&&(r=[],$_CookedConditionals.each(function(){var e=p(this),t=p(this).data("condition"),o=p(this).data("value"),i=p("#"+t),o=!!o&&o.split(" "),n=e.is("li")||e.is("span")?"inline-block":"block";i.is(":checkbox")&&i.is(":checked")||i.is(":radio")&&i.is(":checked")||!(i.is(":checkbox")&&!i.is(":checked")||i.is(":radio")&&!i.is(":checked"))&&(!i.is(":checkbox")&&!o&&i.val()||!i.is(":checkbox")&&o&&-1 a").attr("href")).split("#"))[1],p(".cooked-settings-tab-content").hide(),p("#cooked-settings-tab-content-"+n).show(),s.on("click",function(e){p(".tab-content").hide();var t=p(this).find("a"),t=($_CookedSettingsTabs.find("li").removeClass("active"),p(this).addClass("active"),t.attr("href"));"migration"==(t=(t=t.split("#"))[1])?_.hide():_.show(),p(".cooked-settings-tab-content").hide(),p("#cooked-settings-tab-content-"+t).show(),p("#cooked-settings-panel").hasClass("stuck")?window.scrollTo(0,130):window.scrollTo(0,0)})),$_CookedIngredientBuilder.length&&(cooked_reset_ingredient_builder(),$_CookedIngredientBuilder.on("keydown",'input[data-ingredient-part="name"]',function(e){9!==e.keyCode&&13!==e.keyCode||p(this).parents(".cooked-ingredient-block").is(":last-child")&&(e.preventDefault(),p("#cooked-recipe-tab-content-ingredients").find(".cooked-add-ingredient-button").trigger("click"),$_CookedIngredientBuilder.find('.cooked-ingredient-block:last-child input[data-ingredient-part="amount"]').focus())}),$_CookedAutoNutritionButton.length&&$_CookedIngredientBuilder.on("change",'input[data-ingredient-part="name"]',function(e){var t=!1;$_CookedIngredientBuilder.find('input[data-ingredient-part="name"]').each(function(){if(""!=p(this).val())return!(t=!0)}),t?$_CookedAutoNutritionButton.prop("disabled",!1):$_CookedAutoNutritionButton.prop("disabled",!0)}),$_CookedIngredientBuilder.on("keyup",'input[data-ingredient-part="url"]',function(e){var t=p(this).val(),o=p(this).parents(".recipe-setting-block");t?o.addClass("cooked-has-url"):o.removeClass("cooked-has-url")}),$_CookedIngredientBuilder.parent().on("click",".cooked-add-ingredient-button",function(e){e.preventDefault();e=$_CookedIngredientBuilder.parent().find(".cooked-ingredient-template").clone().removeClass("cooked-template cooked-ingredient-template").addClass("cooked-ingredient-block");$_CookedIngredientBuilder.append(e),cooked_reset_ingredient_builder()}),$_CookedIngredientBuilder.parent().on("click",".cooked-add-heading-button",function(e){e.preventDefault();e=$_CookedIngredientBuilder.parent().find(".cooked-heading-template").clone().removeClass("cooked-template cooked-heading-template").addClass("cooked-ingredient-block cooked-ingredient-heading");$_CookedIngredientBuilder.append(e),cooked_reset_ingredient_builder()}),$_CookedIngredientBuilder.parent().on("click",".cooked-delete-ingredient",function(e){e.preventDefault(),p(this).parent().remove(),cooked_reset_ingredient_builder()})),$_CookedDirectionBuilder.length&&(cooked_reset_direction_builder(),$_CookedDirectionBuilder.parent().on("click",".cooked-add-direction-button",function(e){e.preventDefault();e=$_CookedDirectionBuilder.parent().find(".cooked-direction-template").clone().removeClass("cooked-template cooked-direction-template").addClass("cooked-direction-block");$_CookedDirectionBuilder.append(e),cooked_reset_direction_builder()}),$_CookedDirectionBuilder.parent().on("click",".cooked-add-heading-button",function(e){e.preventDefault();e=$_CookedDirectionBuilder.parent().find(".cooked-heading-template").clone().removeClass("cooked-template cooked-heading-template").addClass("cooked-direction-block cooked-direction-heading");$_CookedDirectionBuilder.append(e),cooked_reset_direction_builder()}),$_CookedDirectionBuilder.parent().on("click",".cooked-delete-direction",function(e){e.preventDefault(),p(this).parent().remove(),cooked_reset_direction_builder()}),$_CookedDirectionBuilder.parent().on("click",".remove-image-button",function(e){e.preventDefault(),p(this).parent().removeClass("cooked-has-image"),p(this).parent().find("img").remove(),p(this).parent().find('input[data-direction-part="image"]').val(""),cooked_reset_direction_builder()}),p("body").on("click",".cooked-direction-img-placeholder, .cooked-direction-img",function(e){e.preventDefault(),p(this).parent().find(".direction-image-button").trigger("click")}),p("body").on("click",".direction-image-button",function(e){var t=p(this);d=t.data("id"),e.preventDefault(),a||(a=wp.media.frames.direction_image_frame=wp.media({title:cooked_js_vars.i18n_image_title,button:{text:cooked_js_vars.i18n_image_button},library:{type:"image"}})).on("select",function(){var e=a.state().get("selection").first().toJSON();p("#direction-"+d+"-image-src").attr("src",e.sizes.thumbnail.url).parent().addClass("cooked-has-image"),p('input[name="_recipe_settings[directions]['+d+'][image]"]').val(e.id),p('.direction-image-button[data-id="'+d+'"]').prop("value",cooked_js_vars.i18n_image_change)}),a.open()})),$_CookedRecipeGallery.length&&(cooked_init_gallery_sorting(),p("body").on("click",".cooked-gallery-add-button",function(e){p(this);e.preventDefault(),c||(c=wp.media.frames.gallery_images_frame=wp.media({title:cooked_js_vars.i18n_gallery_image_title,button:{text:cooked_js_vars.i18n_gallery_image_title},library:{type:"image"},multiple:!0})).on("select",function(){var e,t,o,i=c.state().get("selection").toJSON();for(e in i)i.hasOwnProperty(e)&&(o=(t=i[e]).sizes.thumbnail.url,p("#cooked-recipe-image-gallery").append(''));cooked_init_gallery_sorting()}),c.open()}),p("body").on("click",".cooked-recipe-gallery-item img",function(e){e.preventDefault(),p(this).parent().find(".cooked-gallery-edit-button").trigger("click")}),p("body").on("click",".cooked-gallery-edit-button",function(e){var n=p(this),t=n.data("attachment-id"),a=(e.preventDefault(),wp.media.frames.gallery_images_frame=wp.media({title:cooked_js_vars.i18n_edit_image_title,button:{text:cooked_js_vars.i18n_edit_image_button},library:{type:"image"},multiple:!1}));a.on("open",function(){var e=a.state().get("selection");(attachment=wp.media.attachment(t)).fetch(),e.add(attachment?[attachment]:[])}),a.open(),a.on("select",function(){var e,t,o,i=a.state().get("selection").toJSON();for(e in i)i.hasOwnProperty(e)&&(o=(t=i[e]).sizes.thumbnail.url,n.parent().replaceWith(''));cooked_init_gallery_sorting()})}),$_CookedRecipeGallery.on("click",".remove-image-button",function(e){var t=p(this);d=t.data("id"),e.preventDefault(),d?(p("#direction-"+d+"-image-src").parent().removeClass("cooked-has-image").prop("src",!1),p('input[name="_recipe_settings[directions]['+d+'][image]"]').val(""),p('.direction-image-button[data-id="'+d+'"]').prop("value",cooked_js_vars.i18n_image_title)):t.parent().remove()})),$_CookedNutritionFactsTab.length&&(init_nutrition_facts($_CookedNutritionFactsTab),$_CookedNutritionFactsTab.on("keyup","input",function(e){init_nutrition_facts($_CookedNutritionFactsTab)})),p("#cooked-prep-time").length&&p("#cooked-prep-time,#cooked-cook-time").on("change",function(){cooked_updateTotalTimeValue(parseInt(p("#cooked-prep-time").val()),parseInt(p("#cooked-cook-time").val()))})})})(jQuery),0);function cooked_set_default_template(e,o,i,n,a){var d,r,c,l;0{_(document).ready(function(){var r,o,t,e,i,n,a,d,c,l=_(".cooked-color-field"),s=_("#cooked_recipe_settings").find("select"),u=_("#cooked-recipe-tabs"),k=(_("#cooked-settings-wrap"),_("#cooked_recipe_settings")),p=k.find("input#submit");$_CookedTooltips=_(".cooked-tooltip"),$_CookedConditionals=_(".cooked-conditional-hidden"),$_CookedSortable=_(".cooked-sortable"),$_CookedRecipeSaveDefault=_(".cooked-layout-save-default"),$_CookedShortcodeField=_(".cooked-shortcode-field"),$_CookedIngredientBuilder=_("#cooked-ingredients-builder"),$_CookedAutoNutritionButton=_(".cooked-auto-nutrition-button"),$_CookedDirectionBuilder=_("#cooked-directions-builder"),$_CookedRecipeGallery=_("#cooked-recipe-image-gallery"),$_CookedNutritionFactsTab=_("#cooked-recipe-tab-content-nutrition"),$_CookedSettingsPanel=_("#cooked-settings-panel"),$_CookedSettingsTabs=_("#cooked-settings-tabs"),l.length&&l.wpColorPicker(),$_CookedSortable.length&&($_CookedSortable.find(".cooked-icon-drag")?$_CookedSortable.sortable({stop:function(e,t){var t=t.item.find("textarea"),o=t.attr("name"),t=t.attr("id");wp.editor.remove(t),wp.editor.initialize(t,{tinymce:{wpautop:!1,toolbar1:"bold,italic,underline,blockquote,strikethrough,bullist,numlist,alignleft,aligncenter,alignright,undo,redo,wp_link_advanced,unlink,fullscreen",toolbar2:"",toolbar3:"",toolbar4:"",height:100,textarea_name:o,plugins:"link lists fullscreen wordpress wplink",setup:function(e){}},quicktags:!0,mediaButtons:!1})}}):$_CookedSortable.sortable()),$_CookedRecipeSaveDefault.length&&($_CookedRecipeSaveDefault.tooltipster({theme:["tooltipster-light","tooltipster-sideTip-cooked"],trigger:"click",animation:"grow",delay:0,speed:200,maxWidth:275,contentAsHTML:!0,interactive:!0,functionReady:function(c,e){_(".cooked-save-default-all").on("click",function(e){e.preventDefault();var o,i=_(this),e=i.data("nonce"),n=i.data("bulk-nonce"),t=i.parent(),a=confirm(cooked_js_vars.i18n_confirm_save_default_all),d=_("#_recipe_settings_content"),r=tinymce.get("_recipe_settings_content");o=null===r?d.val():r.getContent(),a&&!i.hasClass("disabled")&&(t.find(".button, .button-primary").addClass("disabled"),_.post(cooked_js_vars.ajax_url,{action:"cooked_save_default",default_content:o,nonce:e},function(e){_.post(cooked_js_vars.ajax_url,{action:"cooked_get_recipe_ids",nonce:n},function(e){var t;i.removeClass("button-primary").addClass("button"),e&&(t=JSON.parse(e),0<(t=Object.keys(t).length))&&cooked_set_default_template(e,t,o,n,c)})}))}),_(".cooked-save-default-new").on("click",function(e){e.preventDefault();var t=_(this),e=t.data("nonce"),o=t.parent(),i=_("#_recipe_settings_content"),n=tinymce.get("_recipe_settings_content");i=null===n?i.val():n.getContent(),t.hasClass("disabled")||(o.find(".button, .button-primary").addClass("disabled"),_.post(cooked_js_vars.ajax_url,{action:"cooked_save_default",default_content:i,nonce:e},function(e){t.text(cooked_js_vars.i18n_saved),o.find(".button-primary").removeClass("disabled")}).fail(function(e){}))})}}),_(".cooked-layout-load-default").on("click",function(e){e.preventDefault();var e=_(this),t=e.parent(),o=confirm(cooked_js_vars.i18n_confirm_load_default),i=_("#_recipe_settings_content"),n=tinymce.get("_recipe_settings_content");o&&!e.hasClass("disabled")&&(t.find(".button, .button-primary").addClass("disabled"),_.post(cooked_js_vars.ajax_url,{action:"cooked_load_default"},function(e){null===n?i.val(e):(i.val(e),n.setContent(e)),t.find(".button, .button-primary").removeClass("disabled")}).fail(function(e){t.find(".button, .button-primary").removeClass("disabled")}))})),s.length&&s.each(function(){_(this).wrap('
')}),$_CookedTooltips.length&&$_CookedTooltips.tooltipster({theme:["tooltipster-light","tooltipster-sideTip-cooked"],animation:"grow",delay:100,speed:200,maxWidth:275,contentAsHTML:!0,interactive:!0}),$_CookedShortcodeField.length&&$_CookedShortcodeField.on("click",function(e){_(this).select()}),$_CookedConditionals.length&&(r=[],$_CookedConditionals.each(function(){var e=_(this),t=_(this).data("condition"),o=_(this).data("value"),i=_("#"+t),o=!!o&&o.split(" "),n=e.is("li")||e.is("span")?"inline-block":"block";i.is(":checkbox")&&i.is(":checked")||i.is(":radio")&&i.is(":checked")||!(i.is(":checkbox")&&!i.is(":checked")||i.is(":radio")&&!i.is(":checked"))&&(!i.is(":checkbox")&&!o&&i.val()||!i.is(":checkbox")&&o&&-1<_.inArray(i.val(),o)||!i.is(":radio")&&!o&&i.val()||!i.is(":radio")&&o&&-1<_.inArray(i.val(),o))?e.css({display:n}):e.hide(),-1==_.inArray(t,r)&&r.push(t);for(var a=r.length,d=0;d a").attr("href")).split("#"))[1],_(".cooked-settings-tab-content").hide(),_("#cooked-settings-tab-content-"+n).show(),s.on("click",function(e){_(".tab-content").hide();var t=_(this).find("a"),t=($_CookedSettingsTabs.find("li").removeClass("active"),_(this).addClass("active"),t.attr("href"));"migration"==(t=(t=t.split("#"))[1])?p.hide():p.show(),_(".cooked-settings-tab-content").hide(),_("#cooked-settings-tab-content-"+t).show(),_("#cooked-settings-panel").hasClass("stuck")?window.scrollTo(0,130):window.scrollTo(0,0)})),$_CookedIngredientBuilder.length&&(cooked_reset_ingredient_builder(),$_CookedIngredientBuilder.on("keydown",'input[data-ingredient-part="name"]',function(e){9!==e.keyCode&&13!==e.keyCode||_(this).parents(".cooked-ingredient-block").is(":last-child")&&(e.preventDefault(),_("#cooked-recipe-tab-content-ingredients").find(".cooked-add-ingredient-button").trigger("click"),$_CookedIngredientBuilder.find('.cooked-ingredient-block:last-child input[data-ingredient-part="amount"]').focus())}),$_CookedAutoNutritionButton.length&&$_CookedIngredientBuilder.on("change",'input[data-ingredient-part="name"]',function(e){var t=!1;$_CookedIngredientBuilder.find('input[data-ingredient-part="name"]').each(function(){if(""!=_(this).val())return!(t=!0)}),t?$_CookedAutoNutritionButton.prop("disabled",!1):$_CookedAutoNutritionButton.prop("disabled",!0)}),$_CookedIngredientBuilder.on("keyup",'input[data-ingredient-part="url"]',function(e){var t=_(this).val(),o=_(this).parents(".recipe-setting-block");t?o.addClass("cooked-has-url"):o.removeClass("cooked-has-url")}),$_CookedIngredientBuilder.parent().on("click",".cooked-add-ingredient-button",function(e){e.preventDefault();e=$_CookedIngredientBuilder.parent().find(".cooked-ingredient-template").clone().removeClass("cooked-template cooked-ingredient-template").addClass("cooked-ingredient-block");$_CookedIngredientBuilder.append(e),cooked_reset_ingredient_builder()}),$_CookedIngredientBuilder.parent().on("click",".cooked-add-heading-button",function(e){e.preventDefault();e=$_CookedIngredientBuilder.parent().find(".cooked-heading-template").clone().removeClass("cooked-template cooked-heading-template").addClass("cooked-ingredient-block cooked-ingredient-heading");$_CookedIngredientBuilder.append(e),cooked_reset_ingredient_builder()}),$_CookedIngredientBuilder.parent().on("click",".cooked-delete-ingredient",function(e){e.preventDefault(),_(this).parent().remove(),cooked_reset_ingredient_builder()})),$_CookedDirectionBuilder.length&&(cooked_reset_direction_builder(),$_CookedDirectionBuilder.parent().on("click",".cooked-add-direction-button",function(e){e.preventDefault();e=$_CookedDirectionBuilder.parent().find(".cooked-direction-template").clone().removeClass("cooked-template cooked-direction-template").addClass("cooked-direction-block");$_CookedDirectionBuilder.append(e),cooked_reset_direction_builder()}),$_CookedDirectionBuilder.parent().on("click",".cooked-add-heading-button",function(e){e.preventDefault();e=$_CookedDirectionBuilder.parent().find(".cooked-heading-template").clone().removeClass("cooked-template cooked-heading-template").addClass("cooked-direction-block cooked-direction-heading");$_CookedDirectionBuilder.append(e),cooked_reset_direction_builder()}),$_CookedDirectionBuilder.parent().on("click",".cooked-delete-direction",function(e){e.preventDefault(),_(this).parent().remove(),cooked_reset_direction_builder()}),$_CookedDirectionBuilder.parent().on("click",".remove-image-button",function(e){e.preventDefault(),_(this).parent().removeClass("cooked-has-image"),_(this).parent().find("img").remove(),_(this).parent().find('input[data-direction-part="image"]').val(""),cooked_reset_direction_builder()}),_("body").on("click",".cooked-direction-img-placeholder, .cooked-direction-img",function(e){e.preventDefault(),_(this).parent().find(".direction-image-button").trigger("click")}),_("body").on("click",".direction-image-button",function(e){var t=_(this);d=t.data("id"),e.preventDefault(),a||(a=wp.media.frames.direction_image_frame=wp.media({title:cooked_js_vars.i18n_image_title,button:{text:cooked_js_vars.i18n_image_button},library:{type:"image"}})).on("select",function(){var e=a.state().get("selection").first().toJSON();_("#direction-"+d+"-image-src").attr("src",e.sizes.thumbnail.url).parent().addClass("cooked-has-image"),_('input[name="_recipe_settings[directions]['+d+'][image]"]').val(e.id),_('.direction-image-button[data-id="'+d+'"]').prop("value",cooked_js_vars.i18n_image_change)}),a.open()})),$_CookedRecipeGallery.length&&(cooked_init_gallery_sorting(),_("body").on("click",".cooked-gallery-add-button",function(e){_(this);e.preventDefault(),c||(c=wp.media.frames.gallery_images_frame=wp.media({title:cooked_js_vars.i18n_gallery_image_title,button:{text:cooked_js_vars.i18n_gallery_image_title},library:{type:"image"},multiple:!0})).on("select",function(){var e,t,o,i=c.state().get("selection").toJSON();for(e in i)i.hasOwnProperty(e)&&(o=(t=i[e]).sizes.thumbnail.url,_("#cooked-recipe-image-gallery").append(''));cooked_init_gallery_sorting()}),c.open()}),_("body").on("click",".cooked-recipe-gallery-item img",function(e){e.preventDefault(),_(this).parent().find(".cooked-gallery-edit-button").trigger("click")}),_("body").on("click",".cooked-gallery-edit-button",function(e){var n=_(this),t=n.data("attachment-id"),a=(e.preventDefault(),wp.media.frames.gallery_images_frame=wp.media({title:cooked_js_vars.i18n_edit_image_title,button:{text:cooked_js_vars.i18n_edit_image_button},library:{type:"image"},multiple:!1}));a.on("open",function(){var e=a.state().get("selection");(attachment=wp.media.attachment(t)).fetch(),e.add(attachment?[attachment]:[])}),a.open(),a.on("select",function(){var e,t,o,i=a.state().get("selection").toJSON();for(e in i)i.hasOwnProperty(e)&&(o=(t=i[e]).sizes.thumbnail.url,n.parent().replaceWith(''));cooked_init_gallery_sorting()})}),$_CookedRecipeGallery.on("click",".remove-image-button",function(e){var t=_(this);d=t.data("id"),e.preventDefault(),d?(_("#direction-"+d+"-image-src").parent().removeClass("cooked-has-image").prop("src",!1),_('input[name="_recipe_settings[directions]['+d+'][image]"]').val(""),_('.direction-image-button[data-id="'+d+'"]').prop("value",cooked_js_vars.i18n_image_title)):t.parent().remove()})),$_CookedNutritionFactsTab.length&&(init_nutrition_facts($_CookedNutritionFactsTab),$_CookedNutritionFactsTab.on("keyup","input",function(e){init_nutrition_facts($_CookedNutritionFactsTab)})),_("#cooked-prep-time").length&&_("#cooked-prep-time,#cooked-cook-time").on("change",function(){cooked_updateTotalTimeValue(parseInt(_("#cooked-prep-time").val()),parseInt(_("#cooked-cook-time").val()))})})})(jQuery),0);function cooked_set_default_template(e,o,i,n,a){var d,r,c,l;0= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3808,9 +3810,9 @@ } }, "node_modules/sass/node_modules/chokidar": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz", - "integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", "dev": true, "license": "MIT", "dependencies": { @@ -4197,20 +4199,20 @@ } }, "node_modules/tldts-core": { - "version": "6.1.68", - "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.68.tgz", - "integrity": "sha512-85TdlS/DLW/gVdf2oyyzqp3ocS30WxjaL4la85EArl9cHUR/nizifKAJPziWewSZjDZS71U517/i6ciUeqtB5Q==", + "version": "6.1.69", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.69.tgz", + "integrity": "sha512-nygxy9n2PBUFQUtAXAc122gGo+04/j5qr5TGQFZTHafTKYvmARVXt2cA5rgero2/dnXUfkdPtiJoKmrd3T+wdA==", "dev": true, "license": "MIT" }, "node_modules/tldts-icann": { - "version": "6.1.68", - "resolved": "https://registry.npmjs.org/tldts-icann/-/tldts-icann-6.1.68.tgz", - "integrity": "sha512-5Ue5gQ0sVFtK3KTRD7v9xB4CanUIFq1x8vZw8imTuwAqzo6SEvTh653qJM8AAtp2kLj+gJ9C+k+kabh1Zx4qZg==", + "version": "6.1.69", + "resolved": "https://registry.npmjs.org/tldts-icann/-/tldts-icann-6.1.69.tgz", + "integrity": "sha512-H3c/jgvuv8ghdMNJ0rMVECknl1B7qz+BZsFBd4n7l6J2CRnJx8foZ2Qrd32ZY2dqcMgER7KIQ52u1zTejSISAg==", "dev": true, "license": "MIT", "dependencies": { - "tldts-core": "^6.1.68" + "tldts-core": "^6.1.69" } }, "node_modules/to-regex-range": { @@ -4363,13 +4365,6 @@ "tslib": "^2.0.3" } }, - "node_modules/urlpattern-polyfill": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", - "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==", - "dev": true, - "license": "MIT" - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", From c41cf69f6e86e5682c487e5f65447039b014f5d7 Mon Sep 17 00:00:00 2001 From: Armand Tresova Date: Thu, 26 Dec 2024 13:48:06 -0500 Subject: [PATCH 12/17] Cleanup --- includes/class.cooked-post-types.php | 4 +--- includes/class.cooked-recipes.php | 18 ------------------ 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/includes/class.cooked-post-types.php b/includes/class.cooked-post-types.php index 89d4342..5ceb25f 100644 --- a/includes/class.cooked-post-types.php +++ b/includes/class.cooked-post-types.php @@ -172,9 +172,7 @@ public static function cooked_meta_tags() { public static function add_query_vars_filter( $vars ) { $vars[] = 'servings'; - // $vars[] = 'cp_recipe_category'; - // $vars[] = 'cooked_search_s'; - // $vars[] = 'cooked_browse_sort_by'; + return $vars; } diff --git a/includes/class.cooked-recipes.php b/includes/class.cooked-recipes.php index a56dece..ffe6c8e 100644 --- a/includes/class.cooked-recipes.php +++ b/includes/class.cooked-recipes.php @@ -177,27 +177,9 @@ public static function get_settings( $post_id, $bc = true ) { public function check_recipe_query() { global $_cooked_settings, $recipe_query; - // Taxonomies: 'cp_recipe_category', 'cp_recipe_cooking_method', 'cp_recipe_cuisine', 'cp_recipe_tags', 'cp_recipe_diet' - if ( !isset($recipe_query['cp_recipe_category']) ): $recipe_query['cp_recipe_category'] = ( isset($_GET['cp_recipe_category']) && $_GET['cp_recipe_category'] ? intval($_GET['cp_recipe_category']) : ( isset($_cooked_settings['browse_default_cp_recipe_category']) && $_cooked_settings['browse_default_cp_recipe_category'] ? $_cooked_settings['browse_default_cp_recipe_category'] : false ) ); endif; - - // if ( !isset($recipe_query['cp_recipe_cooking_method']) ): - // $recipe_query['cp_recipe_cooking_method'] = ( isset($_GET['cp_recipe_cooking_method']) && $_GET['cp_recipe_cooking_method'] ? intval($_GET['cp_recipe_cooking_method']) : ( isset($_cooked_settings['browse_default_cp_recipe_cooking_method']) && $_cooked_settings['browse_default_cp_recipe_cooking_method'] ? $_cooked_settings['browse_default_cp_recipe_cooking_method'] : false ) ); - // endif; - - // if ( !isset($recipe_query['cp_recipe_cuisine']) ): - // $recipe_query['cp_recipe_cuisine'] = ( isset($_GET['cp_recipe_cuisine']) && $_GET['cp_recipe_cuisine'] ? intval($_GET['cp_recipe_cuisine']) : ( isset($_cooked_settings['browse_default_cp_recipe_cuisine']) && $_cooked_settings['browse_default_cp_recipe_cuisine'] ? $_cooked_settings['browse_default_cp_recipe_cuisine'] : false ) ); - // endif; - - // if ( !isset($recipe_query['cp_recipe_tags']) ): - // $recipe_query['cp_recipe_tags'] = ( isset($_GET['cp_recipe_tags']) && $_GET['cp_recipe_tags'] ? intval($_GET['cp_recipe_tags']) : ( isset($_cooked_settings['browse_default_cp_recipe_tags']) && $_cooked_settings['browse_default_cp_recipe_tags'] ? $_cooked_settings['browse_default_cp_recipe_tags'] : false ) ); - // endif; - - // if ( !isset($recipe_query['cp_recipe_diet']) ): - // $recipe_query['cp_recipe_diet'] = ( isset($_GET['cp_recipe_diet']) && $_GET['cp_recipe_diet'] ? intval($_GET['cp_recipe_diet']) : ( isset($_cooked_settings['browse_default_cp_recipe_diet']) && $_cooked_settings['browse_default_cp_recipe_diet'] ? $_cooked_settings['browse_default_cp_recipe_diet'] : false ) ); - // endif; } public static function cooked_pre_get_posts( $q ) { From ffce5296cfed11167f06c92b5d4a8edf46abf8b8 Mon Sep 17 00:00:00 2001 From: Armand Tresova Date: Thu, 26 Dec 2024 15:02:59 -0500 Subject: [PATCH 13/17] Release v1.9.0 Prep Release notes, language files and cleanup. --- includes/class.cooked-recipes.php | 11 ---- includes/class.cooked-shortcodes.php | 2 +- languages/cooked.po | 92 +++++++++++++-------------- languages/cooked.pot | 94 ++++++++++++++-------------- package-lock.json | 14 ++--- readme.txt | 1 + 6 files changed, 102 insertions(+), 112 deletions(-) diff --git a/includes/class.cooked-recipes.php b/includes/class.cooked-recipes.php index ffe6c8e..16ae9d4 100644 --- a/includes/class.cooked-recipes.php +++ b/includes/class.cooked-recipes.php @@ -1011,17 +1011,6 @@ public static function recipe_search_box( $options = false ) { $taxonomy_search_fields = false; endif; - // @TODO: This only works if there is no taxonomy query or permalink structure meaning that it only work - // when the permalink structure is the default one and no taxonomy filters are selected. - // Need to find a better way to handle this so it works in all cases. - // if ( !isset( $recipe_args['tax_query'] ) || !get_option('permalink_structure') ) { - // $page_id = $_cooked_settings['browse_page'] ? $_cooked_settings['browse_page'] : get_the_ID(); - // $form_redirect = get_permalink($page_id); - // } else { - // $form_redirect = ''; - // $page_id = false; - // } - $page_id = $_cooked_settings['browse_page'] ? $_cooked_settings['browse_page'] : get_the_ID(); $form_redirect = get_permalink($page_id); diff --git a/includes/class.cooked-shortcodes.php b/includes/class.cooked-shortcodes.php index fa621d9..564dfa8 100644 --- a/includes/class.cooked-shortcodes.php +++ b/includes/class.cooked-shortcodes.php @@ -546,7 +546,7 @@ public function cooked_info_shortcode($atts, $content = null) { add_filter('wp_kses_allowed_html', [$this, 'cooked_kses_servings_switcher']); add_filter('wp_kses_allowed_html', [$this, 'cooked_kses_cooked_donut']); return '
' . wp_kses_post( $cooked_info_html ) . '
'; - //return '
' . $cooked_info_html . '
'; // @todo Fix this + //return '
' . $cooked_info_html . '
'; // @TODO: Fix this endif; } diff --git a/languages/cooked.po b/languages/cooked.po index 33fe8e0..eac76b0 100644 --- a/languages/cooked.po +++ b/languages/cooked.po @@ -96,15 +96,15 @@ msgstr "" #: includes/class.cooked-admin-menus.php:34 #: includes/class.cooked-admin-menus.php:57 -#: includes/class.cooked-post-types.php:457 -#: includes/class.cooked-post-types.php:469 +#: includes/class.cooked-post-types.php:441 +#: includes/class.cooked-post-types.php:453 #: includes/class.cooked-users.php:125 msgid "Recipes" msgstr "" #: includes/class.cooked-admin-menus.php:35 #: includes/class.cooked-admin-menus.php:59 -#: includes/class.cooked-post-types.php:459 +#: includes/class.cooked-post-types.php:443 msgid "Add New" msgstr "" @@ -131,7 +131,7 @@ msgid "Upgrade to Pro" msgstr "" #: includes/class.cooked-admin-menus.php:58 -#: includes/class.cooked-post-types.php:464 +#: includes/class.cooked-post-types.php:448 msgid "All Recipes" msgstr "" @@ -147,7 +147,7 @@ msgstr "" #: includes/class.cooked-recipe-meta.php:135 #: includes/class.cooked-recipe-meta.php:221 #: includes/class.cooked-recipe-meta.php:962 -#: includes/class.cooked-recipes.php:639 +#: includes/class.cooked-recipes.php:619 #: templates/front/recipe.php:34 msgid "Ingredients" msgstr "" @@ -157,7 +157,7 @@ msgstr "" #: includes/class.cooked-recipe-meta.php:135 #: includes/class.cooked-recipe-meta.php:227 #: includes/class.cooked-recipe-meta.php:993 -#: includes/class.cooked-recipes.php:643 +#: includes/class.cooked-recipes.php:623 #: templates/front/recipe.php:35 msgid "Directions" msgstr "" @@ -205,7 +205,7 @@ msgstr "" #: includes/class.cooked-functions.php:129 #: includes/class.cooked-recipe-meta.php:1177 -#: includes/class.cooked-recipes.php:646 +#: includes/class.cooked-recipes.php:626 #: includes/class.cooked-settings.php:171 #: includes/class.cooked-shortcodes.php:744 msgid "Notes" @@ -835,47 +835,47 @@ msgstr "" msgid "Photo" msgstr "" -#: includes/class.cooked-post-types.php:439 +#: includes/class.cooked-post-types.php:423 msgid "Recipe Archive" msgstr "" -#: includes/class.cooked-post-types.php:458 +#: includes/class.cooked-post-types.php:442 msgid "Recipe" msgstr "" -#: includes/class.cooked-post-types.php:460 +#: includes/class.cooked-post-types.php:444 msgid "Add New Recipe" msgstr "" -#: includes/class.cooked-post-types.php:461 +#: includes/class.cooked-post-types.php:445 msgid "New Recipe" msgstr "" -#: includes/class.cooked-post-types.php:462 +#: includes/class.cooked-post-types.php:446 msgid "Edit Recipe" msgstr "" -#: includes/class.cooked-post-types.php:463 +#: includes/class.cooked-post-types.php:447 msgid "View Recipe" msgstr "" -#: includes/class.cooked-post-types.php:465 +#: includes/class.cooked-post-types.php:449 msgid "Search Recipes" msgstr "" -#: includes/class.cooked-post-types.php:466 +#: includes/class.cooked-post-types.php:450 msgid "No recipes found." msgstr "" -#: includes/class.cooked-post-types.php:467 +#: includes/class.cooked-post-types.php:451 msgid "No recipes found in trash." msgstr "" -#: includes/class.cooked-post-types.php:495 +#: includes/class.cooked-post-types.php:479 msgid "Recipe title ..." msgstr "" -#: includes/class.cooked-post-types.php:513 +#: includes/class.cooked-post-types.php:497 msgid "Cooked Browse Recipes Page" msgstr "" @@ -1320,134 +1320,134 @@ msgstr "" #. translators: stating the recipe author with a "By" in front of it. (ex: "By John Smith") #. translators: referring to the author (ex: By John Smith) -#: includes/class.cooked-recipes.php:278 -#: includes/class.cooked-recipes.php:332 +#: includes/class.cooked-recipes.php:258 +#: includes/class.cooked-recipes.php:312 #: templates/front/recipe-single.php:47 msgid "By %s" msgstr "" #. translators: For showing "All" of a taxonomy (ex: "All Burgers") -#: includes/class.cooked-recipes.php:394 +#: includes/class.cooked-recipes.php:374 msgid "All %s" msgstr "" -#: includes/class.cooked-recipes.php:654 +#: includes/class.cooked-recipes.php:634 msgid "Beginner" msgstr "" -#: includes/class.cooked-recipes.php:655 +#: includes/class.cooked-recipes.php:635 msgid "Intermediate" msgstr "" -#: includes/class.cooked-recipes.php:656 +#: includes/class.cooked-recipes.php:636 msgid "Advanced" msgstr "" -#: includes/class.cooked-recipes.php:682 +#: includes/class.cooked-recipes.php:662 msgid "Cooked Gallery" msgstr "" -#: includes/class.cooked-recipes.php:686 +#: includes/class.cooked-recipes.php:666 msgid "Envira Gallery" msgstr "" -#: includes/class.cooked-recipes.php:690 +#: includes/class.cooked-recipes.php:670 msgid "Soliloquy Slider" msgstr "" -#: includes/class.cooked-recipes.php:694 +#: includes/class.cooked-recipes.php:674 msgid "Slider Revolution" msgstr "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:769 +#: includes/class.cooked-recipes.php:749 msgid "Quarter (%s Serving)" msgid_plural "Quarter (%s Servings)" msgstr[0] "" msgstr[1] "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:772 +#: includes/class.cooked-recipes.php:752 msgid "Half (%s Serving)" msgid_plural "Half (%s Servings)" msgstr[0] "" msgstr[1] "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:775 +#: includes/class.cooked-recipes.php:755 msgid "Default (%s Serving)" msgid_plural "Default (%s Servings)" msgstr[0] "" msgstr[1] "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:778 +#: includes/class.cooked-recipes.php:758 msgid "Double (%s Servings)" msgstr "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:781 +#: includes/class.cooked-recipes.php:761 msgid "Triple (%s Servings)" msgstr "" -#: includes/class.cooked-recipes.php:795 +#: includes/class.cooked-recipes.php:775 #: includes/class.cooked-shortcodes.php:432 msgid "Yields" msgstr "" #. translators: singular and plural "serving" sizes -#: includes/class.cooked-recipes.php:799 -#: includes/class.cooked-recipes.php:809 +#: includes/class.cooked-recipes.php:779 +#: includes/class.cooked-recipes.php:789 msgid "%s Serving" msgid_plural "%s Servings" msgstr[0] "" msgstr[1] "" #. translators: singular and plural "steps" -#: includes/class.cooked-recipes.php:909 +#: includes/class.cooked-recipes.php:889 #: includes/class.cooked-seo.php:88 msgid "Step %d" msgstr "" -#: includes/class.cooked-recipes.php:964 +#: includes/class.cooked-recipes.php:944 msgid "Browse" msgstr "" -#: includes/class.cooked-recipes.php:981 +#: includes/class.cooked-recipes.php:961 #: includes/class.cooked-settings.php:108 msgid "No categories" msgstr "" -#: includes/class.cooked-recipes.php:984 +#: includes/class.cooked-recipes.php:964 #: includes/class.cooked-settings.php:155 #: includes/class.cooked-taxonomies.php:38 #: includes/class.cooked-taxonomies.php:48 msgid "Categories" msgstr "" -#: includes/class.cooked-recipes.php:986 +#: includes/class.cooked-recipes.php:966 #: includes/class.cooked-taxonomies.php:41 #: includes/widgets/recipe-categories.php:48 msgid "All Categories" msgstr "" -#: includes/class.cooked-recipes.php:1065 +#: includes/class.cooked-recipes.php:1034 msgid "Find a recipe..." msgstr "" -#: includes/class.cooked-recipes.php:1080 +#: includes/class.cooked-recipes.php:1049 msgid "Newest first" msgstr "" -#: includes/class.cooked-recipes.php:1084 +#: includes/class.cooked-recipes.php:1053 msgid "Oldest first" msgstr "" -#: includes/class.cooked-recipes.php:1088 +#: includes/class.cooked-recipes.php:1057 msgid "Alphabetical (A-Z)" msgstr "" -#: includes/class.cooked-recipes.php:1092 +#: includes/class.cooked-recipes.php:1061 msgid "Alphabetical (Z-A)" msgstr "" diff --git a/languages/cooked.pot b/languages/cooked.pot index fffdd87..218bb34 100644 --- a/languages/cooked.pot +++ b/languages/cooked.pot @@ -9,7 +9,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-12-24T19:44:53-05:00\n" +"POT-Creation-Date: 2024-12-26T15:00:44-05:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.11.0\n" "X-Domain: cooked\n" @@ -99,15 +99,15 @@ msgstr "" #: includes/class.cooked-admin-menus.php:34 #: includes/class.cooked-admin-menus.php:57 -#: includes/class.cooked-post-types.php:457 -#: includes/class.cooked-post-types.php:469 +#: includes/class.cooked-post-types.php:441 +#: includes/class.cooked-post-types.php:453 #: includes/class.cooked-users.php:125 msgid "Recipes" msgstr "" #: includes/class.cooked-admin-menus.php:35 #: includes/class.cooked-admin-menus.php:59 -#: includes/class.cooked-post-types.php:459 +#: includes/class.cooked-post-types.php:443 msgid "Add New" msgstr "" @@ -134,7 +134,7 @@ msgid "Upgrade to Pro" msgstr "" #: includes/class.cooked-admin-menus.php:58 -#: includes/class.cooked-post-types.php:464 +#: includes/class.cooked-post-types.php:448 msgid "All Recipes" msgstr "" @@ -150,7 +150,7 @@ msgstr "" #: includes/class.cooked-recipe-meta.php:135 #: includes/class.cooked-recipe-meta.php:221 #: includes/class.cooked-recipe-meta.php:962 -#: includes/class.cooked-recipes.php:639 +#: includes/class.cooked-recipes.php:619 #: templates/front/recipe.php:34 msgid "Ingredients" msgstr "" @@ -160,7 +160,7 @@ msgstr "" #: includes/class.cooked-recipe-meta.php:135 #: includes/class.cooked-recipe-meta.php:227 #: includes/class.cooked-recipe-meta.php:993 -#: includes/class.cooked-recipes.php:643 +#: includes/class.cooked-recipes.php:623 #: templates/front/recipe.php:35 msgid "Directions" msgstr "" @@ -208,7 +208,7 @@ msgstr "" #: includes/class.cooked-functions.php:129 #: includes/class.cooked-recipe-meta.php:1177 -#: includes/class.cooked-recipes.php:646 +#: includes/class.cooked-recipes.php:626 #: includes/class.cooked-settings.php:171 #: includes/class.cooked-shortcodes.php:744 msgid "Notes" @@ -838,47 +838,47 @@ msgstr "" msgid "Photo" msgstr "" -#: includes/class.cooked-post-types.php:439 +#: includes/class.cooked-post-types.php:423 msgid "Recipe Archive" msgstr "" -#: includes/class.cooked-post-types.php:458 +#: includes/class.cooked-post-types.php:442 msgid "Recipe" msgstr "" -#: includes/class.cooked-post-types.php:460 +#: includes/class.cooked-post-types.php:444 msgid "Add New Recipe" msgstr "" -#: includes/class.cooked-post-types.php:461 +#: includes/class.cooked-post-types.php:445 msgid "New Recipe" msgstr "" -#: includes/class.cooked-post-types.php:462 +#: includes/class.cooked-post-types.php:446 msgid "Edit Recipe" msgstr "" -#: includes/class.cooked-post-types.php:463 +#: includes/class.cooked-post-types.php:447 msgid "View Recipe" msgstr "" -#: includes/class.cooked-post-types.php:465 +#: includes/class.cooked-post-types.php:449 msgid "Search Recipes" msgstr "" -#: includes/class.cooked-post-types.php:466 +#: includes/class.cooked-post-types.php:450 msgid "No recipes found." msgstr "" -#: includes/class.cooked-post-types.php:467 +#: includes/class.cooked-post-types.php:451 msgid "No recipes found in trash." msgstr "" -#: includes/class.cooked-post-types.php:495 +#: includes/class.cooked-post-types.php:479 msgid "Recipe title ..." msgstr "" -#: includes/class.cooked-post-types.php:513 +#: includes/class.cooked-post-types.php:497 msgid "Cooked Browse Recipes Page" msgstr "" @@ -1323,134 +1323,134 @@ msgstr "" #. translators: stating the recipe author with a "By" in front of it. (ex: "By John Smith") #. translators: referring to the author (ex: By John Smith) -#: includes/class.cooked-recipes.php:278 -#: includes/class.cooked-recipes.php:332 +#: includes/class.cooked-recipes.php:258 +#: includes/class.cooked-recipes.php:312 #: templates/front/recipe-single.php:47 msgid "By %s" msgstr "" #. translators: For showing "All" of a taxonomy (ex: "All Burgers") -#: includes/class.cooked-recipes.php:394 +#: includes/class.cooked-recipes.php:374 msgid "All %s" msgstr "" -#: includes/class.cooked-recipes.php:654 +#: includes/class.cooked-recipes.php:634 msgid "Beginner" msgstr "" -#: includes/class.cooked-recipes.php:655 +#: includes/class.cooked-recipes.php:635 msgid "Intermediate" msgstr "" -#: includes/class.cooked-recipes.php:656 +#: includes/class.cooked-recipes.php:636 msgid "Advanced" msgstr "" -#: includes/class.cooked-recipes.php:682 +#: includes/class.cooked-recipes.php:662 msgid "Cooked Gallery" msgstr "" -#: includes/class.cooked-recipes.php:686 +#: includes/class.cooked-recipes.php:666 msgid "Envira Gallery" msgstr "" -#: includes/class.cooked-recipes.php:690 +#: includes/class.cooked-recipes.php:670 msgid "Soliloquy Slider" msgstr "" -#: includes/class.cooked-recipes.php:694 +#: includes/class.cooked-recipes.php:674 msgid "Slider Revolution" msgstr "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:769 +#: includes/class.cooked-recipes.php:749 msgid "Quarter (%s Serving)" msgid_plural "Quarter (%s Servings)" msgstr[0] "" msgstr[1] "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:772 +#: includes/class.cooked-recipes.php:752 msgid "Half (%s Serving)" msgid_plural "Half (%s Servings)" msgstr[0] "" msgstr[1] "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:775 +#: includes/class.cooked-recipes.php:755 msgid "Default (%s Serving)" msgid_plural "Default (%s Servings)" msgstr[0] "" msgstr[1] "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:778 +#: includes/class.cooked-recipes.php:758 msgid "Double (%s Servings)" msgstr "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:781 +#: includes/class.cooked-recipes.php:761 msgid "Triple (%s Servings)" msgstr "" -#: includes/class.cooked-recipes.php:795 +#: includes/class.cooked-recipes.php:775 #: includes/class.cooked-shortcodes.php:432 msgid "Yields" msgstr "" #. translators: singular and plural "serving" sizes -#: includes/class.cooked-recipes.php:799 -#: includes/class.cooked-recipes.php:809 +#: includes/class.cooked-recipes.php:779 +#: includes/class.cooked-recipes.php:789 msgid "%s Serving" msgid_plural "%s Servings" msgstr[0] "" msgstr[1] "" #. translators: singular and plural "steps" -#: includes/class.cooked-recipes.php:909 +#: includes/class.cooked-recipes.php:889 #: includes/class.cooked-seo.php:88 msgid "Step %d" msgstr "" -#: includes/class.cooked-recipes.php:964 +#: includes/class.cooked-recipes.php:944 msgid "Browse" msgstr "" -#: includes/class.cooked-recipes.php:981 +#: includes/class.cooked-recipes.php:961 #: includes/class.cooked-settings.php:108 msgid "No categories" msgstr "" -#: includes/class.cooked-recipes.php:984 +#: includes/class.cooked-recipes.php:964 #: includes/class.cooked-settings.php:155 #: includes/class.cooked-taxonomies.php:38 #: includes/class.cooked-taxonomies.php:48 msgid "Categories" msgstr "" -#: includes/class.cooked-recipes.php:986 +#: includes/class.cooked-recipes.php:966 #: includes/class.cooked-taxonomies.php:41 #: includes/widgets/recipe-categories.php:48 msgid "All Categories" msgstr "" -#: includes/class.cooked-recipes.php:1065 +#: includes/class.cooked-recipes.php:1034 msgid "Find a recipe..." msgstr "" -#: includes/class.cooked-recipes.php:1080 +#: includes/class.cooked-recipes.php:1049 msgid "Newest first" msgstr "" -#: includes/class.cooked-recipes.php:1084 +#: includes/class.cooked-recipes.php:1053 msgid "Oldest first" msgstr "" -#: includes/class.cooked-recipes.php:1088 +#: includes/class.cooked-recipes.php:1057 msgid "Alphabetical (A-Z)" msgstr "" -#: includes/class.cooked-recipes.php:1092 +#: includes/class.cooked-recipes.php:1061 msgid "Alphabetical (Z-A)" msgstr "" diff --git a/package-lock.json b/package-lock.json index 6ec3bcd..d78942b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4199,20 +4199,20 @@ } }, "node_modules/tldts-core": { - "version": "6.1.69", - "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.69.tgz", - "integrity": "sha512-nygxy9n2PBUFQUtAXAc122gGo+04/j5qr5TGQFZTHafTKYvmARVXt2cA5rgero2/dnXUfkdPtiJoKmrd3T+wdA==", + "version": "6.1.70", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.70.tgz", + "integrity": "sha512-RNnIXDB1FD4T9cpQRErEqw6ZpjLlGdMOitdV+0xtbsnwr4YFka1zpc7D4KD+aAn8oSG5JyFrdasZTE04qDE9Yg==", "dev": true, "license": "MIT" }, "node_modules/tldts-icann": { - "version": "6.1.69", - "resolved": "https://registry.npmjs.org/tldts-icann/-/tldts-icann-6.1.69.tgz", - "integrity": "sha512-H3c/jgvuv8ghdMNJ0rMVECknl1B7qz+BZsFBd4n7l6J2CRnJx8foZ2Qrd32ZY2dqcMgER7KIQ52u1zTejSISAg==", + "version": "6.1.70", + "resolved": "https://registry.npmjs.org/tldts-icann/-/tldts-icann-6.1.70.tgz", + "integrity": "sha512-sGnxNnxb/03iSROBEBiXGX49DMEktxWVUoTeHWekJOOrFfNRWfyAcOWphuRDau2jZrshvMhQPf3azYHyxV04/w==", "dev": true, "license": "MIT", "dependencies": { - "tldts-core": "^6.1.69" + "tldts-core": "^6.1.70" } }, "node_modules/to-regex-range": { diff --git a/readme.txt b/readme.txt index 00e1189..e0b90c9 100644 --- a/readme.txt +++ b/readme.txt @@ -86,6 +86,7 @@ Version 1.8.10 includes improvements to translation handling and a fix for incor * **NEW:** Added pretty URL's to the Browse Recipe page when searching and filtering recipes. * **FIX:** Fixed issue with the recipe search when filters are applied. * **FIX:** Fixed a couple of PHP v8.3 compatibility issues. +* **FIX:** Fixed issue with Divi Theme Builder shortcodes not loading. = 1.8.9 = * **NEW:** Improved SEO by dynamically updating the canonical URL on the Browse Recipe page to match active category/tag filters. Supports Rank Math SEO and Yoast SEO. From b8d481ecd924697ed0347b548f24eb63e5b686ea Mon Sep 17 00:00:00 2001 From: Armand Tresova Date: Thu, 26 Dec 2024 15:04:07 -0500 Subject: [PATCH 14/17] Fixed get_avatar and get_avatar_url call The parameters were incorrect. The value (700) was derived from cooked-square image type specs. --- includes/class.cooked-users.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/class.cooked-users.php b/includes/class.cooked-users.php index 58aac09..d3c434e 100644 --- a/includes/class.cooked-users.php +++ b/includes/class.cooked-users.php @@ -54,8 +54,8 @@ public static function get( $user_id, $basic = false ) { $profile_photo_src = wp_get_attachment_image_src( $_user_meta['profile_photo_id'], 'cooked-square' ); $profile_photo_src = ( isset($profile_photo_src[0]) && $profile_photo_src[0] ? $profile_photo_src[0] : false ); } else { - $profile_photo = get_avatar( $_user->user_email, 'cooked-square'); - $profile_photo_src = get_avatar_url( $_user->user_email, 'cooked-square'); // @TODO fix this + $profile_photo = get_avatar( $_user->user_email, 700); + $profile_photo_src = get_avatar_url( $_user->user_email, ['size' => 700]); } if ( is_array($_user_meta) ) { From 87d1f68f0447d4711fb5e93e9781d1d07c874bc9 Mon Sep 17 00:00:00 2001 From: Armand Tresova Date: Fri, 27 Dec 2024 18:44:44 -0500 Subject: [PATCH 15/17] Bug fix when initially creating a recipe --- includes/class.cooked-recipe-meta.php | 54 +++++++++------------------ 1 file changed, 18 insertions(+), 36 deletions(-) diff --git a/includes/class.cooked-recipe-meta.php b/includes/class.cooked-recipe-meta.php index 3bfb602..1507bd0 100644 --- a/includes/class.cooked-recipe-meta.php +++ b/includes/class.cooked-recipe-meta.php @@ -338,8 +338,7 @@ function cooked_render_recipe_fields( $post_id ) { 'editor_height' => 400, 'textarea_name' => '_recipe_settings[content]', 'quicktags' => true - ] - ); + ]); ?>
@@ -416,8 +415,7 @@ function cooked_render_recipe_fields( $post_id ) { 'editor_height' => 100, 'textarea_name' => '_recipe_settings[notes]', 'quicktags' => true - ] - ); + ]); ?> @@ -495,7 +493,7 @@ function cooked_render_recipe_fields( $post_id ) { + $random_key = wp_rand( 1000000, 9999999 ); ?>
@@ -512,7 +510,7 @@ function cooked_render_recipe_fields( $post_id ) {
@@ -619,22 +617,7 @@ function cooked_render_recipe_fields( $post_id ) {
- - - 'cooked-wysiwyg-editor', - 'teeny' => true, - 'media_buttons' => false, - 'wpautop' => false, - 'editor_height' => 100, - 'textarea_name' => '_recipe_settings[directions][' . esc_attr($dir_key) . '][content]', - 'quicktags' => true - ]); - ?> - - - +
@@ -660,27 +643,26 @@ function cooked_render_recipe_fields( $post_id ) {
- - - + + +
- +
'cooked-wysiwyg-editor', - 'teeny' => true, - 'media_buttons' => false, - 'wpautop' => false, - 'editor_height' => 100, - 'textarea_name' => '_recipe_settings[directions][' . $random_key . '][content]', - 'quicktags' => true - ]); + wp_editor('', 'direction-' . $random_key . '-content', [ + 'teeny' => true, + 'media_buttons' => false, + 'wpautop' => false, + 'editor_height' => 100, + 'textarea_name' => '_recipe_settings[directions][' . $random_key . '][content]', + 'quicktags' => true + ]); ?> - +
From dd7d7210ef8b6f12c4eddcc7f8d1160c49cd89c1 Mon Sep 17 00:00:00 2001 From: Armand Tresova Date: Sun, 29 Dec 2024 16:39:18 -0500 Subject: [PATCH 16/17] Settings UI Improvements --- includes/class.cooked-settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class.cooked-settings.php b/includes/class.cooked-settings.php index 72be13a..b02be2b 100644 --- a/includes/class.cooked-settings.php +++ b/includes/class.cooked-settings.php @@ -131,7 +131,7 @@ public static function tabs_fields() { 'browse_page' => [ 'title' => __('Browse/Search Recipes Page', 'cooked'), /* translators: a description on how to add the [cooked-browse] shortcode to a page */ - 'desc' => sprintf(__('Create a page with the %s shortcode on it, then choose it from this dropdown.', 'cooked'), '[cooked-browse]'), + 'desc' => sprintf(__('Create a page with the %s shortcode on it, then choose it from this dropdown.', 'cooked'), '[cooked-browse]'), 'type' => 'select', 'default' => 0, 'options' => $pages_array From d38bbeb98ae6b58316513a5f252889ca64914559 Mon Sep 17 00:00:00 2001 From: Armand Tresova Date: Sun, 29 Dec 2024 16:40:57 -0500 Subject: [PATCH 17/17] Language Files Update --- languages/cooked.po | 168 +++++++++++++++++++++--------------------- languages/cooked.pot | 170 +++++++++++++++++++++---------------------- 2 files changed, 169 insertions(+), 169 deletions(-) diff --git a/languages/cooked.po b/languages/cooked.po index eac76b0..628dd14 100644 --- a/languages/cooked.po +++ b/languages/cooked.po @@ -43,7 +43,7 @@ msgstr "" #: includes/class.cooked-admin-enqueues.php:138 #: includes/class.cooked-recipe-meta.php:614 #: includes/class.cooked-recipe-meta.php:647 -#: includes/class.cooked-recipe-meta.php:674 +#: includes/class.cooked-recipe-meta.php:687 msgid "Add Image" msgstr "" @@ -57,7 +57,7 @@ msgid "Use this Image" msgstr "" #: includes/class.cooked-admin-enqueues.php:141 -#: includes/class.cooked-recipe-meta.php:884 +#: includes/class.cooked-recipe-meta.php:897 msgid "Add to Gallery" msgstr "" @@ -146,7 +146,7 @@ msgstr "" #: includes/class.cooked-functions.php:127 #: includes/class.cooked-recipe-meta.php:135 #: includes/class.cooked-recipe-meta.php:221 -#: includes/class.cooked-recipe-meta.php:962 +#: includes/class.cooked-recipe-meta.php:975 #: includes/class.cooked-recipes.php:619 #: templates/front/recipe.php:34 msgid "Ingredients" @@ -156,7 +156,7 @@ msgstr "" #: includes/class.cooked-functions.php:128 #: includes/class.cooked-recipe-meta.php:135 #: includes/class.cooked-recipe-meta.php:227 -#: includes/class.cooked-recipe-meta.php:993 +#: includes/class.cooked-recipe-meta.php:1006 #: includes/class.cooked-recipes.php:623 #: templates/front/recipe.php:35 msgid "Directions" @@ -168,7 +168,7 @@ msgid "Error importing recipe." msgstr "" #: includes/class.cooked-enqueues.php:35 -#: includes/class.cooked-recipe-meta.php:1208 +#: includes/class.cooked-recipe-meta.php:1221 msgid "Timer" msgstr "" @@ -194,7 +194,7 @@ msgid "Information" msgstr "" #: includes/class.cooked-functions.php:125 -#: includes/class.cooked-recipe-meta.php:1153 +#: includes/class.cooked-recipe-meta.php:1166 #: includes/class.cooked-settings.php:170 msgid "Excerpt" msgstr "" @@ -204,7 +204,7 @@ msgid "Images" msgstr "" #: includes/class.cooked-functions.php:129 -#: includes/class.cooked-recipe-meta.php:1177 +#: includes/class.cooked-recipe-meta.php:1190 #: includes/class.cooked-recipes.php:626 #: includes/class.cooked-settings.php:171 #: includes/class.cooked-shortcodes.php:744 @@ -901,7 +901,7 @@ msgid "Layout" msgstr "" #: includes/class.cooked-recipe-meta.php:239 -#: includes/class.cooked-recipe-meta.php:1074 +#: includes/class.cooked-recipe-meta.php:1087 msgid "Gallery" msgstr "" @@ -976,7 +976,7 @@ msgid "Difficulty Level" msgstr "" #: includes/class.cooked-recipe-meta.php:389 -#: includes/class.cooked-recipe-meta.php:936 +#: includes/class.cooked-recipe-meta.php:949 #: includes/class.cooked-settings.php:172 #: includes/class.cooked-shortcodes.php:433 #: includes/class.cooked-shortcodes.php:641 @@ -990,7 +990,7 @@ msgid "minutes" msgstr "" #: includes/class.cooked-recipe-meta.php:394 -#: includes/class.cooked-recipe-meta.php:937 +#: includes/class.cooked-recipe-meta.php:950 #: includes/class.cooked-settings.php:173 #: includes/class.cooked-shortcodes.php:434 #: includes/class.cooked-shortcodes.php:650 @@ -998,7 +998,7 @@ msgid "Cook Time" msgstr "" #: includes/class.cooked-recipe-meta.php:399 -#: includes/class.cooked-recipe-meta.php:938 +#: includes/class.cooked-recipe-meta.php:951 #: includes/class.cooked-settings.php:174 #: includes/class.cooked-shortcodes.php:435 #: includes/class.cooked-shortcodes.php:661 @@ -1035,7 +1035,7 @@ msgstr "" #: includes/class.cooked-recipe-meta.php:485 #: includes/class.cooked-recipe-meta.php:580 #: includes/class.cooked-recipe-meta.php:630 -#: includes/class.cooked-recipe-meta.php:687 +#: includes/class.cooked-recipe-meta.php:700 msgid "Section Heading" msgstr "" @@ -1044,118 +1044,118 @@ msgid "Add Ingredient" msgstr "" #: includes/class.cooked-recipe-meta.php:540 -#: includes/class.cooked-recipe-meta.php:666 +#: includes/class.cooked-recipe-meta.php:679 msgid "Add Section Heading" msgstr "" -#: includes/class.cooked-recipe-meta.php:665 +#: includes/class.cooked-recipe-meta.php:678 msgid "Add Direction" msgstr "" -#: includes/class.cooked-recipe-meta.php:700 +#: includes/class.cooked-recipe-meta.php:713 msgid "Nutrition Information" msgstr "" -#: includes/class.cooked-recipe-meta.php:738 +#: includes/class.cooked-recipe-meta.php:751 #: includes/class.cooked-shortcodes.php:1029 msgid "Nutrition Facts" msgstr "" -#: includes/class.cooked-recipe-meta.php:756 +#: includes/class.cooked-recipe-meta.php:769 #: includes/class.cooked-shortcodes.php:997 msgid "Amount per serving" msgstr "" -#: includes/class.cooked-recipe-meta.php:766 +#: includes/class.cooked-recipe-meta.php:779 #: includes/class.cooked-shortcodes.php:1007 msgid "% Daily Value *" msgstr "" -#: includes/class.cooked-recipe-meta.php:785 +#: includes/class.cooked-recipe-meta.php:798 #: includes/class.cooked-shortcodes.php:939 msgid "Includes" msgstr "" -#: includes/class.cooked-recipe-meta.php:817 +#: includes/class.cooked-recipe-meta.php:830 #: includes/class.cooked-shortcodes.php:1033 msgid "The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice." msgstr "" -#: includes/class.cooked-recipe-meta.php:833 +#: includes/class.cooked-recipe-meta.php:846 msgid "Recipe Gallery Type" msgstr "" -#: includes/class.cooked-recipe-meta.php:846 +#: includes/class.cooked-recipe-meta.php:859 msgid "Choose one..." msgstr "" #. translators: a title for the video section of the recipe editor, where users can paste a YouToub or Vimeo URL into the field below. -#: includes/class.cooked-recipe-meta.php:860 +#: includes/class.cooked-recipe-meta.php:873 msgid "%1$s or %2$s Video" msgstr "" #. translators: a message describing how to display a video from YouTube or Vimeo. -#: includes/class.cooked-recipe-meta.php:864 +#: includes/class.cooked-recipe-meta.php:877 msgid "If you would like to display a video as the first item in your gallery, you can paste a valid %1$s or %2$s URL below." msgstr "" -#: includes/class.cooked-recipe-meta.php:869 +#: includes/class.cooked-recipe-meta.php:882 msgid "Gallery Items" msgstr "" -#: includes/class.cooked-recipe-meta.php:900 +#: includes/class.cooked-recipe-meta.php:913 msgid "Recipe Information" msgstr "" -#: includes/class.cooked-recipe-meta.php:901 +#: includes/class.cooked-recipe-meta.php:914 msgid "This will display the recipe author, cooking times, etc." msgstr "" #. translators: "include and exclude" section title #. translators: "left and right" section title -#: includes/class.cooked-recipe-meta.php:910 -#: includes/class.cooked-recipe-meta.php:920 +#: includes/class.cooked-recipe-meta.php:923 +#: includes/class.cooked-recipe-meta.php:933 msgid "\"%1$s\" and \"%2$s\"" msgstr "" -#: includes/class.cooked-recipe-meta.php:912 +#: includes/class.cooked-recipe-meta.php:925 msgid "This will allow you to include or exclude content from the shortcode output." msgstr "" -#: includes/class.cooked-recipe-meta.php:921 +#: includes/class.cooked-recipe-meta.php:934 msgid "Used like \"include\", but will position the content to the left or right." msgstr "" -#: includes/class.cooked-recipe-meta.php:931 -#: includes/class.cooked-recipe-meta.php:977 -#: includes/class.cooked-recipe-meta.php:1008 -#: includes/class.cooked-recipe-meta.php:1033 -#: includes/class.cooked-recipe-meta.php:1057 -#: includes/class.cooked-recipe-meta.php:1117 -#: includes/class.cooked-recipe-meta.php:1162 -#: includes/class.cooked-recipe-meta.php:1192 -#: includes/class.cooked-recipe-meta.php:1237 +#: includes/class.cooked-recipe-meta.php:944 +#: includes/class.cooked-recipe-meta.php:990 +#: includes/class.cooked-recipe-meta.php:1021 +#: includes/class.cooked-recipe-meta.php:1046 +#: includes/class.cooked-recipe-meta.php:1070 +#: includes/class.cooked-recipe-meta.php:1130 +#: includes/class.cooked-recipe-meta.php:1175 +#: includes/class.cooked-recipe-meta.php:1205 +#: includes/class.cooked-recipe-meta.php:1250 msgid "Available Variables" msgstr "" -#: includes/class.cooked-recipe-meta.php:935 +#: includes/class.cooked-recipe-meta.php:948 #: includes/class.cooked-settings.php:167 #: includes/class.cooked-shortcodes.php:430 #: includes/class.cooked-shortcodes.php:595 msgid "Author" msgstr "" -#: includes/class.cooked-recipe-meta.php:939 +#: includes/class.cooked-recipe-meta.php:952 #: includes/class.cooked-shortcodes.php:431 #: includes/class.cooked-shortcodes.php:606 msgid "Difficulty" msgstr "" -#: includes/class.cooked-recipe-meta.php:940 +#: includes/class.cooked-recipe-meta.php:953 msgid "Servings Switcher" msgstr "" -#: includes/class.cooked-recipe-meta.php:941 +#: includes/class.cooked-recipe-meta.php:954 #: includes/class.cooked-settings.php:168 #: includes/class.cooked-shortcodes.php:688 #: includes/class.cooked-shortcodes.php:691 @@ -1163,158 +1163,158 @@ msgstr "" msgid "Category" msgstr "" -#: includes/class.cooked-recipe-meta.php:942 +#: includes/class.cooked-recipe-meta.php:955 msgid "Print Mode" msgstr "" -#: includes/class.cooked-recipe-meta.php:943 +#: includes/class.cooked-recipe-meta.php:956 msgid "Full-Screen Mode" msgstr "" -#: includes/class.cooked-recipe-meta.php:963 +#: includes/class.cooked-recipe-meta.php:976 msgid "This will display the list of ingredients, added via the \"Ingredients\" tab." msgstr "" -#: includes/class.cooked-recipe-meta.php:969 +#: includes/class.cooked-recipe-meta.php:982 msgid "This will allow you to hide or show the checkboxes:" msgstr "" -#: includes/class.cooked-recipe-meta.php:979 +#: includes/class.cooked-recipe-meta.php:992 msgid "Show checkboxes" msgstr "" -#: includes/class.cooked-recipe-meta.php:980 +#: includes/class.cooked-recipe-meta.php:993 msgid "Hide checkboxes" msgstr "" -#: includes/class.cooked-recipe-meta.php:994 +#: includes/class.cooked-recipe-meta.php:1007 msgid "This will display the list of directions, added via the \"Directions\" tab." msgstr "" -#: includes/class.cooked-recipe-meta.php:1000 +#: includes/class.cooked-recipe-meta.php:1013 msgid "This will allow you to hide or show the numbers:" msgstr "" -#: includes/class.cooked-recipe-meta.php:1010 +#: includes/class.cooked-recipe-meta.php:1023 msgid "Show numbers" msgstr "" -#: includes/class.cooked-recipe-meta.php:1011 +#: includes/class.cooked-recipe-meta.php:1024 msgid "Hide numbers" msgstr "" -#: includes/class.cooked-recipe-meta.php:1024 +#: includes/class.cooked-recipe-meta.php:1037 msgid "Featured Image" msgstr "" -#: includes/class.cooked-recipe-meta.php:1025 +#: includes/class.cooked-recipe-meta.php:1038 msgid "This will display the featured image, if one is set." msgstr "" -#: includes/class.cooked-recipe-meta.php:1035 -#: includes/class.cooked-recipe-meta.php:1059 -#: includes/class.cooked-recipe-meta.php:1164 +#: includes/class.cooked-recipe-meta.php:1048 +#: includes/class.cooked-recipe-meta.php:1072 +#: includes/class.cooked-recipe-meta.php:1177 msgid "None" msgstr "" -#: includes/class.cooked-recipe-meta.php:1048 +#: includes/class.cooked-recipe-meta.php:1061 msgid "Nutrition Label" msgstr "" -#: includes/class.cooked-recipe-meta.php:1049 +#: includes/class.cooked-recipe-meta.php:1062 msgid "This will display the Nutrition Facts label, if data is present." msgstr "" -#: includes/class.cooked-recipe-meta.php:1075 +#: includes/class.cooked-recipe-meta.php:1088 msgid "This will display the gallery, if one is set or created from the \"Gallery\" tab." msgstr "" -#: includes/class.cooked-recipe-meta.php:1083 +#: includes/class.cooked-recipe-meta.php:1096 msgid "Set the width of the gallery." msgstr "" -#: includes/class.cooked-recipe-meta.php:1090 +#: includes/class.cooked-recipe-meta.php:1103 msgid "Set the image size ratio." msgstr "" -#: includes/class.cooked-recipe-meta.php:1100 +#: includes/class.cooked-recipe-meta.php:1113 msgid "Set the navigation style." msgstr "" -#: includes/class.cooked-recipe-meta.php:1107 +#: includes/class.cooked-recipe-meta.php:1120 msgid "Enable or disable \"Full-Screen\" mode." msgstr "" #. translators: related to the width of slideshows: "80% or 300px" section title -#: includes/class.cooked-recipe-meta.php:1122 +#: includes/class.cooked-recipe-meta.php:1135 msgid "ex: \"%1$s\" or \"%2$s\"" msgstr "" #. translators: related to the image ratio for slideshows: "ex: 800/600" section title -#: includes/class.cooked-recipe-meta.php:1127 +#: includes/class.cooked-recipe-meta.php:1140 msgid "ex: \"%s\"" msgstr "" #. translators: related to the navigation style for slideshows: "dots, thumbs or false" section title -#: includes/class.cooked-recipe-meta.php:1132 +#: includes/class.cooked-recipe-meta.php:1145 msgid "\"%1$s\", \"%2$s\", or \"%3$s\"" msgstr "" #. translators: related to allowing full screen for slideshows: "true or false" section title -#: includes/class.cooked-recipe-meta.php:1137 +#: includes/class.cooked-recipe-meta.php:1150 msgid "\"%1$s\" or \"%2$s\"" msgstr "" -#: includes/class.cooked-recipe-meta.php:1154 +#: includes/class.cooked-recipe-meta.php:1167 msgid "This will display the excerpt, if one is available from the \"Layout & Content\" tab." msgstr "" -#: includes/class.cooked-recipe-meta.php:1178 +#: includes/class.cooked-recipe-meta.php:1191 msgid "This will display the notes, if one is available from the \"Layout & Content\" tab." msgstr "" -#: includes/class.cooked-recipe-meta.php:1184 +#: includes/class.cooked-recipe-meta.php:1197 msgid "This will allow you to hide or show the header for the notes section:" msgstr "" -#: includes/class.cooked-recipe-meta.php:1194 +#: includes/class.cooked-recipe-meta.php:1207 msgid "Show header" msgstr "" -#: includes/class.cooked-recipe-meta.php:1195 +#: includes/class.cooked-recipe-meta.php:1208 msgid "Hide header" msgstr "" -#: includes/class.cooked-recipe-meta.php:1209 +#: includes/class.cooked-recipe-meta.php:1222 msgid "This will display a special link to start a cooking timer." msgstr "" #. translators: "seconds, minutes and hours" section title -#: includes/class.cooked-recipe-meta.php:1218 +#: includes/class.cooked-recipe-meta.php:1231 msgid "\"%1$s\", \"%2$s\" and \"%3$s\"" msgstr "" -#: includes/class.cooked-recipe-meta.php:1220 +#: includes/class.cooked-recipe-meta.php:1233 msgid "Use just one or a combination of all three to set the timer length" msgstr "" -#: includes/class.cooked-recipe-meta.php:1227 +#: includes/class.cooked-recipe-meta.php:1240 msgid "Add a short description for this timer, if applicable." msgstr "" -#: includes/class.cooked-recipe-meta.php:1239 +#: includes/class.cooked-recipe-meta.php:1252 msgid "Time in seconds" msgstr "" -#: includes/class.cooked-recipe-meta.php:1240 +#: includes/class.cooked-recipe-meta.php:1253 msgid "Time in minutes" msgstr "" -#: includes/class.cooked-recipe-meta.php:1241 +#: includes/class.cooked-recipe-meta.php:1254 msgid "Time in hours" msgstr "" -#: includes/class.cooked-recipe-meta.php:1242 +#: includes/class.cooked-recipe-meta.php:1255 msgid "Timer Description" msgstr "" @@ -1808,7 +1808,7 @@ msgid "No Categories" msgstr "" #. translators: for displaying singular or plural versions depending on the number. -#: includes/class.cooked-taxonomies.php:135 +#: includes/class.cooked-taxonomies.php:136 msgid "%s Recipe" msgid_plural "%s Recipes" msgstr[0] "" diff --git a/languages/cooked.pot b/languages/cooked.pot index 218bb34..afae0a2 100644 --- a/languages/cooked.pot +++ b/languages/cooked.pot @@ -9,7 +9,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-12-26T15:00:44-05:00\n" +"POT-Creation-Date: 2024-12-29T16:40:11-05:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.11.0\n" "X-Domain: cooked\n" @@ -46,7 +46,7 @@ msgstr "" #: includes/class.cooked-admin-enqueues.php:138 #: includes/class.cooked-recipe-meta.php:614 #: includes/class.cooked-recipe-meta.php:647 -#: includes/class.cooked-recipe-meta.php:674 +#: includes/class.cooked-recipe-meta.php:687 msgid "Add Image" msgstr "" @@ -60,7 +60,7 @@ msgid "Use this Image" msgstr "" #: includes/class.cooked-admin-enqueues.php:141 -#: includes/class.cooked-recipe-meta.php:884 +#: includes/class.cooked-recipe-meta.php:897 msgid "Add to Gallery" msgstr "" @@ -149,7 +149,7 @@ msgstr "" #: includes/class.cooked-functions.php:127 #: includes/class.cooked-recipe-meta.php:135 #: includes/class.cooked-recipe-meta.php:221 -#: includes/class.cooked-recipe-meta.php:962 +#: includes/class.cooked-recipe-meta.php:975 #: includes/class.cooked-recipes.php:619 #: templates/front/recipe.php:34 msgid "Ingredients" @@ -159,7 +159,7 @@ msgstr "" #: includes/class.cooked-functions.php:128 #: includes/class.cooked-recipe-meta.php:135 #: includes/class.cooked-recipe-meta.php:227 -#: includes/class.cooked-recipe-meta.php:993 +#: includes/class.cooked-recipe-meta.php:1006 #: includes/class.cooked-recipes.php:623 #: templates/front/recipe.php:35 msgid "Directions" @@ -171,7 +171,7 @@ msgid "Error importing recipe." msgstr "" #: includes/class.cooked-enqueues.php:35 -#: includes/class.cooked-recipe-meta.php:1208 +#: includes/class.cooked-recipe-meta.php:1221 msgid "Timer" msgstr "" @@ -197,7 +197,7 @@ msgid "Information" msgstr "" #: includes/class.cooked-functions.php:125 -#: includes/class.cooked-recipe-meta.php:1153 +#: includes/class.cooked-recipe-meta.php:1166 #: includes/class.cooked-settings.php:170 msgid "Excerpt" msgstr "" @@ -207,7 +207,7 @@ msgid "Images" msgstr "" #: includes/class.cooked-functions.php:129 -#: includes/class.cooked-recipe-meta.php:1177 +#: includes/class.cooked-recipe-meta.php:1190 #: includes/class.cooked-recipes.php:626 #: includes/class.cooked-settings.php:171 #: includes/class.cooked-shortcodes.php:744 @@ -904,7 +904,7 @@ msgid "Layout" msgstr "" #: includes/class.cooked-recipe-meta.php:239 -#: includes/class.cooked-recipe-meta.php:1074 +#: includes/class.cooked-recipe-meta.php:1087 msgid "Gallery" msgstr "" @@ -979,7 +979,7 @@ msgid "Difficulty Level" msgstr "" #: includes/class.cooked-recipe-meta.php:389 -#: includes/class.cooked-recipe-meta.php:936 +#: includes/class.cooked-recipe-meta.php:949 #: includes/class.cooked-settings.php:172 #: includes/class.cooked-shortcodes.php:433 #: includes/class.cooked-shortcodes.php:641 @@ -993,7 +993,7 @@ msgid "minutes" msgstr "" #: includes/class.cooked-recipe-meta.php:394 -#: includes/class.cooked-recipe-meta.php:937 +#: includes/class.cooked-recipe-meta.php:950 #: includes/class.cooked-settings.php:173 #: includes/class.cooked-shortcodes.php:434 #: includes/class.cooked-shortcodes.php:650 @@ -1001,7 +1001,7 @@ msgid "Cook Time" msgstr "" #: includes/class.cooked-recipe-meta.php:399 -#: includes/class.cooked-recipe-meta.php:938 +#: includes/class.cooked-recipe-meta.php:951 #: includes/class.cooked-settings.php:174 #: includes/class.cooked-shortcodes.php:435 #: includes/class.cooked-shortcodes.php:661 @@ -1038,7 +1038,7 @@ msgstr "" #: includes/class.cooked-recipe-meta.php:485 #: includes/class.cooked-recipe-meta.php:580 #: includes/class.cooked-recipe-meta.php:630 -#: includes/class.cooked-recipe-meta.php:687 +#: includes/class.cooked-recipe-meta.php:700 msgid "Section Heading" msgstr "" @@ -1047,118 +1047,118 @@ msgid "Add Ingredient" msgstr "" #: includes/class.cooked-recipe-meta.php:540 -#: includes/class.cooked-recipe-meta.php:666 +#: includes/class.cooked-recipe-meta.php:679 msgid "Add Section Heading" msgstr "" -#: includes/class.cooked-recipe-meta.php:665 +#: includes/class.cooked-recipe-meta.php:678 msgid "Add Direction" msgstr "" -#: includes/class.cooked-recipe-meta.php:700 +#: includes/class.cooked-recipe-meta.php:713 msgid "Nutrition Information" msgstr "" -#: includes/class.cooked-recipe-meta.php:738 +#: includes/class.cooked-recipe-meta.php:751 #: includes/class.cooked-shortcodes.php:1029 msgid "Nutrition Facts" msgstr "" -#: includes/class.cooked-recipe-meta.php:756 +#: includes/class.cooked-recipe-meta.php:769 #: includes/class.cooked-shortcodes.php:997 msgid "Amount per serving" msgstr "" -#: includes/class.cooked-recipe-meta.php:766 +#: includes/class.cooked-recipe-meta.php:779 #: includes/class.cooked-shortcodes.php:1007 msgid "% Daily Value *" msgstr "" -#: includes/class.cooked-recipe-meta.php:785 +#: includes/class.cooked-recipe-meta.php:798 #: includes/class.cooked-shortcodes.php:939 msgid "Includes" msgstr "" -#: includes/class.cooked-recipe-meta.php:817 +#: includes/class.cooked-recipe-meta.php:830 #: includes/class.cooked-shortcodes.php:1033 msgid "The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice." msgstr "" -#: includes/class.cooked-recipe-meta.php:833 +#: includes/class.cooked-recipe-meta.php:846 msgid "Recipe Gallery Type" msgstr "" -#: includes/class.cooked-recipe-meta.php:846 +#: includes/class.cooked-recipe-meta.php:859 msgid "Choose one..." msgstr "" #. translators: a title for the video section of the recipe editor, where users can paste a YouToub or Vimeo URL into the field below. -#: includes/class.cooked-recipe-meta.php:860 +#: includes/class.cooked-recipe-meta.php:873 msgid "%1$s or %2$s Video" msgstr "" #. translators: a message describing how to display a video from YouTube or Vimeo. -#: includes/class.cooked-recipe-meta.php:864 +#: includes/class.cooked-recipe-meta.php:877 msgid "If you would like to display a video as the first item in your gallery, you can paste a valid %1$s or %2$s URL below." msgstr "" -#: includes/class.cooked-recipe-meta.php:869 +#: includes/class.cooked-recipe-meta.php:882 msgid "Gallery Items" msgstr "" -#: includes/class.cooked-recipe-meta.php:900 +#: includes/class.cooked-recipe-meta.php:913 msgid "Recipe Information" msgstr "" -#: includes/class.cooked-recipe-meta.php:901 +#: includes/class.cooked-recipe-meta.php:914 msgid "This will display the recipe author, cooking times, etc." msgstr "" #. translators: "include and exclude" section title #. translators: "left and right" section title -#: includes/class.cooked-recipe-meta.php:910 -#: includes/class.cooked-recipe-meta.php:920 +#: includes/class.cooked-recipe-meta.php:923 +#: includes/class.cooked-recipe-meta.php:933 msgid "\"%1$s\" and \"%2$s\"" msgstr "" -#: includes/class.cooked-recipe-meta.php:912 +#: includes/class.cooked-recipe-meta.php:925 msgid "This will allow you to include or exclude content from the shortcode output." msgstr "" -#: includes/class.cooked-recipe-meta.php:921 +#: includes/class.cooked-recipe-meta.php:934 msgid "Used like \"include\", but will position the content to the left or right." msgstr "" -#: includes/class.cooked-recipe-meta.php:931 -#: includes/class.cooked-recipe-meta.php:977 -#: includes/class.cooked-recipe-meta.php:1008 -#: includes/class.cooked-recipe-meta.php:1033 -#: includes/class.cooked-recipe-meta.php:1057 -#: includes/class.cooked-recipe-meta.php:1117 -#: includes/class.cooked-recipe-meta.php:1162 -#: includes/class.cooked-recipe-meta.php:1192 -#: includes/class.cooked-recipe-meta.php:1237 +#: includes/class.cooked-recipe-meta.php:944 +#: includes/class.cooked-recipe-meta.php:990 +#: includes/class.cooked-recipe-meta.php:1021 +#: includes/class.cooked-recipe-meta.php:1046 +#: includes/class.cooked-recipe-meta.php:1070 +#: includes/class.cooked-recipe-meta.php:1130 +#: includes/class.cooked-recipe-meta.php:1175 +#: includes/class.cooked-recipe-meta.php:1205 +#: includes/class.cooked-recipe-meta.php:1250 msgid "Available Variables" msgstr "" -#: includes/class.cooked-recipe-meta.php:935 +#: includes/class.cooked-recipe-meta.php:948 #: includes/class.cooked-settings.php:167 #: includes/class.cooked-shortcodes.php:430 #: includes/class.cooked-shortcodes.php:595 msgid "Author" msgstr "" -#: includes/class.cooked-recipe-meta.php:939 +#: includes/class.cooked-recipe-meta.php:952 #: includes/class.cooked-shortcodes.php:431 #: includes/class.cooked-shortcodes.php:606 msgid "Difficulty" msgstr "" -#: includes/class.cooked-recipe-meta.php:940 +#: includes/class.cooked-recipe-meta.php:953 msgid "Servings Switcher" msgstr "" -#: includes/class.cooked-recipe-meta.php:941 +#: includes/class.cooked-recipe-meta.php:954 #: includes/class.cooked-settings.php:168 #: includes/class.cooked-shortcodes.php:688 #: includes/class.cooked-shortcodes.php:691 @@ -1166,158 +1166,158 @@ msgstr "" msgid "Category" msgstr "" -#: includes/class.cooked-recipe-meta.php:942 +#: includes/class.cooked-recipe-meta.php:955 msgid "Print Mode" msgstr "" -#: includes/class.cooked-recipe-meta.php:943 +#: includes/class.cooked-recipe-meta.php:956 msgid "Full-Screen Mode" msgstr "" -#: includes/class.cooked-recipe-meta.php:963 +#: includes/class.cooked-recipe-meta.php:976 msgid "This will display the list of ingredients, added via the \"Ingredients\" tab." msgstr "" -#: includes/class.cooked-recipe-meta.php:969 +#: includes/class.cooked-recipe-meta.php:982 msgid "This will allow you to hide or show the checkboxes:" msgstr "" -#: includes/class.cooked-recipe-meta.php:979 +#: includes/class.cooked-recipe-meta.php:992 msgid "Show checkboxes" msgstr "" -#: includes/class.cooked-recipe-meta.php:980 +#: includes/class.cooked-recipe-meta.php:993 msgid "Hide checkboxes" msgstr "" -#: includes/class.cooked-recipe-meta.php:994 +#: includes/class.cooked-recipe-meta.php:1007 msgid "This will display the list of directions, added via the \"Directions\" tab." msgstr "" -#: includes/class.cooked-recipe-meta.php:1000 +#: includes/class.cooked-recipe-meta.php:1013 msgid "This will allow you to hide or show the numbers:" msgstr "" -#: includes/class.cooked-recipe-meta.php:1010 +#: includes/class.cooked-recipe-meta.php:1023 msgid "Show numbers" msgstr "" -#: includes/class.cooked-recipe-meta.php:1011 +#: includes/class.cooked-recipe-meta.php:1024 msgid "Hide numbers" msgstr "" -#: includes/class.cooked-recipe-meta.php:1024 +#: includes/class.cooked-recipe-meta.php:1037 msgid "Featured Image" msgstr "" -#: includes/class.cooked-recipe-meta.php:1025 +#: includes/class.cooked-recipe-meta.php:1038 msgid "This will display the featured image, if one is set." msgstr "" -#: includes/class.cooked-recipe-meta.php:1035 -#: includes/class.cooked-recipe-meta.php:1059 -#: includes/class.cooked-recipe-meta.php:1164 +#: includes/class.cooked-recipe-meta.php:1048 +#: includes/class.cooked-recipe-meta.php:1072 +#: includes/class.cooked-recipe-meta.php:1177 msgid "None" msgstr "" -#: includes/class.cooked-recipe-meta.php:1048 +#: includes/class.cooked-recipe-meta.php:1061 msgid "Nutrition Label" msgstr "" -#: includes/class.cooked-recipe-meta.php:1049 +#: includes/class.cooked-recipe-meta.php:1062 msgid "This will display the Nutrition Facts label, if data is present." msgstr "" -#: includes/class.cooked-recipe-meta.php:1075 +#: includes/class.cooked-recipe-meta.php:1088 msgid "This will display the gallery, if one is set or created from the \"Gallery\" tab." msgstr "" -#: includes/class.cooked-recipe-meta.php:1083 +#: includes/class.cooked-recipe-meta.php:1096 msgid "Set the width of the gallery." msgstr "" -#: includes/class.cooked-recipe-meta.php:1090 +#: includes/class.cooked-recipe-meta.php:1103 msgid "Set the image size ratio." msgstr "" -#: includes/class.cooked-recipe-meta.php:1100 +#: includes/class.cooked-recipe-meta.php:1113 msgid "Set the navigation style." msgstr "" -#: includes/class.cooked-recipe-meta.php:1107 +#: includes/class.cooked-recipe-meta.php:1120 msgid "Enable or disable \"Full-Screen\" mode." msgstr "" #. translators: related to the width of slideshows: "80% or 300px" section title -#: includes/class.cooked-recipe-meta.php:1122 +#: includes/class.cooked-recipe-meta.php:1135 msgid "ex: \"%1$s\" or \"%2$s\"" msgstr "" #. translators: related to the image ratio for slideshows: "ex: 800/600" section title -#: includes/class.cooked-recipe-meta.php:1127 +#: includes/class.cooked-recipe-meta.php:1140 msgid "ex: \"%s\"" msgstr "" #. translators: related to the navigation style for slideshows: "dots, thumbs or false" section title -#: includes/class.cooked-recipe-meta.php:1132 +#: includes/class.cooked-recipe-meta.php:1145 msgid "\"%1$s\", \"%2$s\", or \"%3$s\"" msgstr "" #. translators: related to allowing full screen for slideshows: "true or false" section title -#: includes/class.cooked-recipe-meta.php:1137 +#: includes/class.cooked-recipe-meta.php:1150 msgid "\"%1$s\" or \"%2$s\"" msgstr "" -#: includes/class.cooked-recipe-meta.php:1154 +#: includes/class.cooked-recipe-meta.php:1167 msgid "This will display the excerpt, if one is available from the \"Layout & Content\" tab." msgstr "" -#: includes/class.cooked-recipe-meta.php:1178 +#: includes/class.cooked-recipe-meta.php:1191 msgid "This will display the notes, if one is available from the \"Layout & Content\" tab." msgstr "" -#: includes/class.cooked-recipe-meta.php:1184 +#: includes/class.cooked-recipe-meta.php:1197 msgid "This will allow you to hide or show the header for the notes section:" msgstr "" -#: includes/class.cooked-recipe-meta.php:1194 +#: includes/class.cooked-recipe-meta.php:1207 msgid "Show header" msgstr "" -#: includes/class.cooked-recipe-meta.php:1195 +#: includes/class.cooked-recipe-meta.php:1208 msgid "Hide header" msgstr "" -#: includes/class.cooked-recipe-meta.php:1209 +#: includes/class.cooked-recipe-meta.php:1222 msgid "This will display a special link to start a cooking timer." msgstr "" #. translators: "seconds, minutes and hours" section title -#: includes/class.cooked-recipe-meta.php:1218 +#: includes/class.cooked-recipe-meta.php:1231 msgid "\"%1$s\", \"%2$s\" and \"%3$s\"" msgstr "" -#: includes/class.cooked-recipe-meta.php:1220 +#: includes/class.cooked-recipe-meta.php:1233 msgid "Use just one or a combination of all three to set the timer length" msgstr "" -#: includes/class.cooked-recipe-meta.php:1227 +#: includes/class.cooked-recipe-meta.php:1240 msgid "Add a short description for this timer, if applicable." msgstr "" -#: includes/class.cooked-recipe-meta.php:1239 +#: includes/class.cooked-recipe-meta.php:1252 msgid "Time in seconds" msgstr "" -#: includes/class.cooked-recipe-meta.php:1240 +#: includes/class.cooked-recipe-meta.php:1253 msgid "Time in minutes" msgstr "" -#: includes/class.cooked-recipe-meta.php:1241 +#: includes/class.cooked-recipe-meta.php:1254 msgid "Time in hours" msgstr "" -#: includes/class.cooked-recipe-meta.php:1242 +#: includes/class.cooked-recipe-meta.php:1255 msgid "Timer Description" msgstr "" @@ -1811,7 +1811,7 @@ msgid "No Categories" msgstr "" #. translators: for displaying singular or plural versions depending on the number. -#: includes/class.cooked-taxonomies.php:135 +#: includes/class.cooked-taxonomies.php:136 msgid "%s Recipe" msgid_plural "%s Recipes" msgstr[0] ""