From b3a4a064925baa623c209199d464f38f08f4b26b Mon Sep 17 00:00:00 2001 From: mgiannopoulos24 <79588074+mgiannopoulos24@users.noreply.github.com> Date: Wed, 7 Jan 2026 23:13:33 +0200 Subject: [PATCH 01/31] Implement the ability to import CSV files. --- assets/admin/css/style.css | 10 +- assets/admin/css/style.min.css | 2 +- assets/admin/js/cooked-migration.js | 139 +++++- assets/admin/js/cooked-migration.min.js | 2 +- includes/class.cooked-admin-enqueues.php | 2 + includes/class.cooked-ajax.php | 101 +++++ includes/class.cooked-csv-import.php | 487 ++++++++++++++++++++ includes/class.cooked-import.php | 45 ++ languages/cooked.mo | Bin 314 -> 324 bytes languages/cooked.po | 543 +++++++++++++---------- package-lock.json | 15 +- readme.md | 7 + readme.txt | 9 +- templates/admin/import.php | 1 + tests/test_data/recipes-large.csv | 11 + tests/test_data/recipes-medium.csv | 4 + tests/test_data/recipes-small.csv | 2 + 17 files changed, 1129 insertions(+), 251 deletions(-) create mode 100644 includes/class.cooked-csv-import.php create mode 100644 tests/test_data/recipes-large.csv create mode 100644 tests/test_data/recipes-medium.csv create mode 100644 tests/test_data/recipes-small.csv diff --git a/assets/admin/css/style.css b/assets/admin/css/style.css index 5917269..4829b72 100644 --- a/assets/admin/css/style.css +++ b/assets/admin/css/style.css @@ -35,7 +35,7 @@ body.post-type-cp_recipe #titlediv #title-prompt-text { font-size:15px; color:#8 position: relative; border-radius: 10px; margin: 40px 40px 40px 20px; - /* max-width:1000px; */ + max-width: 1000px; min-width: 1000px; background: #fff; box-shadow: @@ -258,6 +258,14 @@ body.post-type-cp_recipe .switchery-small > small, #cooked-migration-progress-text.cooked-progress-text, #cooked-import-progress-text.cooked-progress-text { font-size:11px; color:#888; max-width:600px; } #cooked-migration-completed, #cooked-import-completed { display:none; } #cooked-migration-completed.cooked-active, #cooked-import-completed.cooked-active { display:block; } +#cooked-csv-import-progress.cooked-progress { background:#ccc; margin:25px 0 0 0; border-radius:6px; height:12px; max-width:600px; } +#cooked-csv-import-progress.cooked-progress .cooked-progress-bar { border-radius:6px; height:12px; } +#cooked-csv-import-progress-text.cooked-progress-text { font-size:11px; color:#888; max-width:600px; } +#cooked-csv-import-completed { display:none; } +#cooked-csv-import-completed.cooked-active { display:block; } +#cooked-csv-import-form { max-width:100%; box-sizing:border-box; } +#cooked-csv-import-form input[type="file"] { max-width:100%; box-sizing:border-box; width:100%; } +#cooked-csv-import-errors { max-width:100%; box-sizing:border-box; word-wrap:break-word; } /* Save as Default */ #cooked_recipe_settings .cooked-layout-save-default { position:relative; top:-2px; z-index:10; margin:0 0 0 15px; padding:0 8px 1px; } diff --git a/assets/admin/css/style.min.css b/assets/admin/css/style.min.css index 017c2a4..45427e0 100644 --- a/assets/admin/css/style.min.css +++ b/assets/admin/css/style.min.css @@ -1 +1 @@ -.cooked-clearfix:after{content:"";display:table;clear:both}#post-body-content #postdivrich{display:none}body.post-type-cp_recipe .wp-list-table tfoot th.check-column,body.post-type-cp_recipe .wp-list-table thead th.check-column{padding:15px 0 0 7px}body.post-type-cp_recipe .wp-list-table tfoot td,body.post-type-cp_recipe .wp-list-table tfoot th,body.post-type-cp_recipe .wp-list-table thead td,body.post-type-cp_recipe .wp-list-table thead th{padding:10px 10px}body.post-type-cp_recipe .wp-list-table tfoot th.sortable a,body.post-type-cp_recipe .wp-list-table tfoot th.sorted a,body.post-type-cp_recipe .wp-list-table thead th.sortable a,body.post-type-cp_recipe .wp-list-table thead th.sorted a{padding-left:0;padding-right:0}body.post-type-cp_recipe .wp-list-table tbody th.check-column{padding:15px 0 0 10px}body.post-type-cp_recipe .wp-list-table tbody td,body.post-type-cp_recipe .wp-list-table tbody th{padding:12px 10px}body.post-type-cp_recipe .wp-list-table tbody td.column-title strong{margin-top:6px}body.post-type-cp_recipe .wp-list-table tbody td.column-title strong .row-title{padding-top:10px;font-size:1rem!important}th.column-featured_image{width:50px;text-align:center}td.column-featured_image{width:50px;text-align:center}.cooked-admin-recipes-list-image img{width:49px;height:auto;border-radius:3px;position:relative;top:3px}body.post-type-cp_recipe #titlediv #title{box-shadow:none;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:0 12px;font-weight:400;font-size:19px;letter-spacing:0;height:44px}body.post-type-cp_recipe #titlediv #title-prompt-text{font-size:15px;color:#888;font-weight:400;letter-spacing:0;padding:12px 15px}#cooked-settings-prewrap{display:flex;justify-content:center}#cooked-settings-wrap{position:relative;border-radius:10px;margin:40px 40px 40px 20px;min-width:1000px;background:#fff;box-shadow:0 4px 4px rgba(0,0,0,.05),0 8px 8px rgba(0,0,0,.05),0 32px 32px rgba(0,0,0,.05),0 64px 64px rgba(0,0,0,.05)}#cooked-settings-wrap.is-stuck{position:static!important}#cooked-settings-wrap .cooked-settings-update-button{position:absolute;top:30px;right:30px}#cooked-settings-wrap .cooked-settings-update-button>.button-primary{box-shadow:none;border:none}#cooked-settings-wrap.is-stuck .cooked-settings-update-button{position:fixed;top:40px;right:11px;z-index:100001}#cooked_recipe_settings .hndle,#cooked_recipe_settings button.handlediv{display:none}#cooked_recipe_settings .inside{padding:0;margin:0}#cooked-recipe-tabs{list-style:none;padding:0;margin:0;position:absolute;top:0;left:0;width:100%}#cooked-recipe-tabs li{font-size:.9rem;line-height:3rem;height:3rem;font-weight:500;display:inline-block;padding:0 1.25rem;margin:0;color:#fff}#cooked-recipe-tabs li:hover{cursor:pointer}#cooked-recipe-tabs li.active,#cooked-recipe-tabs li.active:hover{cursor:default}#cooked-recipe-tabs li:last-child{border-right:none!important}#cooked-recipe-tabs li.cooked-loading{opacity:0;background:0 0;color:#fff;position:absolute;top:0;right:0;cursor:default;font-size:14px;width:40px;height:40px;text-align:center;display:block;line-height:40px;padding:0}#cooked-recipe-tabs li.cooked-loading:hover{background:0 0;color:#fff}#cooked_recipe_settings.cooked-loading #cooked-recipe-tabs li.cooked-loading{opacity:1}#cooked_recipe_settings .inside{padding-top:41px}#cooked_recipe_settings.stuck #cooked-recipe-tabs{position:fixed;width:auto;top:32px;left:23px;z-index:100000;margin-left:160px;box-shadow:0 3px 50px rgba(0,0,0,.25)}#cooked_recipe_settings.stuck #cooked-recipe-tabs li.cooked-loading{right:160px}.cooked-recipe-tab-content-wrapper .cooked-recipe-tab-content{display:none}.cooked-recipe-tab-content-wrapper .cooked-recipe-tab-content:first-child{display:block}.cooked-left{float:left;display:inline-block;width:auto}.cooked-right{float:right;display:inline-block;width:auto}#cooked_field--cooked_pro_license_key{font-family:monospace}#cooked_recipe_settings .cooked-bm-5{margin-bottom:5px!important}#cooked_recipe_settings .cooked-bm-10{margin-bottom:10px!important}#cooked_recipe_settings .cooked-tm-10{margin-top:10px!important}#cooked_recipe_settings .cooked-bm-15{margin-bottom:15px!important}#cooked_recipe_settings .cooked-bm-20{margin-bottom:20px!important}#cooked_recipe_settings .cooked-bm-30{margin-bottom:30px!important}#cooked_recipe_settings .cooked-bm-5-up{margin-bottom:-5px!important}#cooked_recipe_settings .cooked-bm-10-up{margin-bottom:-10px!important}#cooked_recipe_settings .cooked-bm-15-up{margin-bottom:-15px!important}#cooked_recipe_settings .cooked-bm-20-up{margin-bottom:-20px!important}#cooked_recipe_settings .cooked-bm-30-up{margin-bottom:-30px!important}#cooked_recipe_settings .cooked-hr{border:none;border-top:2px solid #ddd;margin:10px 0 0 0;padding:15px 0 0 0}#cooked_recipe_settings .cooked-conditional-hidden{display:none}#cooked_recipe_settings .cooked-recipe-tab-content{padding:23px 30px 15px 30px}#cooked_recipe_settings .recipe-setting-block{margin:0 0 20px;width:100%}#cooked_recipe_settings .recipe-setting-block p{font-size:.9rem;line-height:1.5rem;margin:0 0 1rem;padding:0}#cooked_recipe_settings .recipe-setting-block p.cooked-padded{line-height:1.75rem;font-size:.85rem}#cooked_recipe_settings .recipe-setting-block .cooked-conditional-hidden{padding:0}#cooked_recipe_settings textarea{width:100%;height:75px;padding:15px;box-sizing:border-box;position:relative;top:5px}#cooked_recipe_settings .recipe-setting-block>label.cooked-select-label{top:5px}#cooked_recipe_settings select{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:none;border-radius:3px;padding:0 45px 0 9px;line-height:31px;height:33px;box-sizing:border-box;background:#fff}#cooked_recipe_settings .cooked-select-wrapper{background:#fff;position:relative;width:auto;display:inline-block;border-radius:3px;margin:0 5px 0 0}#cooked_recipe_settings .cooked-select-wrapper select{margin:0;background:0 0;position:relative}#cooked_recipe_settings .cooked-select-wrapper:before{font-family:CookedIcons;display:block;width:15px;height:15px;line-height:14px;color:#000;font-size:14px;content:"\f00b";position:absolute;right:12px;top:11px;color:rgba(0,0,0,.3)}#cooked_recipe_settings .cooked-select-wrapper:hover:before{color:#000}#cooked_recipe_settings .cooked-select-wrapper:hover select{border-color:#ccc}#cooked_recipe_settings .cooked-checkbox-radio-label{position:relative;left:1px}#cooked_recipe_settings .recipe-setting-block input[type=checkbox],#cooked_recipe_settings .recipe-setting-block input[type=radio]{margin-top:0}#cooked_recipe_settings .recipe-setting-block input[type=number]{width:65px}#cooked_recipe_settings .recipe-setting-block input[type=password],#cooked_recipe_settings .recipe-setting-block input[type=text]{width:75%}#cooked_recipe_settings .recipe-setting-block input[type=number],#cooked_recipe_settings .recipe-setting-block input[type=password],#cooked_recipe_settings .recipe-setting-block input[type=text]{margin:0 6px 5px 0;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;height:33px;box-shadow:none;position:relative;top:2px;padding:0 10px}#cooked_recipe_settings .recipe-setting-block p.cooked-measurement-inputs .cooked-measurement-column{width:43%;margin-right:3%;display:inline-block}#cooked_recipe_settings .recipe-setting-block p.cooked-measurement-inputs .cooked-select-wrapper,#cooked_recipe_settings .recipe-setting-block p.cooked-measurement-inputs input,#cooked_recipe_settings .recipe-setting-block p.cooked-measurement-inputs label{width:100%;display:block}#cooked_recipe_settings .recipe-setting-block p.cooked-measurement-inputs .cooked-select-wrapper select{width:100%}#cooked_recipe_settings .recipe-setting-block input[type=number],#cooked_recipe_settings .recipe-setting-block input[type=password].cooked-small-textfield,#cooked_recipe_settings .recipe-setting-block input[type=text].cooked-small-textfield{width:150px}#cooked_recipe_settings small{display:block;line-height:1.5;font-size:12px;color:#888;padding:10px 0 0}#cooked_recipe_settings .recipe-setting-block em{color:#aaa}#cooked_recipe_settings .recipe-setting-block,#cooked_recipe_settings .recipe-setting-block .cooked-repositioned{display:block;position:relative;box-sizing:border-box;line-height:1}#cooked_recipe_settings .recipe-setting-block .cooked-repositioned{padding-left:157px}#cooked_recipe_settings .recipe-setting-block h3.cooked-settings-title{width:70%;position:relative;z-index:2;padding:.5rem 0 .5rem;margin:0;font-size:1rem;line-height:1.5rem;font-weight:600}#cooked_recipe_settings .recipe-setting-block strong.cooked-heading{font-size:14px}#cooked_recipe_settings .recipe-setting-block .cooked-repositioned>label{position:absolute;top:1px;left:0;width:147px;cursor:default;font-weight:600}#cooked_recipe_settings .recipe-setting-block .cooked-tooltip-icon{color:#aaa;cursor:help;display:inline-block;margin-left:10px}#cooked_recipe_settings .recipe-setting-block .cooked-tooltip-icon:hover{color:#eee}#cooked_recipe_settings .recipe-setting-block .cooked-repositioned>.cooked-checkbox-radio-label{top:7px}#cooked_recipe_settings .recipe-setting-block .cooked-repositioned>label{top:auto;height:33px;line-height:30px;padding:0;width:130px}#cooked_recipe_settings .recipe-setting-block .cooked-repositioned:first-child label:first-child{padding-top:12px;margin-top:-12px}#cooked_recipe_settings .recipe-setting-block .cooked-repositioned span.cooked-padded{padding:0 0 15px;display:block;line-height:1.9}#cooked_recipe_settings .recipe-setting-block .wp-picker-container .cooked-color-field.wp-color-picker{padding:5px;height:25px;top:0;margin:0;width:74px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;border:1px solid #ccc}#cooked_recipe_settings .recipe-setting-block input[type=text].cooked-shortcode-field{font-family:monospace;background:#f5f5f5;font-size:12px}#cooked_recipe_settings .cooked-banner-block{margin:30px -30px -17px;display:block;box-sizing:content-box;padding:10px 30px 15px;background:#f9f9f9;width:100%;border-top:1px solid #e5e5e5}#cooked_recipe_settings .cooked-advanced-options-hr{border:none;border-bottom:1px solid #ddd;height:1px;padding:10px 0 0 0;margin:0 0 20px}#cooked_recipe_settings .recipe-setting-block input.cooked-time-picker{top:0;width:100%;padding-right:70%;margin:0 0 3px}#cooked_recipe_settings .recipe-setting-block .cooked-time-picker-text{position:absolute;bottom:13px;right:40px;color:#888}#cooked_recipe_settings .cooked-alert-block{background:#fffbdc;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;margin:10px 0 15px;padding:10px 22px 2px;border:2px solid #ece8c4}#cooked_recipe_settings .recipe-setting-block.cooked-template{display:none}#cooked_recipe_settings ul.cooked-admin-ul{font-size:.9rem;margin:0 0 1rem 2rem;list-style:disc}#cooked_recipe_settings ul.cooked-admin-ul li{font-size:.9rem;padding:0;margin:0 0 .5rem}#cooked_recipe_settings .cooked-html-block{background:#fff;width:auto;min-width:300px;display:inline-block;padding:.5rem 1.3rem .25rem;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.15)}#cooked_recipe_settings .recipe-setting-block .cooked-html-block h3.cooked-settings-title{width:100%;color:#333}#cooked_recipe_settings .recipe-setting-block .cooked-html-block.valid{background:#fff;border:2px solid #0aa780;box-shadow:none;border-radius:5px}#cooked_recipe_settings .recipe-setting-block .cooked-html-block.valid>.cooked-settings-title{color:#0aa780}#cooked_recipe_settings .recipe-setting-block .cooked-html-block.expired{border:2px solid #ca4a20}#cooked-directions-builder .cooked-direction-block.cooked-expanded>.cooked-heading-name,#cooked-directions-builder .cooked-direction-block.cooked-has-heading-element>.cooked-heading-name,#cooked-directions-builder .cooked-direction-block:hover>.cooked-heading-name,#cooked-ingredients-builder .cooked-ingredient-block.cooked-expanded>.cooked-heading-name,#cooked-ingredients-builder .cooked-ingredient-block.cooked-has-heading-element>.cooked-heading-name,#cooked-ingredients-builder .cooked-ingredient-block:hover>.cooked-heading-name{padding-right:32px}#cooked-directions-builder .cooked-direction-block .cooked-show-heading-element,#cooked-ingredients-builder .cooked-ingredient-block .cooked-show-heading-element{opacity:0;cursor:pointer;font-size:14px;position:absolute;top:14px;right:35px}#cooked-directions-builder .cooked-direction-block .cooked-show-heading-element .cooked-icon,#cooked-ingredients-builder .cooked-ingredient-block .cooked-show-heading-element .cooked-icon{color:#888}#cooked-directions-builder .cooked-direction-block.cooked-expanded .cooked-show-heading-element,#cooked-directions-builder .cooked-direction-block.cooked-has-heading-element .cooked-show-heading-element,#cooked-directions-builder .cooked-direction-block:hover .cooked-show-heading-element,#cooked-ingredients-builder .cooked-ingredient-block.cooked-expanded .cooked-show-heading-element,#cooked-ingredients-builder .cooked-ingredient-block.cooked-has-heading-element .cooked-show-heading-element,#cooked-ingredients-builder .cooked-ingredient-block:hover .cooked-show-heading-element{opacity:1}#cooked-directions-builder .cooked-direction-block .cooked-show-heading-element .cooked-icon:hover,#cooked-directions-builder .cooked-direction-block.cooked-expanded .cooked-show-heading-element .cooked-icon,#cooked-directions-builder .cooked-direction-block.cooked-has-heading-element .cooked-show-heading-element .cooked-icon,#cooked-ingredients-builder .cooked-ingredient-block .cooked-show-heading-element .cooked-icon:hover,#cooked-ingredients-builder .cooked-ingredient-block.cooked-expanded .cooked-show-heading-element .cooked-icon,#cooked-ingredients-builder .cooked-ingredient-block.cooked-has-heading-element .cooked-show-heading-element .cooked-icon{color:#0685ba}#cooked-directions-builder .cooked-direction-block>.cooked-heading-element,#cooked-ingredients-builder .cooked-ingredient-block>.cooked-heading-element{display:none;width:65%;float:right;margin-top:4px;padding-right:32px}#cooked-directions-builder .cooked-direction-block>.cooked-heading-element select,#cooked-ingredients-builder .cooked-ingredient-block>.cooked-heading-element select{color:#0685ba;width:100%}#cooked-directions-builder .cooked-direction-block>.cooked-heading-element label,#cooked-ingredients-builder .cooked-ingredient-block>.cooked-heading-element label{font-weight:600}#cooked-directions-builder .cooked-direction-block.cooked-expanded>.cooked-heading-element,#cooked-ingredients-builder .cooked-ingredient-block.cooked-expanded>.cooked-heading-element{display:block}#cooked-ingredients-builder .cooked-ingredient-block .cooked-show-substitution{opacity:0;cursor:pointer;font-size:14px;position:absolute;top:15px;right:58px}#cooked-ingredients-builder .cooked-ingredient-block .cooked-show-substitution .cooked-icon{color:#888}#cooked-ingredients-builder .cooked-ingredient-block.cooked-expanded .cooked-show-substitution,#cooked-ingredients-builder .cooked-ingredient-block.cooked-has-substitution .cooked-show-substitution,#cooked-ingredients-builder .cooked-ingredient-block:hover .cooked-show-substitution{opacity:1;right:50px}#cooked-ingredients-builder .cooked-ingredient-block .cooked-show-substitution .cooked-icon:hover,#cooked-ingredients-builder .cooked-ingredient-block.cooked-expanded .cooked-show-substitution .cooked-icon,#cooked-ingredients-builder .cooked-ingredient-block.cooked-has-substitution .cooked-show-substitution .cooked-icon{color:#0685ba}#cooked-ingredients-builder .cooked-ingredient-block.cooked-expanded>.cooked-ingredient-name,#cooked-ingredients-builder .cooked-ingredient-block.cooked-has-substitution>.cooked-ingredient-name,#cooked-ingredients-builder .cooked-ingredient-block:hover>.cooked-ingredient-name{padding-right:32px}#cooked_recipe_settings .switchery-small,body.post-type-cp_recipe .switchery-small{height:1rem;width:1.75rem;border-radius:1rem;margin-right:.4rem}#cooked_recipe_settings .switchery-small>small,body.post-type-cp_recipe .switchery-small>small{width:1rem;height:1rem;padding:0}.cooked-tooltip-buttons .cooked-icon-spin{margin-top:10px;font-size:15px}.cooked-tooltip-buttons .cooked-saved-default{height:28px;line-height:28px;font-weight:700;font-size:15px;color:#888}.cooked-progress{display:none;position:relative;background:#eee;width:100%;height:6px;padding:0;border-radius:3px;margin:10px 0 0 0}.cooked-progress-text{display:none;font-size:10px;color:#aaa;padding:2px 0 5px}.cooked-progress-text.cooked-active,.cooked-progress.cooked-active{display:block}.cooked-progress .cooked-progress-bar{display:block;position:absolute;background:#0085ba;width:0%;height:6px;top:0;left:0;border-radius:3px}#cooked-import-progress.cooked-progress,#cooked-migration-progress.cooked-progress{background:#ccc;margin:25px 0 0 0;border-radius:6px;height:12px;max-width:600px}#cooked-import-progress.cooked-progress .cooked-progress-bar,#cooked-migration-progress.cooked-progress .cooked-progress-bar{border-radius:6px;height:12px}#cooked-import-progress-text.cooked-progress-text,#cooked-migration-progress-text.cooked-progress-text{font-size:11px;color:#888;max-width:600px}#cooked-import-completed,#cooked-migration-completed{display:none}#cooked-import-completed.cooked-active,#cooked-migration-completed.cooked-active{display:block}#cooked_recipe_settings .cooked-layout-save-default{position:relative;top:-2px;z-index:10;margin:0 0 0 15px;padding:0 8px 1px}#cooked_recipe_settings .cooked-layout-load-default{position:relative;top:-2px;z-index:10;margin:0 0 0 10px;padding:0 8px 1px}body .button.button-cooked-reset{color:#999}body .button.button-cooked-reset:hover{color:#555}#cooked_recipe_settings .cooked-ingredient-headers{display:block;padding:5px 25px 0 35px}#cooked_recipe_settings .cooked-ingredient-headers span{font-size:.7rem;font-weight:700;letter-spacing:.03rem;text-transform:uppercase;color:#0085ba;box-sizing:border-box;display:inline-block;float:left}#cooked_recipe_settings .cooked-ingredient-headers span.cooked-ingredient-header-amount{width:15%}#cooked_recipe_settings .cooked-ingredient-headers span.cooked-ingredient-header-measurement{width:20%}#cooked_recipe_settings .cooked-ingredient-headers span.cooked-ingredient-header-item{width:65%}#cooked-ingredients-builder{margin:0 0 20px}#cooked-ingredients-builder .cooked-ingredient-block{display:block;padding:5px 45px 5px 35px}#cooked-ingredients-builder .cooked-ingredient-block:hover{background:#eee}#cooked-ingredients-builder .cooked-ingredient-block input[type=number],#cooked-ingredients-builder .cooked-ingredient-block input[type=text],#cooked-ingredients-builder .cooked-ingredient-block select{margin:0;display:block;top:0}#cooked-ingredients-builder .cooked-ingredient-block>div{display:inline-block;float:left;box-sizing:border-box;padding-right:10px}#cooked-ingredients-builder .cooked-ingredient-block>div input[type=text]{width:100%}#cooked-ingredients-builder .cooked-ingredient-block>.cooked-ingredient-amount{width:15%}#cooked-ingredients-builder .cooked-ingredient-block>.cooked-ingredient-measurement{width:20%}#cooked-ingredients-builder .cooked-ingredient-block>.cooked-ingredient-measurement .cooked-select-wrapper{width:100%}#cooked-ingredients-builder .cooked-ingredient-block>.cooked-ingredient-measurement .cooked-select-wrapper select{width:100%}#cooked-ingredients-builder .cooked-ingredient-block .cooked-substitution-fields>.cooked-ingredient-measurement .cooked-select-wrapper{width:100%}#cooked-ingredients-builder .cooked-ingredient-block .cooked-substitution-fields>.cooked-ingredient-measurement .cooked-select-wrapper select{width:100%}#cooked-ingredients-builder .cooked-ingredient-block>.cooked-ingredient-name{width:65%}#cooked-ingredients-builder .cooked-ingredient-block>.cooked-heading-name{width:100%}#cooked-ingredients-builder .cooked-ingredient-block>div small.cooked-input-ex{display:block;padding:5px 0 0 2px}#cooked-ingredients-builder .cooked-ingredient-block{margin:0}#cooked-ingredients-builder .cooked-ingredient-block i.cooked-icon-drag{cursor:move;color:#ccc;font-size:32px;position:absolute;top:5px;left:1px}#cooked-ingredients-builder .cooked-ingredient-block:hover i.cooked-icon-drag{color:#888}#cooked-ingredients-builder .cooked-ingredient-block.ui-sortable-helper{background:#f5f5f5;box-shadow:0 10px 20px rgba(0,0,0,.15);-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}#cooked-ingredients-builder .cooked-ingredient-block.ui-sortable-placeholder{visibility:visible!important;background:#eee;display:block;width:100%;height:43px;border-top:6px solid #fff;border-bottom:6px solid #fff}#cooked-ingredients-builder .cooked-ingredient-block .cooked-delete-ingredient{cursor:pointer;font-size:14px;position:absolute;top:14px;right:11px}#cooked-ingredients-builder .cooked-ingredient-block .cooked-delete-ingredient .cooked-icon{color:#fff}#cooked-ingredients-builder .cooked-ingredient-block:hover .cooked-delete-ingredient .cooked-icon{color:#888}#cooked-ingredients-builder .cooked-ingredient-block .cooked-delete-ingredient .cooked-icon:hover{color:#de2020}#cooked-ingredients-builder .cooked-ingredient-block.cooked-ingredient-heading{margin:10px 0}#cooked-ingredients-builder .cooked-ingredient-block.cooked-ingredient-heading>div input[type=text]{padding:0 7px;font-size:16px;background:#f9f9f9;font-weight:600}#cooked-directions-builder{margin:0 0 20px}#cooked-directions-builder .cooked-direction-block{display:block;padding:15px 25px 15px 35px}#cooked-directions-builder .cooked-direction-block.cooked-direction-heading{padding:5px 25px 5px 35px}#cooked-directions-builder .cooked-direction-block:hover{background:#f5f5f5}#cooked-directions-builder .cooked-direction-block.cooked-direction-heading:hover{background:#eee}#cooked-directions-builder .cooked-direction-block textarea{margin:0;display:block;height:191px;top:0}#cooked-directions-builder .cooked-direction-block>div{display:inline-block;float:left;box-sizing:border-box;padding-right:15px}#cooked-directions-builder .cooked-direction-block>div:last-child{padding:0}#cooked-directions-builder .cooked-direction-block>div input[type=text]{width:100%}#cooked-directions-builder .cooked-direction-block .mce-statusbar{display:none}#cooked-directions-builder .cooked-direction-block>.cooked-direction-image{width:120px;position:absolute;top:15px;left:35px}#cooked-directions-builder .cooked-direction-block>.cooked-direction-image img{cursor:pointer;display:none;border-radius:3px}#cooked-directions-builder .cooked-direction-block>.cooked-direction-image .cooked-direction-img-placeholder{box-sizing:border-box;cursor:pointer;border-radius:3px;width:100%;padding-bottom:100%;background:0 0;border:2px dashed #ddd;border-radius:3px;margin-top:15px}#cooked-directions-builder .cooked-direction-block:hover>.cooked-direction-image .cooked-direction-img-placeholder{background:0 0}#cooked-directions-builder .cooked-direction-block>.cooked-direction-image .cooked-direction-img-placeholder:hover{background:#ddd;border:2px solid #ddd}#cooked-directions-builder .cooked-direction-block>.cooked-direction-image .direction-image-button{width:100%;text-align:center}#cooked-directions-builder .cooked-direction-block>.cooked-direction-image .remove-image-button{display:none;position:absolute;top:43px;right:15px}#cooked-directions-builder .cooked-direction-block>.cooked-direction-image.cooked-has-image .remove-image-button{display:inline-block;padding:10px;background:rgba(0,0,0,.25);color:#fff}#cooked-directions-builder .cooked-direction-block>.cooked-direction-image.cooked-has-image .remove-image-button:hover{background:#ff0100}#cooked-directions-builder .cooked-direction-block>.cooked-direction-image.cooked-has-image img{width:100%;height:auto;display:block;margin:15px 0 0}#cooked-directions-builder .cooked-direction-block>.cooked-direction-image.cooked-has-image .cooked-direction-img-placeholder{display:none}#cooked-directions-builder .cooked-direction-block>.cooked-direction-content{width:100%;padding-left:120px}#cooked-directions-builder .cooked-direction-block>.cooked-heading-name{width:100%}#cooked-directions-builder .cooked-direction-block{margin:0}#cooked-directions-builder .cooked-direction-block i.cooked-icon-drag{cursor:move;color:#ccc;font-size:32px;position:absolute;top:13px;left:1px}#cooked-directions-builder .cooked-direction-block.cooked-direction-heading i.cooked-icon-drag{top:5px}#cooked-directions-builder .cooked-direction-block:hover i.cooked-icon-drag{color:#888}#cooked-directions-builder .cooked-direction-block.ui-sortable-helper{background:#f5f5f5;box-shadow:0 10px 20px rgba(0,0,0,.15);-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}#cooked-directions-builder .cooked-direction-block.ui-sortable-placeholder{visibility:visible!important;background:#eee;display:block;width:100%;height:221px;border-top:6px solid #fff;border-bottom:6px solid #fff}#cooked-directions-builder .cooked-direction-block.cooked-direction-heading.ui-sortable-placeholder{height:43px}#cooked-directions-builder .cooked-direction-block .cooked-delete-direction{cursor:pointer;font-size:14px;position:absolute;right:14px}#cooked-directions-builder .cooked-direction-block .cooked-delete-direction .cooked-icon{color:#fff}#cooked-directions-builder .cooked-direction-block:hover .cooked-delete-direction .cooked-icon{color:#888}#cooked-directions-builder .cooked-direction-block .cooked-delete-direction .cooked-icon:hover{color:#de2020}#cooked-directions-builder .cooked-direction-block.cooked-direction-heading{margin:10px 0}#cooked-directions-builder .cooked-direction-block.cooked-direction-heading>div input[type=text]{padding:0 7px;font-size:16px;background:#f9f9f9;font-weight:600;top:0;margin:0}#cooked-directions-builder .cooked-direction-block .cooked-delete-direction{top:16px}#cooked-directions-builder .cooked-direction-block.cooked-direction-heading .cooked-delete-direction{top:14px}#cooked-recipe-image-gallery{margin:0 -1% 0}#cooked-recipe-image-gallery .cooked-recipe-gallery-item{position:relative;overflow:hidden;cursor:move;box-sizing:border-box;display:inline-block;width:18%;height:auto;padding:0;margin:0 1% 2% 1%}#cooked-recipe-image-gallery .cooked-recipe-gallery-item:hover{opacity:.9}#cooked-recipe-image-gallery .cooked-recipe-gallery-item img{width:100%;height:auto;border-radius:3px;display:block;margin:0;padding:0;border:none}#cooked-recipe-image-gallery .cooked-recipe-gallery-item.ui-sortable-helper,#cooked-recipe-image-gallery .cooked-recipe-gallery-item.ui-sortable-helper:hover{opacity:.75;box-shadow:0 10px 20px rgba(0,0,0,.15)}#cooked-recipe-image-gallery .cooked-recipe-gallery-item.ui-sortable-placeholder{width:18%;height:auto;visibility:visible!important;border-radius:3px;background:#ddd;display:inline-block}#cooked-recipe-image-gallery .cooked-recipe-gallery-item .remove-image-button{border-radius:0 3px 0 0;display:inline-block;position:absolute;top:0;right:0;padding:10px;background:rgba(0,0,0,.25);color:#fff}#cooked-recipe-image-gallery .cooked-recipe-gallery-item .remove-image-button:hover{background:#ff0100}#cooked-recipe-image-gallery .cooked-recipe-gallery-item .cooked-gallery-edit-button{border-radius:3px 0 0 0;display:inline-block;position:absolute;top:0;left:0;padding:10px;background:rgba(0,0,0,.25);color:#fff}#cooked-recipe-image-gallery .cooked-recipe-gallery-item .cooked-gallery-edit-button:hover{background:#0084bc}#cooked-recipe-image-gallery .cooked-recipe-gallery-item .cooked-gallery-item-title{position:absolute;left:0;bottom:0;box-sizing:border-box;width:100%;border-radius:0 0 3px 3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;padding:10px 10px 11px;text-align:center;background:#000;background:rgba(0,0,0,.3);color:#fff;font-size:12px}#cooked-recipe-image-gallery .cooked-recipe-gallery-item:hover .cooked-gallery-item-title{background:#000;background:rgba(0,0,0,.75)}#cooked-recipe-image-gallery .cooked-recipe-gallery-item.ui-sortable-helper{-webkit-animation:cooked-wiggle .4s infinite;-moz-animation:cooked-wiggle .4s infinite;-o-animation:cooked-wiggle .4s infinite;animation:cooked-wiggle .4s infinite}#cooked_recipe_settings label.cooked-nutrition-label{display:block;font-size:.7rem;letter-spacing:.03rem;font-weight:700;text-transform:uppercase;line-height:1;margin:0 0 7px}#cooked_recipe_settings #cooked-nutrition-label{line-height:1.6;font-size:1.1rem;border:1px solid #aaa;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:5%;margin:0 0 2rem;font-family:Helvetica,Arial,sans-serif;container-name:nutrition-label;container-type:inline-size}#cooked_recipe_settings #cooked-nutrition-label h2{font-size:2.5rem;line-height:1;letter-spacing:0;font-weight:800;padding:0 0 .5rem 0;margin:0 0 .4rem;color:#333;border-bottom:1px solid #aaa}#cooked_recipe_settings #cooked-nutrition-label p.cooked-daily-value-text{padding:.5rem 0 0 0;margin:0;font-size:.9rem}#cooked_recipe_settings #cooked-nutrition-label ul.cooked-nut-servings p{font-size:1.5rem}#cooked_recipe_settings #cooked-nutrition-label ul{list-style:none;margin:0;padding:0}#cooked_recipe_settings #cooked-nutrition-label li{position:relative;margin:0;padding:0 0 3px 0;border-top:1px solid #aaa}#cooked_recipe_settings #cooked-nutrition-label li li{padding:3px 0 0;margin:3px 0 0}#cooked_recipe_settings #cooked-nutrition-label li:after{content:"";display:table;clear:both}#cooked_recipe_settings #cooked-nutrition-label li.no-after:after{content:none}#cooked_recipe_settings #cooked-nutrition-label li.cooked-nut-spacer{border:none;height:.6rem;padding:0;background:#333}#cooked_recipe_settings #cooked-nutrition-label ul li.cooked-nut-no-border,#cooked_recipe_settings #cooked-nutrition-label>ul>li:first-child{border:none}#cooked_recipe_settings #cooked-nutrition-label li ul{padding:0;margin:0 0 0 20px}#cooked_recipe_settings #cooked-nutrition-label li ul.cooked-right{margin:0}#cooked_recipe_settings #cooked-nutrition-label li ul.cooked-right li{border:none;padding:0;margin:0}#cooked_recipe_settings #cooked-nutrition-label li.cooked-calories ul.cooked-right li strong.cooked-nut-label{font-size:2.5rem;line-height:1}#cooked_recipe_settings #cooked-nutrition-label .cooked-calories{border-top:none;display:flex;justify-content:space-between;align-items:baseline;padding:0}#cooked_recipe_settings #cooked-nutrition-label .cooked-calories strong,#cooked_recipe_settings #cooked-nutrition-label .cooked-calories strong.cooked-nut-label{font-size:2rem;font-weight:800}#cooked_recipe_settings #cooked-nutrition-label ul.cooked-nut-servings li{border:none}#cooked_recipe_settings #cooked-nutrition-label ul.cooked-nut-servings{margin:0}#cooked_recipe_settings #cooked-nutrition-label .cooked-nut-hr{border:none;border-top:1.3rem solid #333;margin:.1rem 0 0;padding:0}#cooked_recipe_settings #cooked-nutrition-label strong{font-weight:800}#cooked_recipe_settings #cooked-nutrition-label .cooked-serving-size strong,#cooked_recipe_settings #cooked-nutrition-label .cooked-serving-size strong.cooked-nut-label{font-size:1.5rem;font-weight:800}#cooked_recipe_settings #cooked-nutrition-label strong.cooked-nut-heading{font-size:1rem}#cooked_recipe_settings #cooked-nutrition-label strong.cooked-nut-label{font-weight:400}#cooked_recipe_settings #cooked-nutrition-label .cooked-nut-right{float:right}#cooked_recipe_settings #cooked-nutrition-label ul.cooked-nut-bottom{margin:0 0 .75rem}#cooked_recipe_settings #cooked-nutrition-label ul.cooked-nut-bottom li{border-top:none;border-bottom:1px solid #aaa;float:left;width:100%;box-sizing:border-box}#cooked_recipe_settings .cooked-measurement-inputs .cooked-select-wrapper:before{top:8px}.cooked-auto-nutrition{display:flex;justify-content:end;margin:0 0 1rem}#cooked-tooltip-auto-nutrition-notice{margin:0}.cooked-settings-header{border-radius:10px 10px 0 0;width:auto;height:90px;line-height:85px;padding:0 30px;font-weight:600;box-sizing:border-box;background:#33373c;color:#fff;font-size:29px;letter-spacing:-.03rem}.cooked-settings-header .cooked-icon{color:#00e0a9}.cooked-settings-submit-wrap{padding:0 0 35px 35px;margin:-20px 0 0}#cooked_recipe_settings .recipe-setting-block .cooked-permalink-field-wrapper span{font-size:14px;display:inline-block;line-height:32px;padding:5px 0 0 0}#cooked_recipe_settings .recipe-setting-block input[type=text].cooked-permalink-field{position:relative;top:0;display:inline-block;width:150px;margin:0 10px}#cooked-settings-panel{position:relative;margin:0;padding:0}#cooked-settings-tabs{display:flex;width:auto;padding:0 20px 0 0;margin:0;list-style:none}#cooked-settings-tabs li{font-size:13px;line-height:1;font-weight:400;display:block;padding:0;margin:0;color:#fff}#cooked-settings-tabs li .cooked-icon{font-size:14px}#cooked-settings-tabs li .cooked-icon.cooked-icon-recipe-icon{font-size:20px;top:2px;position:relative}#cooked-settings-tabs li:hover{cursor:pointer}#cooked-settings-tabs li.active,#cooked-settings-tabs li.active:hover{cursor:default}#cooked-settings-tabs a{line-height:41px;font-size:.9rem;letter-spacing:.03rem;padding:2px 15px 4px;display:block;outline:0;box-shadow:none;border:none;white-space:nowrap}#cooked-settings-panel.stuck{padding-top:41px}#cooked-settings-panel.stuck #cooked-settings-tabs{position:fixed;width:calc(100% - 180px);top:32px;left:0;z-index:100000;margin-left:160px}#cooked-settings-panel .cooked-settings-tab-content-wrapper .cooked-settings-tab-content{display:none}#cooked-settings-panel .cooked-settings-tab-content-wrapper .cooked-settings-tab-content:first-child{display:block}#cooked-settings-panel .cooked-settings-tab-content{padding:25px 35px;margin-right:0}#cooked-settings-panel #cooked_recipe_settings .recipe-setting-block h3.cooked-settings-title{padding-bottom:.2rem}#cooked_recipe_settings .cooked-setting-column-14{position:relative;width:25%;float:left;padding-right:20px;box-sizing:border-box}#cooked_recipe_settings .cooked-setting-column-13{position:relative;width:33%;float:left;padding-right:20px;box-sizing:border-box}#cooked_recipe_settings .cooked-setting-column-23{position:relative;width:66%;float:left;padding-right:20px;box-sizing:border-box}#cooked_recipe_settings .cooked-setting-column-12{position:relative;width:50%;float:left;padding-right:20px;box-sizing:border-box}#cooked_recipe_settings .cooked-setting-column-12 input[type=text],#cooked_recipe_settings .cooked-setting-column-13 input[type=text],#cooked_recipe_settings .cooked-setting-column-14 input[type=text],#cooked_recipe_settings .cooked-setting-column-23 input[type=text],#cooked_recipe_settings .recipe-setting-block input[type=text].cooked-shortcode-field{width:95%}#cooked_recipe_settings .cooked-setting-column-12 .cooked-select-wrapper,#cooked_recipe_settings .cooked-setting-column-12 select,#cooked_recipe_settings .cooked-setting-column-13 .cooked-select-wrapper,#cooked_recipe_settings .cooked-setting-column-13 select,#cooked_recipe_settings .cooked-setting-column-14 .cooked-select-wrapper,#cooked_recipe_settings .cooked-setting-column-14 select,#cooked_recipe_settings .cooked-setting-column-23 select{width:100%}#cooked_recipe_settings .cooked-setting-column-14.cooked-tb-col{padding:0}#cooked-welcome-screen{padding:15px 50px 0 30px;position:relative}#cooked-welcome-screen .cooked-badge{position:absolute;top:0;right:0}#cooked-welcome-screen .cooked-badge img{border:none;width:150px;height:150px;display:block;margin:0}#cooked-welcome-screen .about-text{margin-bottom:40px;line-height:1.8;font-size:17px;margin-right:260px}#cooked-welcome-screen .about-wrap{margin:25px auto 0;max-width:1000px}#cooked-welcome-screen .about-wrap h1{font-size:2.25rem}#cooked-welcome-screen .about-wrap p{font-size:1rem;margin:0 0 2rem;line-height:1.7rem}#cooked-welcome-screen #cooked-welcome-panel{background:#fff;padding:30px 30px 15px 30px;-moz-border-radius:15px;-webkit-border-radius:15px;border-radius:15px;border:none;box-shadow:0 4px 4px rgba(0,0,0,.05),0 8px 8px rgba(0,0,0,.05),0 32px 32px rgba(0,0,0,.05),0 64px 64px rgba(0,0,0,.05)}#cooked-welcome-screen #cooked-welcome-panel img.cooked-welcome-banner{border:none;display:block;padding:0;margin:0 0 30px;box-sizing:border-box;border-radius:5px 5px 0 0}#cooked-welcome-screen #cooked-welcome-panel .cooked-welcome-panel-intro{text-align:center;margin:0 50px 2rem;padding:15px 0;border-bottom:1px solid #e5e5e5}#cooked-welcome-screen #cooked-welcome-panel .cooked-welcome-panel-intro h1{font-size:1.75rem;margin:0 0 1rem;padding:0}#cooked-welcome-screen #cooked-welcome-panel .cooked-welcome-panel-intro p{max-width:600px;font-size:1.1rem;line-height:1.8rem;margin:0 auto 2rem;padding:0}#cooked-welcome-screen .cooked-welcome-panel a{text-decoration:none}#cooked-welcome-screen .cooked-welcome-panel-column{display:block!important}#cooked-welcome-screen .cooked-welcome-panel-column>strong{font-size:1rem}#cooked-welcome-screen .cooked-welcome-panel-column h3{font-size:1.75rem;margin:0 0 1rem;position:relative}#cooked-welcome-screen .cooked-welcome-panel-column h3 a{position:absolute;top:0;right:0;font-size:12px;font-weight:400}#cooked-welcome-screen .cooked-welcome-panel-column h3 a i.fa{position:relative;top:1px}#cooked-welcome-screen .cooked-welcome-panel-column h4{font-size:1.25rem;margin:0 0 1rem;position:relative}#cooked-welcome-screen .cooked-welcome-panel-column h4 a{position:absolute;top:0;right:0;font-size:12px;font-weight:400}#cooked-welcome-screen .cooked-welcome-panel-column h4 a i.fa{position:relative;top:1px}#cooked-welcome-screen .cooked-welcome-panel-column.cooked-welcome-panel-full{width:100%;padding-right:0;float:none}#cooked-welcome-screen .cooked-welcome-panel-column.cooked-welcome-panel-last{width:70%;padding-right:0;float:right}#cooked-welcome-screen .cooked-welcome-panel-column .fa-external-link{color:#888}#cooked-welcome-screen .cooked-welcome-panel-content{min-height:1px;padding:10px 50px 20px;margin:0}#cooked-welcome-screen .cooked-welcome-panel .cooked-welcome-panel-column-container{display:flex;justify-content:between!important;padding:0!important;flex-wrap:wrap}#cooked-welcome-screen .cooked-welcome-panel-column{box-sizing:border-box;padding-right:2rem;width:30%}#cooked-welcome-screen .cooked-pro-features{width:85%;margin:0 auto;padding:0 0 10px;display:flex;flex-wrap:wrap}#cooked-welcome-screen ul.cooked-whatsnew-list{margin-right:0}#cooked-welcome-screen ul.cooked-whatsnew-list li{line-height:1.7;position:relative;margin-right:0;border-top:1px solid #e5e5e5;padding:8px 0 4px 0}#cooked-welcome-screen ul.cooked-whatsnew-list li:first-child{border:none;padding-top:0}#cooked-welcome-screen ul.cooked-whatsnew-list em.fix,#cooked-welcome-screen ul.cooked-whatsnew-list strong.new,#cooked-welcome-screen ul.cooked-whatsnew-list strong.tweak{position:absolute;font-style:normal;display:inline-block;background:#aaa;text-transform:uppercase;top:11px;left:0;color:#fff;font-weight:600;-moz-border-radius:3px;-webkit-border-radius:3px;text-align:center;width:38px;border-radius:3px;font-size:10px;line-height:19px;height:19px;padding:0 6px;margin:0 6px 0 0}#cooked-welcome-screen ul.cooked-whatsnew-list li:first-child em.fix,#cooked-welcome-screen ul.cooked-whatsnew-list li:first-child strong.new,#cooked-welcome-screen ul.cooked-whatsnew-list li:first-child strong.tweak{top:3px}#cooked-welcome-screen ul.cooked-whatsnew-list strong.new{background:#56c477}#cooked-welcome-screen ul.cooked-whatsnew-list strong.tweak{background:#0073aa}#cooked-welcome-screen ul.cooked-whatsnew-list em.fix{background:#ffad10}#cooked-welcome-screen ul li.cooked-pro i.cooked-icon{color:#ffad10}#cooked-welcome-screen ul li.cooked-pro a{font-weight:600;color:#ffad10}#cooked-welcome-screen ul li.cooked-pro a:hover{color:#d3910f}#cooked-welcome-screen ul.cooked-whatsnew-pro{margin-bottom:0;flex:1 0 auto;width:33.333%}#cooked-welcome-screen ul.cooked-whatsnew-pro li{padding-left:0;font-size:1.15rem;font-weight:400}#cooked-welcome-screen ul.cooked-whatsnew-pro li i.cooked-icon-star{color:#ffad10;margin:0 7px 0 0;font-size:19px;position:relative;top:1px}#cooked-welcome-screen .cooked-welcome-bottom{text-align:center;background:#f9f9f9;margin:30px -80px -15px;border-top:1px solid #f1f1f1}#cooked-welcome-screen .cooked-pro-button{display:inline-block;clear:both;text-align:center;width:auto;margin:30px auto;padding:20px 25px 21px;font-size:1.25rem;line-height:1rem;font-weight:600;color:#fff;background:#ffad10;border-radius:50px}#cooked-welcome-screen .cooked-pro-button:hover{background:#e08704}#cooked-welcome-screen .cooked-coupon-code{color:#4c5e65;display:inline-block;font-size:17px;padding:0 0 0 1.5rem}@media screen and (max-width:1050px){#cooked-welcome-screen ul.cooked-whatsnew-pro{width:100%;margin-top:0}#cooked-welcome-screen ul.cooked-whatsnew-pro:first-child{margin-top:10px}#cooked-welcome-screen ul.cooked-whatsnew-pro li:first-child{border-top:1px solid #e5e5e5;padding-top:8px}#cooked-welcome-screen ul.cooked-whatsnew-pro:first-child li:first-child{border:none;padding-top:0}}@media screen and (max-width:870px){#cooked-welcome-screen .cooked-pro-features{width:90%}#cooked-welcome-screen .cooked-welcome-panel-column{padding-right:0}#cooked-welcome-screen .cooked-welcome-panel-column.cooked-welcome-panel-last{width:100%;padding-top:20px}#cooked-welcome-screen .about-wrap{margin-top:0}#cooked-welcome-screen .cooked-welcome-panel .cooked-welcome-panel-column li{display:block}}@media screen and (max-width:782px){#cooked-welcome-screen .cooked-pro-features{width:100%}#cooked-welcome-screen{padding:15px 40px 0 30px}#cooked-welcome-screen .cooked-badge{display:none}#cooked-welcome-screen .about-text,#cooked-welcome-screen .about-wrap h1{margin-right:0}#cooked-welcome-screen .cooked-welcome-panel-column h3 a{display:block;position:relative}}@media screen and (max-width:500px){#cooked-welcome-screen #cooked-welcome-panel img.cooked-welcome-banner{display:none}#cooked-welcome-screen .about-wrap h1{font-size:1.8rem}#cooked-welcome-screen .about-text{font-size:15px}}#cooked_recipe_settings #cooked-nutrition-label .cooked-nut-label,#cooked_recipe_settings .recipe-setting-block h3.cooked-settings-title{color:#0173aa}#cooked_recipe_settings .recipe-setting-block.cooked-danger h3.cooked-settings-title{color:#d44d1f}#cooked_recipe_settings .cooked-alert-block h3.cooked-settings-title{color:#c02a2a}#cooked-recipe-tabs{background:#fff}#cooked-recipe-tabs li{background:#454b52;color:#fff;color:rgba(255,255,255,.75);border-right:1px solid rgba(0,0,0,.15)}#cooked-recipe-tabs li:hover{background:#535a62;color:#fff;border-right:1px solid rgba(0,0,0,.15)}#cooked-recipe-tabs li.active{background:#fff;color:#333;border-right:1px solid #fff}#cooked-settings-tabs{background:#454b52}#cooked-settings-tabs a{color:#fff;text-decoration:none}#cooked-settings-tabs li{background:#454b52;color:#fff;color:rgba(255,255,255,.75)}#cooked-settings-tabs li:hover{background:#535a62;color:#fff}#cooked-settings-tabs li.active{background:#fff}#cooked-settings-tabs li.active a{color:#000}#cooked-directions-builder .cooked-direction-block>.cooked-direction-image .cooked-direction-img-placeholder,#cooked-migration-progress.cooked-progress .cooked-progress-bar,#cooked_recipe_settings .cooked-select-wrapper:before,#cooked_recipe_settings .cooked-tooltip-icon,#cooked_recipe_settings select{-webkit-transition:all .15s ease-out;-moz-transition:all .15s ease-out;transition:all .15s ease-out}#cooked-recipe-image-gallery .cooked-recipe-gallery-item{-webkit-transition:transform .15s ease-out;-moz-transition:all .15s ease-out;transition:transform .15s ease-out}#cooked-recipe-tabs li.cooked-loading{-webkit-transition:opacity .15s ease-out;-moz-transition:all .15s ease-out;transition:opacity .15s ease-out}@-webkit-keyframes cooked-wiggle{0%{-webkit-transform:scale(1)}50%{-webkit-transform:scale(1.03)}100%{-webkit-transform:scale(1)}}@-moz-keyframes cooked-wiggle{0%{-moz-transform:scale(1)}50%{-moz-transform:scale(1.03)}100%{-moz-transform:scale(1)}}@-o-keyframes cooked-wiggle{0%{-o-transform:scale(1)}50%{-o-transform:scale(1.03)}100%{-o-transform:scale(1)}}@keyframes cooked-wiggle{0%{transform:scale(1)}50%{transform:scale(1.03)}100%{transform:scale(1)}}@media screen and (max-width:1150px){#cooked-recipe-tabs li{font-size:.8rem;padding:0 1.2rem 0 .7rem}#cooked-recipe-tabs li .cooked-icon{display:none}}@media screen and (max-width:960px){#cooked_recipe_settings.stuck #cooked-recipe-tabs{margin-left:36px}}#cooked-ingredients-builder .cooked-ingredient-block>.cooked-substitution-fields{width:100%;float:left;clear:both;margin-top:10px;padding-top:10px;padding-right:0;padding-left:0;margin-left:0;box-sizing:border-box;padding-bottom:5px;position:relative}#cooked-ingredients-builder .cooked-ingredient-block>.cooked-substitution-fields .cooked-ingredient-amount{width:15%}#cooked-ingredients-builder .cooked-ingredient-block>.cooked-substitution-fields .cooked-ingredient-measurement{width:20%}#cooked-ingredients-builder .cooked-ingredient-block>.cooked-substitution-fields .cooked-ingredient-name{width:65%}#cooked-ingredients-builder .cooked-ingredient-block>.cooked-substitution-fields .cooked-sub-label{color:#7c7c7c;font-size:14px;font-weight:300}#cooked-ingredients-builder .cooked-ingredient-block>.cooked-substitution-fields>div{display:inline-block;float:left;box-sizing:border-box;padding-right:10px} \ No newline at end of file +.cooked-clearfix:after{content:"";display:table;clear:both}#post-body-content #postdivrich{display:none}body.post-type-cp_recipe .wp-list-table tfoot th.check-column,body.post-type-cp_recipe .wp-list-table thead th.check-column{padding:15px 0 0 7px}body.post-type-cp_recipe .wp-list-table tfoot td,body.post-type-cp_recipe .wp-list-table tfoot th,body.post-type-cp_recipe .wp-list-table thead td,body.post-type-cp_recipe .wp-list-table thead th{padding:10px 10px}body.post-type-cp_recipe .wp-list-table tfoot th.sortable a,body.post-type-cp_recipe .wp-list-table tfoot th.sorted a,body.post-type-cp_recipe .wp-list-table thead th.sortable a,body.post-type-cp_recipe .wp-list-table thead th.sorted a{padding-left:0;padding-right:0}body.post-type-cp_recipe .wp-list-table tbody th.check-column{padding:15px 0 0 10px}body.post-type-cp_recipe .wp-list-table tbody td,body.post-type-cp_recipe .wp-list-table tbody th{padding:12px 10px}body.post-type-cp_recipe .wp-list-table tbody td.column-title strong{margin-top:6px}body.post-type-cp_recipe .wp-list-table tbody td.column-title strong .row-title{padding-top:10px;font-size:1rem!important}th.column-featured_image{width:50px;text-align:center}td.column-featured_image{width:50px;text-align:center}.cooked-admin-recipes-list-image img{width:49px;height:auto;border-radius:3px;position:relative;top:3px}body.post-type-cp_recipe #titlediv #title{box-shadow:none;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:0 12px;font-weight:400;font-size:19px;letter-spacing:0;height:44px}body.post-type-cp_recipe #titlediv #title-prompt-text{font-size:15px;color:#888;font-weight:400;letter-spacing:0;padding:12px 15px}#cooked-settings-prewrap{display:flex;justify-content:center}#cooked-settings-wrap{position:relative;border-radius:10px;margin:40px 40px 40px 20px;max-width:1000px;min-width:1000px;background:#fff;box-shadow:0 4px 4px rgba(0,0,0,.05),0 8px 8px rgba(0,0,0,.05),0 32px 32px rgba(0,0,0,.05),0 64px 64px rgba(0,0,0,.05)}#cooked-settings-wrap.is-stuck{position:static!important}#cooked-settings-wrap .cooked-settings-update-button{position:absolute;top:30px;right:30px}#cooked-settings-wrap .cooked-settings-update-button>.button-primary{box-shadow:none;border:none}#cooked-settings-wrap.is-stuck .cooked-settings-update-button{position:fixed;top:40px;right:11px;z-index:100001}#cooked_recipe_settings .hndle,#cooked_recipe_settings button.handlediv{display:none}#cooked_recipe_settings .inside{padding:0;margin:0}#cooked-recipe-tabs{list-style:none;padding:0;margin:0;position:absolute;top:0;left:0;width:100%}#cooked-recipe-tabs li{font-size:.9rem;line-height:3rem;height:3rem;font-weight:500;display:inline-block;padding:0 1.25rem;margin:0;color:#fff}#cooked-recipe-tabs li:hover{cursor:pointer}#cooked-recipe-tabs li.active,#cooked-recipe-tabs li.active:hover{cursor:default}#cooked-recipe-tabs li:last-child{border-right:none!important}#cooked-recipe-tabs li.cooked-loading{opacity:0;background:0 0;color:#fff;position:absolute;top:0;right:0;cursor:default;font-size:14px;width:40px;height:40px;text-align:center;display:block;line-height:40px;padding:0}#cooked-recipe-tabs li.cooked-loading:hover{background:0 0;color:#fff}#cooked_recipe_settings.cooked-loading #cooked-recipe-tabs li.cooked-loading{opacity:1}#cooked_recipe_settings .inside{padding-top:41px}#cooked_recipe_settings.stuck #cooked-recipe-tabs{position:fixed;width:auto;top:32px;left:23px;z-index:100000;margin-left:160px;box-shadow:0 3px 50px rgba(0,0,0,.25)}#cooked_recipe_settings.stuck #cooked-recipe-tabs li.cooked-loading{right:160px}.cooked-recipe-tab-content-wrapper .cooked-recipe-tab-content{display:none}.cooked-recipe-tab-content-wrapper .cooked-recipe-tab-content:first-child{display:block}.cooked-left{float:left;display:inline-block;width:auto}.cooked-right{float:right;display:inline-block;width:auto}#cooked_field--cooked_pro_license_key{font-family:monospace}#cooked_recipe_settings .cooked-bm-5{margin-bottom:5px!important}#cooked_recipe_settings .cooked-bm-10{margin-bottom:10px!important}#cooked_recipe_settings .cooked-tm-10{margin-top:10px!important}#cooked_recipe_settings .cooked-bm-15{margin-bottom:15px!important}#cooked_recipe_settings .cooked-bm-20{margin-bottom:20px!important}#cooked_recipe_settings .cooked-bm-30{margin-bottom:30px!important}#cooked_recipe_settings .cooked-bm-5-up{margin-bottom:-5px!important}#cooked_recipe_settings .cooked-bm-10-up{margin-bottom:-10px!important}#cooked_recipe_settings .cooked-bm-15-up{margin-bottom:-15px!important}#cooked_recipe_settings .cooked-bm-20-up{margin-bottom:-20px!important}#cooked_recipe_settings .cooked-bm-30-up{margin-bottom:-30px!important}#cooked_recipe_settings .cooked-hr{border:none;border-top:2px solid #ddd;margin:10px 0 0 0;padding:15px 0 0 0}#cooked_recipe_settings .cooked-conditional-hidden{display:none}#cooked_recipe_settings .cooked-recipe-tab-content{padding:23px 30px 15px 30px}#cooked_recipe_settings .recipe-setting-block{margin:0 0 20px;width:100%}#cooked_recipe_settings .recipe-setting-block p{font-size:.9rem;line-height:1.5rem;margin:0 0 1rem;padding:0}#cooked_recipe_settings .recipe-setting-block p.cooked-padded{line-height:1.75rem;font-size:.85rem}#cooked_recipe_settings .recipe-setting-block .cooked-conditional-hidden{padding:0}#cooked_recipe_settings textarea{width:100%;height:75px;padding:15px;box-sizing:border-box;position:relative;top:5px}#cooked_recipe_settings .recipe-setting-block>label.cooked-select-label{top:5px}#cooked_recipe_settings select{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-shadow:none;border-radius:3px;padding:0 45px 0 9px;line-height:31px;height:33px;box-sizing:border-box;background:#fff}#cooked_recipe_settings .cooked-select-wrapper{background:#fff;position:relative;width:auto;display:inline-block;border-radius:3px;margin:0 5px 0 0}#cooked_recipe_settings .cooked-select-wrapper select{margin:0;background:0 0;position:relative}#cooked_recipe_settings .cooked-select-wrapper:before{font-family:CookedIcons;display:block;width:15px;height:15px;line-height:14px;color:#000;font-size:14px;content:"\f00b";position:absolute;right:12px;top:11px;color:rgba(0,0,0,.3)}#cooked_recipe_settings .cooked-select-wrapper:hover:before{color:#000}#cooked_recipe_settings .cooked-select-wrapper:hover select{border-color:#ccc}#cooked_recipe_settings .cooked-checkbox-radio-label{position:relative;left:1px}#cooked_recipe_settings .recipe-setting-block input[type=checkbox],#cooked_recipe_settings .recipe-setting-block input[type=radio]{margin-top:0}#cooked_recipe_settings .recipe-setting-block input[type=number]{width:65px}#cooked_recipe_settings .recipe-setting-block input[type=password],#cooked_recipe_settings .recipe-setting-block input[type=text]{width:75%}#cooked_recipe_settings .recipe-setting-block input[type=number],#cooked_recipe_settings .recipe-setting-block input[type=password],#cooked_recipe_settings .recipe-setting-block input[type=text]{margin:0 6px 5px 0;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;height:33px;box-shadow:none;position:relative;top:2px;padding:0 10px}#cooked_recipe_settings .recipe-setting-block p.cooked-measurement-inputs .cooked-measurement-column{width:43%;margin-right:3%;display:inline-block}#cooked_recipe_settings .recipe-setting-block p.cooked-measurement-inputs .cooked-select-wrapper,#cooked_recipe_settings .recipe-setting-block p.cooked-measurement-inputs input,#cooked_recipe_settings .recipe-setting-block p.cooked-measurement-inputs label{width:100%;display:block}#cooked_recipe_settings .recipe-setting-block p.cooked-measurement-inputs .cooked-select-wrapper select{width:100%}#cooked_recipe_settings .recipe-setting-block input[type=number],#cooked_recipe_settings .recipe-setting-block input[type=password].cooked-small-textfield,#cooked_recipe_settings .recipe-setting-block input[type=text].cooked-small-textfield{width:150px}#cooked_recipe_settings small{display:block;line-height:1.5;font-size:12px;color:#888;padding:10px 0 0}#cooked_recipe_settings .recipe-setting-block em{color:#aaa}#cooked_recipe_settings .recipe-setting-block,#cooked_recipe_settings .recipe-setting-block .cooked-repositioned{display:block;position:relative;box-sizing:border-box;line-height:1}#cooked_recipe_settings .recipe-setting-block .cooked-repositioned{padding-left:157px}#cooked_recipe_settings .recipe-setting-block h3.cooked-settings-title{width:70%;position:relative;z-index:2;padding:.5rem 0 .5rem;margin:0;font-size:1rem;line-height:1.5rem;font-weight:600}#cooked_recipe_settings .recipe-setting-block strong.cooked-heading{font-size:14px}#cooked_recipe_settings .recipe-setting-block .cooked-repositioned>label{position:absolute;top:1px;left:0;width:147px;cursor:default;font-weight:600}#cooked_recipe_settings .recipe-setting-block .cooked-tooltip-icon{color:#aaa;cursor:help;display:inline-block;margin-left:10px}#cooked_recipe_settings .recipe-setting-block .cooked-tooltip-icon:hover{color:#eee}#cooked_recipe_settings .recipe-setting-block .cooked-repositioned>.cooked-checkbox-radio-label{top:7px}#cooked_recipe_settings .recipe-setting-block .cooked-repositioned>label{top:auto;height:33px;line-height:30px;padding:0;width:130px}#cooked_recipe_settings .recipe-setting-block .cooked-repositioned:first-child label:first-child{padding-top:12px;margin-top:-12px}#cooked_recipe_settings .recipe-setting-block .cooked-repositioned span.cooked-padded{padding:0 0 15px;display:block;line-height:1.9}#cooked_recipe_settings .recipe-setting-block .wp-picker-container .cooked-color-field.wp-color-picker{padding:5px;height:25px;top:0;margin:0;width:74px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;border:1px solid #ccc}#cooked_recipe_settings .recipe-setting-block input[type=text].cooked-shortcode-field{font-family:monospace;background:#f5f5f5;font-size:12px}#cooked_recipe_settings .cooked-banner-block{margin:30px -30px -17px;display:block;box-sizing:content-box;padding:10px 30px 15px;background:#f9f9f9;width:100%;border-top:1px solid #e5e5e5}#cooked_recipe_settings .cooked-advanced-options-hr{border:none;border-bottom:1px solid #ddd;height:1px;padding:10px 0 0 0;margin:0 0 20px}#cooked_recipe_settings .recipe-setting-block input.cooked-time-picker{top:0;width:100%;padding-right:70%;margin:0 0 3px}#cooked_recipe_settings .recipe-setting-block .cooked-time-picker-text{position:absolute;bottom:13px;right:40px;color:#888}#cooked_recipe_settings .cooked-alert-block{background:#fffbdc;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;margin:10px 0 15px;padding:10px 22px 2px;border:2px solid #ece8c4}#cooked_recipe_settings .recipe-setting-block.cooked-template{display:none}#cooked_recipe_settings ul.cooked-admin-ul{font-size:.9rem;margin:0 0 1rem 2rem;list-style:disc}#cooked_recipe_settings ul.cooked-admin-ul li{font-size:.9rem;padding:0;margin:0 0 .5rem}#cooked_recipe_settings .cooked-html-block{background:#fff;width:auto;min-width:300px;display:inline-block;padding:.5rem 1.3rem .25rem;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.15)}#cooked_recipe_settings .recipe-setting-block .cooked-html-block h3.cooked-settings-title{width:100%;color:#333}#cooked_recipe_settings .recipe-setting-block .cooked-html-block.valid{background:#fff;border:2px solid #0aa780;box-shadow:none;border-radius:5px}#cooked_recipe_settings .recipe-setting-block .cooked-html-block.valid>.cooked-settings-title{color:#0aa780}#cooked_recipe_settings .recipe-setting-block .cooked-html-block.expired{border:2px solid #ca4a20}#cooked-directions-builder .cooked-direction-block.cooked-expanded>.cooked-heading-name,#cooked-directions-builder .cooked-direction-block.cooked-has-heading-element>.cooked-heading-name,#cooked-directions-builder .cooked-direction-block:hover>.cooked-heading-name,#cooked-ingredients-builder .cooked-ingredient-block.cooked-expanded>.cooked-heading-name,#cooked-ingredients-builder .cooked-ingredient-block.cooked-has-heading-element>.cooked-heading-name,#cooked-ingredients-builder .cooked-ingredient-block:hover>.cooked-heading-name{padding-right:32px}#cooked-directions-builder .cooked-direction-block .cooked-show-heading-element,#cooked-ingredients-builder .cooked-ingredient-block .cooked-show-heading-element{opacity:0;cursor:pointer;font-size:14px;position:absolute;top:14px;right:35px}#cooked-directions-builder .cooked-direction-block .cooked-show-heading-element .cooked-icon,#cooked-ingredients-builder .cooked-ingredient-block .cooked-show-heading-element .cooked-icon{color:#888}#cooked-directions-builder .cooked-direction-block.cooked-expanded .cooked-show-heading-element,#cooked-directions-builder .cooked-direction-block.cooked-has-heading-element .cooked-show-heading-element,#cooked-directions-builder .cooked-direction-block:hover .cooked-show-heading-element,#cooked-ingredients-builder .cooked-ingredient-block.cooked-expanded .cooked-show-heading-element,#cooked-ingredients-builder .cooked-ingredient-block.cooked-has-heading-element .cooked-show-heading-element,#cooked-ingredients-builder .cooked-ingredient-block:hover .cooked-show-heading-element{opacity:1}#cooked-directions-builder .cooked-direction-block .cooked-show-heading-element .cooked-icon:hover,#cooked-directions-builder .cooked-direction-block.cooked-expanded .cooked-show-heading-element .cooked-icon,#cooked-directions-builder .cooked-direction-block.cooked-has-heading-element .cooked-show-heading-element .cooked-icon,#cooked-ingredients-builder .cooked-ingredient-block .cooked-show-heading-element .cooked-icon:hover,#cooked-ingredients-builder .cooked-ingredient-block.cooked-expanded .cooked-show-heading-element .cooked-icon,#cooked-ingredients-builder .cooked-ingredient-block.cooked-has-heading-element .cooked-show-heading-element .cooked-icon{color:#0685ba}#cooked-directions-builder .cooked-direction-block>.cooked-heading-element,#cooked-ingredients-builder .cooked-ingredient-block>.cooked-heading-element{display:none;width:65%;float:right;margin-top:4px;padding-right:32px}#cooked-directions-builder .cooked-direction-block>.cooked-heading-element select,#cooked-ingredients-builder .cooked-ingredient-block>.cooked-heading-element select{color:#0685ba;width:100%}#cooked-directions-builder .cooked-direction-block>.cooked-heading-element label,#cooked-ingredients-builder .cooked-ingredient-block>.cooked-heading-element label{font-weight:600}#cooked-directions-builder .cooked-direction-block.cooked-expanded>.cooked-heading-element,#cooked-ingredients-builder .cooked-ingredient-block.cooked-expanded>.cooked-heading-element{display:block}#cooked-ingredients-builder .cooked-ingredient-block .cooked-show-substitution{opacity:0;cursor:pointer;font-size:14px;position:absolute;top:15px;right:58px}#cooked-ingredients-builder .cooked-ingredient-block .cooked-show-substitution .cooked-icon{color:#888}#cooked-ingredients-builder .cooked-ingredient-block.cooked-expanded .cooked-show-substitution,#cooked-ingredients-builder .cooked-ingredient-block.cooked-has-substitution .cooked-show-substitution,#cooked-ingredients-builder .cooked-ingredient-block:hover .cooked-show-substitution{opacity:1;right:50px}#cooked-ingredients-builder .cooked-ingredient-block .cooked-show-substitution .cooked-icon:hover,#cooked-ingredients-builder .cooked-ingredient-block.cooked-expanded .cooked-show-substitution .cooked-icon,#cooked-ingredients-builder .cooked-ingredient-block.cooked-has-substitution .cooked-show-substitution .cooked-icon{color:#0685ba}#cooked-ingredients-builder .cooked-ingredient-block.cooked-expanded>.cooked-ingredient-name,#cooked-ingredients-builder .cooked-ingredient-block.cooked-has-substitution>.cooked-ingredient-name,#cooked-ingredients-builder .cooked-ingredient-block:hover>.cooked-ingredient-name{padding-right:32px}#cooked_recipe_settings .switchery-small,body.post-type-cp_recipe .switchery-small{height:1rem;width:1.75rem;border-radius:1rem;margin-right:.4rem}#cooked_recipe_settings .switchery-small>small,body.post-type-cp_recipe .switchery-small>small{width:1rem;height:1rem;padding:0}.cooked-tooltip-buttons .cooked-icon-spin{margin-top:10px;font-size:15px}.cooked-tooltip-buttons .cooked-saved-default{height:28px;line-height:28px;font-weight:700;font-size:15px;color:#888}.cooked-progress{display:none;position:relative;background:#eee;width:100%;height:6px;padding:0;border-radius:3px;margin:10px 0 0 0}.cooked-progress-text{display:none;font-size:10px;color:#aaa;padding:2px 0 5px}.cooked-progress-text.cooked-active,.cooked-progress.cooked-active{display:block}.cooked-progress .cooked-progress-bar{display:block;position:absolute;background:#0085ba;width:0%;height:6px;top:0;left:0;border-radius:3px}#cooked-import-progress.cooked-progress,#cooked-migration-progress.cooked-progress{background:#ccc;margin:25px 0 0 0;border-radius:6px;height:12px;max-width:600px}#cooked-import-progress.cooked-progress .cooked-progress-bar,#cooked-migration-progress.cooked-progress .cooked-progress-bar{border-radius:6px;height:12px}#cooked-import-progress-text.cooked-progress-text,#cooked-migration-progress-text.cooked-progress-text{font-size:11px;color:#888;max-width:600px}#cooked-import-completed,#cooked-migration-completed{display:none}#cooked-import-completed.cooked-active,#cooked-migration-completed.cooked-active{display:block}#cooked-csv-import-progress.cooked-progress{background:#ccc;margin:25px 0 0 0;border-radius:6px;height:12px;max-width:600px}#cooked-csv-import-progress.cooked-progress .cooked-progress-bar{border-radius:6px;height:12px}#cooked-csv-import-progress-text.cooked-progress-text{font-size:11px;color:#888;max-width:600px}#cooked-csv-import-completed{display:none}#cooked-csv-import-completed.cooked-active{display:block}#cooked-csv-import-form{max-width:100%;box-sizing:border-box}#cooked-csv-import-form input[type=file]{max-width:100%;box-sizing:border-box;width:100%}#cooked-csv-import-errors{max-width:100%;box-sizing:border-box;word-wrap:break-word}#cooked_recipe_settings .cooked-layout-save-default{position:relative;top:-2px;z-index:10;margin:0 0 0 15px;padding:0 8px 1px}#cooked_recipe_settings .cooked-layout-load-default{position:relative;top:-2px;z-index:10;margin:0 0 0 10px;padding:0 8px 1px}body .button.button-cooked-reset{color:#999}body .button.button-cooked-reset:hover{color:#555}#cooked_recipe_settings .cooked-ingredient-headers{display:block;padding:5px 25px 0 35px}#cooked_recipe_settings .cooked-ingredient-headers span{font-size:.7rem;font-weight:700;letter-spacing:.03rem;text-transform:uppercase;color:#0085ba;box-sizing:border-box;display:inline-block;float:left}#cooked_recipe_settings .cooked-ingredient-headers span.cooked-ingredient-header-amount{width:15%}#cooked_recipe_settings .cooked-ingredient-headers span.cooked-ingredient-header-measurement{width:20%}#cooked_recipe_settings .cooked-ingredient-headers span.cooked-ingredient-header-item{width:65%}#cooked-ingredients-builder{margin:0 0 20px}#cooked-ingredients-builder .cooked-ingredient-block{display:block;padding:5px 45px 5px 35px}#cooked-ingredients-builder .cooked-ingredient-block:hover{background:#eee}#cooked-ingredients-builder .cooked-ingredient-block input[type=number],#cooked-ingredients-builder .cooked-ingredient-block input[type=text],#cooked-ingredients-builder .cooked-ingredient-block select{margin:0;display:block;top:0}#cooked-ingredients-builder .cooked-ingredient-block>div{display:inline-block;float:left;box-sizing:border-box;padding-right:10px}#cooked-ingredients-builder .cooked-ingredient-block>div input[type=text]{width:100%}#cooked-ingredients-builder .cooked-ingredient-block>.cooked-ingredient-amount{width:15%}#cooked-ingredients-builder .cooked-ingredient-block>.cooked-ingredient-measurement{width:20%}#cooked-ingredients-builder .cooked-ingredient-block>.cooked-ingredient-measurement .cooked-select-wrapper{width:100%}#cooked-ingredients-builder .cooked-ingredient-block>.cooked-ingredient-measurement .cooked-select-wrapper select{width:100%}#cooked-ingredients-builder .cooked-ingredient-block .cooked-substitution-fields>.cooked-ingredient-measurement .cooked-select-wrapper{width:100%}#cooked-ingredients-builder .cooked-ingredient-block .cooked-substitution-fields>.cooked-ingredient-measurement .cooked-select-wrapper select{width:100%}#cooked-ingredients-builder .cooked-ingredient-block>.cooked-ingredient-name{width:65%}#cooked-ingredients-builder .cooked-ingredient-block>.cooked-heading-name{width:100%}#cooked-ingredients-builder .cooked-ingredient-block>div small.cooked-input-ex{display:block;padding:5px 0 0 2px}#cooked-ingredients-builder .cooked-ingredient-block{margin:0}#cooked-ingredients-builder .cooked-ingredient-block i.cooked-icon-drag{cursor:move;color:#ccc;font-size:32px;position:absolute;top:5px;left:1px}#cooked-ingredients-builder .cooked-ingredient-block:hover i.cooked-icon-drag{color:#888}#cooked-ingredients-builder .cooked-ingredient-block.ui-sortable-helper{background:#f5f5f5;box-shadow:0 10px 20px rgba(0,0,0,.15);-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}#cooked-ingredients-builder .cooked-ingredient-block.ui-sortable-placeholder{visibility:visible!important;background:#eee;display:block;width:100%;height:43px;border-top:6px solid #fff;border-bottom:6px solid #fff}#cooked-ingredients-builder .cooked-ingredient-block .cooked-delete-ingredient{cursor:pointer;font-size:14px;position:absolute;top:14px;right:11px}#cooked-ingredients-builder .cooked-ingredient-block .cooked-delete-ingredient .cooked-icon{color:#fff}#cooked-ingredients-builder .cooked-ingredient-block:hover .cooked-delete-ingredient .cooked-icon{color:#888}#cooked-ingredients-builder .cooked-ingredient-block .cooked-delete-ingredient .cooked-icon:hover{color:#de2020}#cooked-ingredients-builder .cooked-ingredient-block.cooked-ingredient-heading{margin:10px 0}#cooked-ingredients-builder .cooked-ingredient-block.cooked-ingredient-heading>div input[type=text]{padding:0 7px;font-size:16px;background:#f9f9f9;font-weight:600}#cooked-directions-builder{margin:0 0 20px}#cooked-directions-builder .cooked-direction-block{display:block;padding:15px 25px 15px 35px}#cooked-directions-builder .cooked-direction-block.cooked-direction-heading{padding:5px 25px 5px 35px}#cooked-directions-builder .cooked-direction-block:hover{background:#f5f5f5}#cooked-directions-builder .cooked-direction-block.cooked-direction-heading:hover{background:#eee}#cooked-directions-builder .cooked-direction-block textarea{margin:0;display:block;height:191px;top:0}#cooked-directions-builder .cooked-direction-block>div{display:inline-block;float:left;box-sizing:border-box;padding-right:15px}#cooked-directions-builder .cooked-direction-block>div:last-child{padding:0}#cooked-directions-builder .cooked-direction-block>div input[type=text]{width:100%}#cooked-directions-builder .cooked-direction-block .mce-statusbar{display:none}#cooked-directions-builder .cooked-direction-block>.cooked-direction-image{width:120px;position:absolute;top:15px;left:35px}#cooked-directions-builder .cooked-direction-block>.cooked-direction-image img{cursor:pointer;display:none;border-radius:3px}#cooked-directions-builder .cooked-direction-block>.cooked-direction-image .cooked-direction-img-placeholder{box-sizing:border-box;cursor:pointer;border-radius:3px;width:100%;padding-bottom:100%;background:0 0;border:2px dashed #ddd;border-radius:3px;margin-top:15px}#cooked-directions-builder .cooked-direction-block:hover>.cooked-direction-image .cooked-direction-img-placeholder{background:0 0}#cooked-directions-builder .cooked-direction-block>.cooked-direction-image .cooked-direction-img-placeholder:hover{background:#ddd;border:2px solid #ddd}#cooked-directions-builder .cooked-direction-block>.cooked-direction-image .direction-image-button{width:100%;text-align:center}#cooked-directions-builder .cooked-direction-block>.cooked-direction-image .remove-image-button{display:none;position:absolute;top:43px;right:15px}#cooked-directions-builder .cooked-direction-block>.cooked-direction-image.cooked-has-image .remove-image-button{display:inline-block;padding:10px;background:rgba(0,0,0,.25);color:#fff}#cooked-directions-builder .cooked-direction-block>.cooked-direction-image.cooked-has-image .remove-image-button:hover{background:#ff0100}#cooked-directions-builder .cooked-direction-block>.cooked-direction-image.cooked-has-image img{width:100%;height:auto;display:block;margin:15px 0 0}#cooked-directions-builder .cooked-direction-block>.cooked-direction-image.cooked-has-image .cooked-direction-img-placeholder{display:none}#cooked-directions-builder .cooked-direction-block>.cooked-direction-content{width:100%;padding-left:120px}#cooked-directions-builder .cooked-direction-block>.cooked-heading-name{width:100%}#cooked-directions-builder .cooked-direction-block{margin:0}#cooked-directions-builder .cooked-direction-block i.cooked-icon-drag{cursor:move;color:#ccc;font-size:32px;position:absolute;top:13px;left:1px}#cooked-directions-builder .cooked-direction-block.cooked-direction-heading i.cooked-icon-drag{top:5px}#cooked-directions-builder .cooked-direction-block:hover i.cooked-icon-drag{color:#888}#cooked-directions-builder .cooked-direction-block.ui-sortable-helper{background:#f5f5f5;box-shadow:0 10px 20px rgba(0,0,0,.15);-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}#cooked-directions-builder .cooked-direction-block.ui-sortable-placeholder{visibility:visible!important;background:#eee;display:block;width:100%;height:221px;border-top:6px solid #fff;border-bottom:6px solid #fff}#cooked-directions-builder .cooked-direction-block.cooked-direction-heading.ui-sortable-placeholder{height:43px}#cooked-directions-builder .cooked-direction-block .cooked-delete-direction{cursor:pointer;font-size:14px;position:absolute;right:14px}#cooked-directions-builder .cooked-direction-block .cooked-delete-direction .cooked-icon{color:#fff}#cooked-directions-builder .cooked-direction-block:hover .cooked-delete-direction .cooked-icon{color:#888}#cooked-directions-builder .cooked-direction-block .cooked-delete-direction .cooked-icon:hover{color:#de2020}#cooked-directions-builder .cooked-direction-block.cooked-direction-heading{margin:10px 0}#cooked-directions-builder .cooked-direction-block.cooked-direction-heading>div input[type=text]{padding:0 7px;font-size:16px;background:#f9f9f9;font-weight:600;top:0;margin:0}#cooked-directions-builder .cooked-direction-block .cooked-delete-direction{top:16px}#cooked-directions-builder .cooked-direction-block.cooked-direction-heading .cooked-delete-direction{top:14px}#cooked-recipe-image-gallery{margin:0 -1% 0}#cooked-recipe-image-gallery .cooked-recipe-gallery-item{position:relative;overflow:hidden;cursor:move;box-sizing:border-box;display:inline-block;width:18%;height:auto;padding:0;margin:0 1% 2% 1%}#cooked-recipe-image-gallery .cooked-recipe-gallery-item:hover{opacity:.9}#cooked-recipe-image-gallery .cooked-recipe-gallery-item img{width:100%;height:auto;border-radius:3px;display:block;margin:0;padding:0;border:none}#cooked-recipe-image-gallery .cooked-recipe-gallery-item.ui-sortable-helper,#cooked-recipe-image-gallery .cooked-recipe-gallery-item.ui-sortable-helper:hover{opacity:.75;box-shadow:0 10px 20px rgba(0,0,0,.15)}#cooked-recipe-image-gallery .cooked-recipe-gallery-item.ui-sortable-placeholder{width:18%;height:auto;visibility:visible!important;border-radius:3px;background:#ddd;display:inline-block}#cooked-recipe-image-gallery .cooked-recipe-gallery-item .remove-image-button{border-radius:0 3px 0 0;display:inline-block;position:absolute;top:0;right:0;padding:10px;background:rgba(0,0,0,.25);color:#fff}#cooked-recipe-image-gallery .cooked-recipe-gallery-item .remove-image-button:hover{background:#ff0100}#cooked-recipe-image-gallery .cooked-recipe-gallery-item .cooked-gallery-edit-button{border-radius:3px 0 0 0;display:inline-block;position:absolute;top:0;left:0;padding:10px;background:rgba(0,0,0,.25);color:#fff}#cooked-recipe-image-gallery .cooked-recipe-gallery-item .cooked-gallery-edit-button:hover{background:#0084bc}#cooked-recipe-image-gallery .cooked-recipe-gallery-item .cooked-gallery-item-title{position:absolute;left:0;bottom:0;box-sizing:border-box;width:100%;border-radius:0 0 3px 3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;padding:10px 10px 11px;text-align:center;background:#000;background:rgba(0,0,0,.3);color:#fff;font-size:12px}#cooked-recipe-image-gallery .cooked-recipe-gallery-item:hover .cooked-gallery-item-title{background:#000;background:rgba(0,0,0,.75)}#cooked-recipe-image-gallery .cooked-recipe-gallery-item.ui-sortable-helper{-webkit-animation:cooked-wiggle .4s infinite;-moz-animation:cooked-wiggle .4s infinite;-o-animation:cooked-wiggle .4s infinite;animation:cooked-wiggle .4s infinite}#cooked_recipe_settings label.cooked-nutrition-label{display:block;font-size:.7rem;letter-spacing:.03rem;font-weight:700;text-transform:uppercase;line-height:1;margin:0 0 7px}#cooked_recipe_settings #cooked-nutrition-label{line-height:1.6;font-size:1.1rem;border:1px solid #aaa;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:5%;margin:0 0 2rem;font-family:Helvetica,Arial,sans-serif;container-name:nutrition-label;container-type:inline-size}#cooked_recipe_settings #cooked-nutrition-label h2{font-size:2.5rem;line-height:1;letter-spacing:0;font-weight:800;padding:0 0 .5rem 0;margin:0 0 .4rem;color:#333;border-bottom:1px solid #aaa}#cooked_recipe_settings #cooked-nutrition-label p.cooked-daily-value-text{padding:.5rem 0 0 0;margin:0;font-size:.9rem}#cooked_recipe_settings #cooked-nutrition-label ul.cooked-nut-servings p{font-size:1.5rem}#cooked_recipe_settings #cooked-nutrition-label ul{list-style:none;margin:0;padding:0}#cooked_recipe_settings #cooked-nutrition-label li{position:relative;margin:0;padding:0 0 3px 0;border-top:1px solid #aaa}#cooked_recipe_settings #cooked-nutrition-label li li{padding:3px 0 0;margin:3px 0 0}#cooked_recipe_settings #cooked-nutrition-label li:after{content:"";display:table;clear:both}#cooked_recipe_settings #cooked-nutrition-label li.no-after:after{content:none}#cooked_recipe_settings #cooked-nutrition-label li.cooked-nut-spacer{border:none;height:.6rem;padding:0;background:#333}#cooked_recipe_settings #cooked-nutrition-label ul li.cooked-nut-no-border,#cooked_recipe_settings #cooked-nutrition-label>ul>li:first-child{border:none}#cooked_recipe_settings #cooked-nutrition-label li ul{padding:0;margin:0 0 0 20px}#cooked_recipe_settings #cooked-nutrition-label li ul.cooked-right{margin:0}#cooked_recipe_settings #cooked-nutrition-label li ul.cooked-right li{border:none;padding:0;margin:0}#cooked_recipe_settings #cooked-nutrition-label li.cooked-calories ul.cooked-right li strong.cooked-nut-label{font-size:2.5rem;line-height:1}#cooked_recipe_settings #cooked-nutrition-label .cooked-calories{border-top:none;display:flex;justify-content:space-between;align-items:baseline;padding:0}#cooked_recipe_settings #cooked-nutrition-label .cooked-calories strong,#cooked_recipe_settings #cooked-nutrition-label .cooked-calories strong.cooked-nut-label{font-size:2rem;font-weight:800}#cooked_recipe_settings #cooked-nutrition-label ul.cooked-nut-servings li{border:none}#cooked_recipe_settings #cooked-nutrition-label ul.cooked-nut-servings{margin:0}#cooked_recipe_settings #cooked-nutrition-label .cooked-nut-hr{border:none;border-top:1.3rem solid #333;margin:.1rem 0 0;padding:0}#cooked_recipe_settings #cooked-nutrition-label strong{font-weight:800}#cooked_recipe_settings #cooked-nutrition-label .cooked-serving-size strong,#cooked_recipe_settings #cooked-nutrition-label .cooked-serving-size strong.cooked-nut-label{font-size:1.5rem;font-weight:800}#cooked_recipe_settings #cooked-nutrition-label strong.cooked-nut-heading{font-size:1rem}#cooked_recipe_settings #cooked-nutrition-label strong.cooked-nut-label{font-weight:400}#cooked_recipe_settings #cooked-nutrition-label .cooked-nut-right{float:right}#cooked_recipe_settings #cooked-nutrition-label ul.cooked-nut-bottom{margin:0 0 .75rem}#cooked_recipe_settings #cooked-nutrition-label ul.cooked-nut-bottom li{border-top:none;border-bottom:1px solid #aaa;float:left;width:100%;box-sizing:border-box}#cooked_recipe_settings .cooked-measurement-inputs .cooked-select-wrapper:before{top:8px}.cooked-auto-nutrition{display:flex;justify-content:end;margin:0 0 1rem}#cooked-tooltip-auto-nutrition-notice{margin:0}.cooked-settings-header{border-radius:10px 10px 0 0;width:auto;height:90px;line-height:85px;padding:0 30px;font-weight:600;box-sizing:border-box;background:#33373c;color:#fff;font-size:29px;letter-spacing:-.03rem}.cooked-settings-header .cooked-icon{color:#00e0a9}.cooked-settings-submit-wrap{padding:0 0 35px 35px;margin:-20px 0 0}#cooked_recipe_settings .recipe-setting-block .cooked-permalink-field-wrapper span{font-size:14px;display:inline-block;line-height:32px;padding:5px 0 0 0}#cooked_recipe_settings .recipe-setting-block input[type=text].cooked-permalink-field{position:relative;top:0;display:inline-block;width:150px;margin:0 10px}#cooked-settings-panel{position:relative;margin:0;padding:0}#cooked-settings-tabs{display:flex;width:auto;padding:0 20px 0 0;margin:0;list-style:none}#cooked-settings-tabs li{font-size:13px;line-height:1;font-weight:400;display:block;padding:0;margin:0;color:#fff}#cooked-settings-tabs li .cooked-icon{font-size:14px}#cooked-settings-tabs li .cooked-icon.cooked-icon-recipe-icon{font-size:20px;top:2px;position:relative}#cooked-settings-tabs li:hover{cursor:pointer}#cooked-settings-tabs li.active,#cooked-settings-tabs li.active:hover{cursor:default}#cooked-settings-tabs a{line-height:41px;font-size:.9rem;letter-spacing:.03rem;padding:2px 15px 4px;display:block;outline:0;box-shadow:none;border:none;white-space:nowrap}#cooked-settings-panel.stuck{padding-top:41px}#cooked-settings-panel.stuck #cooked-settings-tabs{position:fixed;width:calc(100% - 180px);top:32px;left:0;z-index:100000;margin-left:160px}#cooked-settings-panel .cooked-settings-tab-content-wrapper .cooked-settings-tab-content{display:none}#cooked-settings-panel .cooked-settings-tab-content-wrapper .cooked-settings-tab-content:first-child{display:block}#cooked-settings-panel .cooked-settings-tab-content{padding:25px 35px;margin-right:0}#cooked-settings-panel #cooked_recipe_settings .recipe-setting-block h3.cooked-settings-title{padding-bottom:.2rem}#cooked_recipe_settings .cooked-setting-column-14{position:relative;width:25%;float:left;padding-right:20px;box-sizing:border-box}#cooked_recipe_settings .cooked-setting-column-13{position:relative;width:33%;float:left;padding-right:20px;box-sizing:border-box}#cooked_recipe_settings .cooked-setting-column-23{position:relative;width:66%;float:left;padding-right:20px;box-sizing:border-box}#cooked_recipe_settings .cooked-setting-column-12{position:relative;width:50%;float:left;padding-right:20px;box-sizing:border-box}#cooked_recipe_settings .cooked-setting-column-12 input[type=text],#cooked_recipe_settings .cooked-setting-column-13 input[type=text],#cooked_recipe_settings .cooked-setting-column-14 input[type=text],#cooked_recipe_settings .cooked-setting-column-23 input[type=text],#cooked_recipe_settings .recipe-setting-block input[type=text].cooked-shortcode-field{width:95%}#cooked_recipe_settings .cooked-setting-column-12 .cooked-select-wrapper,#cooked_recipe_settings .cooked-setting-column-12 select,#cooked_recipe_settings .cooked-setting-column-13 .cooked-select-wrapper,#cooked_recipe_settings .cooked-setting-column-13 select,#cooked_recipe_settings .cooked-setting-column-14 .cooked-select-wrapper,#cooked_recipe_settings .cooked-setting-column-14 select,#cooked_recipe_settings .cooked-setting-column-23 select{width:100%}#cooked_recipe_settings .cooked-setting-column-14.cooked-tb-col{padding:0}#cooked-welcome-screen{padding:15px 50px 0 30px;position:relative}#cooked-welcome-screen .cooked-badge{position:absolute;top:0;right:0}#cooked-welcome-screen .cooked-badge img{border:none;width:150px;height:150px;display:block;margin:0}#cooked-welcome-screen .about-text{margin-bottom:40px;line-height:1.8;font-size:17px;margin-right:260px}#cooked-welcome-screen .about-wrap{margin:25px auto 0;max-width:1000px}#cooked-welcome-screen .about-wrap h1{font-size:2.25rem}#cooked-welcome-screen .about-wrap p{font-size:1rem;margin:0 0 2rem;line-height:1.7rem}#cooked-welcome-screen #cooked-welcome-panel{background:#fff;padding:30px 30px 15px 30px;-moz-border-radius:15px;-webkit-border-radius:15px;border-radius:15px;border:none;box-shadow:0 4px 4px rgba(0,0,0,.05),0 8px 8px rgba(0,0,0,.05),0 32px 32px rgba(0,0,0,.05),0 64px 64px rgba(0,0,0,.05)}#cooked-welcome-screen #cooked-welcome-panel img.cooked-welcome-banner{border:none;display:block;padding:0;margin:0 0 30px;box-sizing:border-box;border-radius:5px 5px 0 0}#cooked-welcome-screen #cooked-welcome-panel .cooked-welcome-panel-intro{text-align:center;margin:0 50px 2rem;padding:15px 0;border-bottom:1px solid #e5e5e5}#cooked-welcome-screen #cooked-welcome-panel .cooked-welcome-panel-intro h1{font-size:1.75rem;margin:0 0 1rem;padding:0}#cooked-welcome-screen #cooked-welcome-panel .cooked-welcome-panel-intro p{max-width:600px;font-size:1.1rem;line-height:1.8rem;margin:0 auto 2rem;padding:0}#cooked-welcome-screen .cooked-welcome-panel a{text-decoration:none}#cooked-welcome-screen .cooked-welcome-panel-column{display:block!important}#cooked-welcome-screen .cooked-welcome-panel-column>strong{font-size:1rem}#cooked-welcome-screen .cooked-welcome-panel-column h3{font-size:1.75rem;margin:0 0 1rem;position:relative}#cooked-welcome-screen .cooked-welcome-panel-column h3 a{position:absolute;top:0;right:0;font-size:12px;font-weight:400}#cooked-welcome-screen .cooked-welcome-panel-column h3 a i.fa{position:relative;top:1px}#cooked-welcome-screen .cooked-welcome-panel-column h4{font-size:1.25rem;margin:0 0 1rem;position:relative}#cooked-welcome-screen .cooked-welcome-panel-column h4 a{position:absolute;top:0;right:0;font-size:12px;font-weight:400}#cooked-welcome-screen .cooked-welcome-panel-column h4 a i.fa{position:relative;top:1px}#cooked-welcome-screen .cooked-welcome-panel-column.cooked-welcome-panel-full{width:100%;padding-right:0;float:none}#cooked-welcome-screen .cooked-welcome-panel-column.cooked-welcome-panel-last{width:70%;padding-right:0;float:right}#cooked-welcome-screen .cooked-welcome-panel-column .fa-external-link{color:#888}#cooked-welcome-screen .cooked-welcome-panel-content{min-height:1px;padding:10px 50px 20px;margin:0}#cooked-welcome-screen .cooked-welcome-panel .cooked-welcome-panel-column-container{display:flex;justify-content:between!important;padding:0!important;flex-wrap:wrap}#cooked-welcome-screen .cooked-welcome-panel-column{box-sizing:border-box;padding-right:2rem;width:30%}#cooked-welcome-screen .cooked-pro-features{width:85%;margin:0 auto;padding:0 0 10px;display:flex;flex-wrap:wrap}#cooked-welcome-screen ul.cooked-whatsnew-list{margin-right:0}#cooked-welcome-screen ul.cooked-whatsnew-list li{line-height:1.7;position:relative;margin-right:0;border-top:1px solid #e5e5e5;padding:8px 0 4px 0}#cooked-welcome-screen ul.cooked-whatsnew-list li:first-child{border:none;padding-top:0}#cooked-welcome-screen ul.cooked-whatsnew-list em.fix,#cooked-welcome-screen ul.cooked-whatsnew-list strong.new,#cooked-welcome-screen ul.cooked-whatsnew-list strong.tweak{position:absolute;font-style:normal;display:inline-block;background:#aaa;text-transform:uppercase;top:11px;left:0;color:#fff;font-weight:600;-moz-border-radius:3px;-webkit-border-radius:3px;text-align:center;width:38px;border-radius:3px;font-size:10px;line-height:19px;height:19px;padding:0 6px;margin:0 6px 0 0}#cooked-welcome-screen ul.cooked-whatsnew-list li:first-child em.fix,#cooked-welcome-screen ul.cooked-whatsnew-list li:first-child strong.new,#cooked-welcome-screen ul.cooked-whatsnew-list li:first-child strong.tweak{top:3px}#cooked-welcome-screen ul.cooked-whatsnew-list strong.new{background:#56c477}#cooked-welcome-screen ul.cooked-whatsnew-list strong.tweak{background:#0073aa}#cooked-welcome-screen ul.cooked-whatsnew-list em.fix{background:#ffad10}#cooked-welcome-screen ul li.cooked-pro i.cooked-icon{color:#ffad10}#cooked-welcome-screen ul li.cooked-pro a{font-weight:600;color:#ffad10}#cooked-welcome-screen ul li.cooked-pro a:hover{color:#d3910f}#cooked-welcome-screen ul.cooked-whatsnew-pro{margin-bottom:0;flex:1 0 auto;width:33.333%}#cooked-welcome-screen ul.cooked-whatsnew-pro li{padding-left:0;font-size:1.15rem;font-weight:400}#cooked-welcome-screen ul.cooked-whatsnew-pro li i.cooked-icon-star{color:#ffad10;margin:0 7px 0 0;font-size:19px;position:relative;top:1px}#cooked-welcome-screen .cooked-welcome-bottom{text-align:center;background:#f9f9f9;margin:30px -80px -15px;border-top:1px solid #f1f1f1}#cooked-welcome-screen .cooked-pro-button{display:inline-block;clear:both;text-align:center;width:auto;margin:30px auto;padding:20px 25px 21px;font-size:1.25rem;line-height:1rem;font-weight:600;color:#fff;background:#ffad10;border-radius:50px}#cooked-welcome-screen .cooked-pro-button:hover{background:#e08704}#cooked-welcome-screen .cooked-coupon-code{color:#4c5e65;display:inline-block;font-size:17px;padding:0 0 0 1.5rem}@media screen and (max-width:1050px){#cooked-welcome-screen ul.cooked-whatsnew-pro{width:100%;margin-top:0}#cooked-welcome-screen ul.cooked-whatsnew-pro:first-child{margin-top:10px}#cooked-welcome-screen ul.cooked-whatsnew-pro li:first-child{border-top:1px solid #e5e5e5;padding-top:8px}#cooked-welcome-screen ul.cooked-whatsnew-pro:first-child li:first-child{border:none;padding-top:0}}@media screen and (max-width:870px){#cooked-welcome-screen .cooked-pro-features{width:90%}#cooked-welcome-screen .cooked-welcome-panel-column{padding-right:0}#cooked-welcome-screen .cooked-welcome-panel-column.cooked-welcome-panel-last{width:100%;padding-top:20px}#cooked-welcome-screen .about-wrap{margin-top:0}#cooked-welcome-screen .cooked-welcome-panel .cooked-welcome-panel-column li{display:block}}@media screen and (max-width:782px){#cooked-welcome-screen .cooked-pro-features{width:100%}#cooked-welcome-screen{padding:15px 40px 0 30px}#cooked-welcome-screen .cooked-badge{display:none}#cooked-welcome-screen .about-text,#cooked-welcome-screen .about-wrap h1{margin-right:0}#cooked-welcome-screen .cooked-welcome-panel-column h3 a{display:block;position:relative}}@media screen and (max-width:500px){#cooked-welcome-screen #cooked-welcome-panel img.cooked-welcome-banner{display:none}#cooked-welcome-screen .about-wrap h1{font-size:1.8rem}#cooked-welcome-screen .about-text{font-size:15px}}#cooked_recipe_settings #cooked-nutrition-label .cooked-nut-label,#cooked_recipe_settings .recipe-setting-block h3.cooked-settings-title{color:#0173aa}#cooked_recipe_settings .recipe-setting-block.cooked-danger h3.cooked-settings-title{color:#d44d1f}#cooked_recipe_settings .cooked-alert-block h3.cooked-settings-title{color:#c02a2a}#cooked-recipe-tabs{background:#fff}#cooked-recipe-tabs li{background:#454b52;color:#fff;color:rgba(255,255,255,.75);border-right:1px solid rgba(0,0,0,.15)}#cooked-recipe-tabs li:hover{background:#535a62;color:#fff;border-right:1px solid rgba(0,0,0,.15)}#cooked-recipe-tabs li.active{background:#fff;color:#333;border-right:1px solid #fff}#cooked-settings-tabs{background:#454b52}#cooked-settings-tabs a{color:#fff;text-decoration:none}#cooked-settings-tabs li{background:#454b52;color:#fff;color:rgba(255,255,255,.75)}#cooked-settings-tabs li:hover{background:#535a62;color:#fff}#cooked-settings-tabs li.active{background:#fff}#cooked-settings-tabs li.active a{color:#000}#cooked-directions-builder .cooked-direction-block>.cooked-direction-image .cooked-direction-img-placeholder,#cooked-migration-progress.cooked-progress .cooked-progress-bar,#cooked_recipe_settings .cooked-select-wrapper:before,#cooked_recipe_settings .cooked-tooltip-icon,#cooked_recipe_settings select{-webkit-transition:all .15s ease-out;-moz-transition:all .15s ease-out;transition:all .15s ease-out}#cooked-recipe-image-gallery .cooked-recipe-gallery-item{-webkit-transition:transform .15s ease-out;-moz-transition:all .15s ease-out;transition:transform .15s ease-out}#cooked-recipe-tabs li.cooked-loading{-webkit-transition:opacity .15s ease-out;-moz-transition:all .15s ease-out;transition:opacity .15s ease-out}@-webkit-keyframes cooked-wiggle{0%{-webkit-transform:scale(1)}50%{-webkit-transform:scale(1.03)}100%{-webkit-transform:scale(1)}}@-moz-keyframes cooked-wiggle{0%{-moz-transform:scale(1)}50%{-moz-transform:scale(1.03)}100%{-moz-transform:scale(1)}}@-o-keyframes cooked-wiggle{0%{-o-transform:scale(1)}50%{-o-transform:scale(1.03)}100%{-o-transform:scale(1)}}@keyframes cooked-wiggle{0%{transform:scale(1)}50%{transform:scale(1.03)}100%{transform:scale(1)}}@media screen and (max-width:1150px){#cooked-recipe-tabs li{font-size:.8rem;padding:0 1.2rem 0 .7rem}#cooked-recipe-tabs li .cooked-icon{display:none}}@media screen and (max-width:960px){#cooked_recipe_settings.stuck #cooked-recipe-tabs{margin-left:36px}}#cooked-ingredients-builder .cooked-ingredient-block>.cooked-substitution-fields{width:100%;float:left;clear:both;margin-top:10px;padding-top:10px;padding-right:0;padding-left:0;margin-left:0;box-sizing:border-box;padding-bottom:5px;position:relative}#cooked-ingredients-builder .cooked-ingredient-block>.cooked-substitution-fields .cooked-ingredient-amount{width:15%}#cooked-ingredients-builder .cooked-ingredient-block>.cooked-substitution-fields .cooked-ingredient-measurement{width:20%}#cooked-ingredients-builder .cooked-ingredient-block>.cooked-substitution-fields .cooked-ingredient-name{width:65%}#cooked-ingredients-builder .cooked-ingredient-block>.cooked-substitution-fields .cooked-sub-label{color:#7c7c7c;font-size:14px;font-weight:300}#cooked-ingredients-builder .cooked-ingredient-block>.cooked-substitution-fields>div{display:inline-block;float:left;box-sizing:border-box;padding-right:10px} \ No newline at end of file diff --git a/assets/admin/js/cooked-migration.js b/assets/admin/js/cooked-migration.js index 181e1e7..2be7c41 100644 --- a/assets/admin/js/cooked-migration.js +++ b/assets/admin/js/cooked-migration.js @@ -4,8 +4,12 @@ var $_CookedMigrationButton = $('#cooked-migration-button'), $_CookedImportButton = $('#cooked-import-button'), + $_CookedCSVImportButton = $('#cooked-csv-import-button'), + $_CookedCSVImportForm = $('#cooked-csv-import-form'), $_CookedMigrationProgress = $('#cooked-migration-progress'), - $_CookedMigrationProgressText = $('#cooked-migration-progress-text'); + $_CookedMigrationProgressText = $('#cooked-migration-progress-text'), + $_CookedCSVImportProgress = $('#cooked-csv-import-progress'), + $_CookedCSVImportProgressText = $('#cooked-csv-import-progress-text'); // Migration Button Exists? if ($_CookedMigrationButton.length) { @@ -76,6 +80,139 @@ } }); } + + // CSV Import Button Exists? + if ($_CookedCSVImportButton.length) { + $_CookedCSVImportButton.on('click', function(e) { + e.preventDefault(); + + var thisButton = $(this), + fileInput = $('#cooked-csv-file'), + file = fileInput[0].files[0], + errorsDiv = $('#cooked-csv-import-errors'); + + errorsDiv.hide().empty(); + + if (!file) { + var errorMsg = (cooked_migration_js_vars.i18n_csv_no_file || 'Please select a CSV file.'); + errorsDiv.html('
' + errorMsg + '
').show(); + return; + } + + if (file.type !== 'text/csv' && !file.name.endsWith('.csv')) { + var invalidFileMsg = (cooked_migration_js_vars.i18n_csv_invalid_file || 'Please select a valid CSV file.'); + errorsDiv.html('' + invalidFileMsg + '
').show(); + return; + } + + if (thisButton.hasClass('disabled')) { + return; + } + + var confirm_import = confirm(cooked_migration_js_vars.i18n_confirm_import_recipes || 'Are you sure you want to import recipes from this CSV file?'); + if (!confirm_import) { + return; + } + + thisButton.addClass('disabled').attr('disabled', true); + fileInput.attr('disabled', true); + + var formData = new FormData(); + formData.append('action', 'cooked_upload_csv'); + formData.append('csv_file', file); + + // Show progress + if (!$_CookedCSVImportProgress.hasClass('cooked-active')) { + $_CookedCSVImportProgress.addClass('cooked-active'); + $_CookedCSVImportProgressText.addClass('cooked-active'); + $_CookedCSVImportProgress.find('.cooked-progress-bar').css({ "width" : "0%" }); + $_CookedCSVImportProgressText.text('Uploading...'); + } + + // Upload file + $.ajax({ + url: cooked_migration_js_vars.ajax_url, + type: 'POST', + data: formData, + processData: false, + contentType: false, + success: function(response) { + if (response.success) { + $_CookedCSVImportProgressText.text('Processing...'); + $_CookedCSVImportProgress.find('.cooked-progress-bar').css({ "width" : "50%" }); + + // Process CSV + $.post( + cooked_migration_js_vars.ajax_url, + { + action: 'cooked_process_csv', + transient_key: response.data.transient_key + }, + function(processResponse) { + if (processResponse.success) { + $_CookedCSVImportProgress.find('.cooked-progress-bar').css({ "width" : "100%" }); + $_CookedCSVImportProgressText.text(processResponse.data.success + ' / ' + processResponse.data.total + ' recipes imported'); + + // Show errors if any + if (processResponse.data.errors && processResponse.data.errors.length > 0) { + var errorHtml = 'Errors:
' + (processResponse.data.message || 'Import failed.') + '
').show(); + if (processResponse.data.errors && processResponse.data.errors.length > 0) { + var errorHtml = 'Failed to process CSV file.
').show(); + thisButton.removeClass('disabled').attr('disabled', false); + fileInput.attr('disabled', false); + $_CookedCSVImportProgress.removeClass('cooked-active'); + $_CookedCSVImportProgressText.removeClass('cooked-active'); + }); + } else { + errorsDiv.html('' + (response.data.message || 'File upload failed.') + '
').show(); + thisButton.removeClass('disabled').attr('disabled', false); + fileInput.attr('disabled', false); + $_CookedCSVImportProgress.removeClass('cooked-active'); + $_CookedCSVImportProgressText.removeClass('cooked-active'); + } + }, + error: function() { + errorsDiv.html('Failed to upload CSV file.
').show(); + thisButton.removeClass('disabled').attr('disabled', false); + fileInput.attr('disabled', false); + $_CookedCSVImportProgress.removeClass('cooked-active'); + $_CookedCSVImportProgressText.removeClass('cooked-active'); + } + }); + }); + } }); })( jQuery ); diff --git a/assets/admin/js/cooked-migration.min.js b/assets/admin/js/cooked-migration.min.js index c632055..8afb607 100644 --- a/assets/admin/js/cooked-migration.min.js +++ b/assets/admin/js/cooked-migration.min.js @@ -1 +1 @@ -(r=>{r(document).ready(function(){var e=r("#cooked-migration-button"),o=r("#cooked-import-button");r("#cooked-migration-progress"),r("#cooked-migration-progress-text");e.length&&e.on("click",function(e){e.preventDefault();e=r(this);confirm(cooked_migration_js_vars.i18n_confirm_migrate_recipe)&&!e.hasClass("disabled")&&(e.addClass("disabled").attr("disabled",!0),e.hide(),r.post(cooked_migration_js_vars.ajax_url,{action:"cooked_get_migrate_ids"},function(e){var o;e&&(o=JSON.parse(e),0"+(e.data.message||"Import failed.")+"
").show(),e.data.errors&&0Failed to process CSV file.
").show(),t.removeClass("disabled").attr("disabled",!1),i.attr("disabled",!1),s.removeClass("cooked-active"),a.removeClass("cooked-active")})):(r.html(""+(e.data.message||"File upload failed.")+"
").show(),t.removeClass("disabled").attr("disabled",!1),i.attr("disabled",!1),s.removeClass("cooked-active"),a.removeClass("cooked-active"))},error:function(){r.html("Failed to upload CSV file.
").show(),t.removeClass("disabled").attr("disabled",!1),i.attr("disabled",!1),s.removeClass("cooked-active"),a.removeClass("cooked-active")}})):(e=cooked_migration_js_vars.i18n_csv_invalid_file||"Please select a valid CSV file.",r.html(""+e+"
").show()):(o=cooked_migration_js_vars.i18n_csv_no_file||"Please select a CSV file.",r.html(""+o+"
").show())})})})(jQuery);{function cookedDecimalAdjust(e,o,t){return void 0===t||0==+t?Math[e](o):(t=+t,null===(o=+o)||isNaN(o)||"number"!=typeof t||t%1!=0?NaN:o<0?-cookedDecimalAdjust(e,-o,t):(o=o.toString().split("e"),+((o=(o=Math[e](+(o[0]+"e"+(o[1]?+o[1]-t:-t)))).toString().split("e"))[0]+"e"+(o[1]?+o[1]+t:t))))}}Math.round10||(Math.round10=function(e,o){return cookedDecimalAdjust("round",e,o)});var cooked_recipe_migrate_counter=0,progressIterations=0;function cooked_migrate_recipes(e,s){var a,d,c,o,n=0;0' . __( 'Note:', 'cooked' ) . ' ' . __( 'Recipes will be imported with the \'Draft\' status. After the import is complete, you can bulk edit the recipes and change their status to \'Published\'.', 'cooked' ) . '
'; + + $import_tabs['csv_import'] = [ + 'name' => __('CSV Import', 'cooked'), + 'icon' => 'migrate', + 'fields' => [ + 'cooked_csv_import' => [ + 'title' => __('Import Recipes via CSV', 'cooked'), + 'desc' => $html_desc, + 'type' => 'csv_upload', + ] + ] + ]; + $import_tabs['more_imports_coming_soon'] = [ 'name' => __('More Imports are Coming Soon...', 'cooked'), 'icon' => 'migrate', @@ -183,4 +211,21 @@ public static function field_message( $name, $field_options, $color, $field ) { echo '' . $field['message'] . '
'; } + public static function field_csv_upload( $name, $field_options, $color, $field ) { + wp_enqueue_script('jquery'); + echo ''; + } + } diff --git a/languages/cooked.mo b/languages/cooked.mo index 691d98b018e3754fde1f06726916695067430cbd..4e4d8e414dcaed0ad8247c621ebe4edcb71d2b0f 100644 GIT binary patch delta 108 zcmdnRbcAVwh$1rs1A`6_gMbAPb1^b7SORGv1pyN^^|dofN(zdt^!3a0i&6@TQj3fA z@{7{-i%Sa%@{3CJ3vx=+GxPM5^YgP)QzkPq>Q9VT;P6SzOD|1KPn}p1%g6u#i@+O0 delta 64 zcmX@Yw2Ntih$sUP=zs_y0MR^*3=FyxP4y@4R-X7WiZj4JMAx|}HL+yk43&u!^tkfU MOB2&mtrWNz0HErrors:
' + errorsLabel + '
' + (processResponse.data.message || 'Import failed.') + '
').show(); + var importFailedText = cooked_migration_js_vars.i18n_import_failed || 'Import failed.'; + errorsDiv.html('' + (processResponse.data.message || importFailedText) + '
').show(); if (processResponse.data.errors && processResponse.data.errors.length > 0) { var errorHtml = 'Failed to process CSV file.
').show(); + var failedProcessText = cooked_migration_js_vars.i18n_failed_process_csv || 'Failed to process CSV file.'; + errorsDiv.html('' + failedProcessText + '
').show(); thisButton.removeClass('disabled').attr('disabled', false); fileInput.attr('disabled', false); $_CookedCSVImportProgress.removeClass('cooked-active'); $_CookedCSVImportProgressText.removeClass('cooked-active'); }); } else { - errorsDiv.html('' + (response.data.message || 'File upload failed.') + '
').show(); + var fileUploadFailedText = cooked_migration_js_vars.i18n_file_upload_failed || 'File upload failed.'; + errorsDiv.html('' + (response.data.message || fileUploadFailedText) + '
').show(); thisButton.removeClass('disabled').attr('disabled', false); fileInput.attr('disabled', false); $_CookedCSVImportProgress.removeClass('cooked-active'); @@ -204,7 +209,8 @@ } }, error: function() { - errorsDiv.html('Failed to upload CSV file.
').show(); + var failedUploadText = cooked_migration_js_vars.i18n_failed_upload_csv || 'Failed to upload CSV file.'; + errorsDiv.html('' + failedUploadText + '
').show(); thisButton.removeClass('disabled').attr('disabled', false); fileInput.attr('disabled', false); $_CookedCSVImportProgress.removeClass('cooked-active'); @@ -304,10 +310,12 @@ function cooked_migrate_recipes(recipe_ids, total_recipes ) { if ( progress_percent < 100 && progress_percent > 3 && isFinite( estimatedCompletionTime ) ){ estimatedHours = Math.floor(estimatedCompletionTime / 3600); estimatedMinutes = Math.floor((estimatedCompletionTime / 60) % 60); + var hrsText = cooked_migration_js_vars.i18n_hrs || 'hrs'; + var minsText = cooked_migration_js_vars.i18n_mins || 'mins'; if ( estimatedHours >= 1 ){ - progress_text.html( formattedComplete + " / " + formattedTotal + "" + estimatedHours + " hrs, " + estimatedMinutes + " mins " + cooked_migration_js_vars.i18n_remaining + "" ); + progress_text.html( formattedComplete + " / " + formattedTotal + "" + estimatedHours + " " + hrsText + ", " + estimatedMinutes + " " + minsText + " " + cooked_migration_js_vars.i18n_remaining + "" ); } else if ( estimatedMinutes >= 1 ){ - progress_text.html( formattedComplete + " / " + formattedTotal + "" + estimatedMinutes + " mins " + cooked_migration_js_vars.i18n_remaining + "" ); + progress_text.html( formattedComplete + " / " + formattedTotal + "" + estimatedMinutes + " " + minsText + " " + cooked_migration_js_vars.i18n_remaining + "" ); } else { progress_text.text( formattedComplete + " / " + formattedTotal ); } @@ -387,10 +395,12 @@ function cooked_import_recipes(recipe_ids, total_recipes, import_type) { if ( progress_percent < 100 && progress_percent > 3 && isFinite( estimatedCompletionTime ) ) { estimatedHours = Math.floor(estimatedCompletionTime / 3600); estimatedMinutes = Math.floor((estimatedCompletionTime / 60) % 60); + var hrsText = cooked_migration_js_vars.i18n_hrs || 'hrs'; + var minsText = cooked_migration_js_vars.i18n_mins || 'mins'; if ( estimatedHours >= 1 ){ - progress_text.html( formattedComplete + " / " + formattedTotal + "" + estimatedHours + " hrs, " + estimatedMinutes + " mins " + cooked_migration_js_vars.i18n_remaining + "" ); + progress_text.html( formattedComplete + " / " + formattedTotal + "" + estimatedHours + " " + hrsText + ", " + estimatedMinutes + " " + minsText + " " + cooked_migration_js_vars.i18n_remaining + "" ); } else if ( estimatedMinutes >= 1 ){ - progress_text.html( formattedComplete + " / " + formattedTotal + "" + estimatedMinutes + " mins " + cooked_migration_js_vars.i18n_remaining + "" ); + progress_text.html( formattedComplete + " / " + formattedTotal + "" + estimatedMinutes + " " + minsText + " " + cooked_migration_js_vars.i18n_remaining + "" ); } else { progress_text.text( formattedComplete + " / " + formattedTotal ); } diff --git a/assets/admin/js/cooked-migration.min.js b/assets/admin/js/cooked-migration.min.js index 8afb607..846468d 100644 --- a/assets/admin/js/cooked-migration.min.js +++ b/assets/admin/js/cooked-migration.min.js @@ -1 +1 @@ -(d=>{d(document).ready(function(){var e=d("#cooked-migration-button"),o=d("#cooked-import-button"),t=d("#cooked-csv-import-button"),s=(d("#cooked-csv-import-form"),d("#cooked-migration-progress"),d("#cooked-migration-progress-text"),d("#cooked-csv-import-progress")),a=d("#cooked-csv-import-progress-text");e.length&&e.on("click",function(e){e.preventDefault();e=d(this);confirm(cooked_migration_js_vars.i18n_confirm_migrate_recipe)&&!e.hasClass("disabled")&&(e.addClass("disabled").attr("disabled",!0),e.hide(),d.post(cooked_migration_js_vars.ajax_url,{action:"cooked_get_migrate_ids"},function(e){var o;e&&(o=JSON.parse(e),0"+(e.data.message||"Import failed.")+"
").show(),e.data.errors&&0Failed to process CSV file.
").show(),t.removeClass("disabled").attr("disabled",!1),i.attr("disabled",!1),s.removeClass("cooked-active"),a.removeClass("cooked-active")})):(r.html(""+(e.data.message||"File upload failed.")+"
").show(),t.removeClass("disabled").attr("disabled",!1),i.attr("disabled",!1),s.removeClass("cooked-active"),a.removeClass("cooked-active"))},error:function(){r.html("Failed to upload CSV file.
").show(),t.removeClass("disabled").attr("disabled",!1),i.attr("disabled",!1),s.removeClass("cooked-active"),a.removeClass("cooked-active")}})):(e=cooked_migration_js_vars.i18n_csv_invalid_file||"Please select a valid CSV file.",r.html(""+e+"
").show()):(o=cooked_migration_js_vars.i18n_csv_no_file||"Please select a CSV file.",r.html(""+o+"
").show())})})})(jQuery);{function cookedDecimalAdjust(e,o,t){return void 0===t||0==+t?Math[e](o):(t=+t,null===(o=+o)||isNaN(o)||"number"!=typeof t||t%1!=0?NaN:o<0?-cookedDecimalAdjust(e,-o,t):(o=o.toString().split("e"),+((o=(o=Math[e](+(o[0]+"e"+(o[1]?+o[1]-t:-t)))).toString().split("e"))[0]+"e"+(o[1]?+o[1]+t:t))))}}Math.round10||(Math.round10=function(e,o){return cookedDecimalAdjust("round",e,o)});var cooked_recipe_migrate_counter=0,progressIterations=0;function cooked_migrate_recipes(e,s){var a,d,c,o,n=0;0"+(e.data.message||o)+"
").show(),e.data.errors&&0"+e+"
").show(),t.removeClass("disabled").attr("disabled",!1),r.attr("disabled",!1),a.removeClass("cooked-active"),d.removeClass("cooked-active")})):(o=cooked_migration_js_vars.i18n_file_upload_failed||"File upload failed.",s.html(""+(e.data.message||o)+"
").show(),t.removeClass("disabled").attr("disabled",!1),r.attr("disabled",!1),a.removeClass("cooked-active"),d.removeClass("cooked-active"))},error:function(){var e=cooked_migration_js_vars.i18n_failed_upload_csv||"Failed to upload CSV file.";s.html(""+e+"
").show(),t.removeClass("disabled").attr("disabled",!1),r.attr("disabled",!1),a.removeClass("cooked-active"),d.removeClass("cooked-active")}})):(e=cooked_migration_js_vars.i18n_csv_invalid_file||"Please select a valid CSV file.",s.html(""+e+"
").show()):(o=cooked_migration_js_vars.i18n_csv_no_file||"Please select a CSV file.",s.html(""+o+"
").show())})})})(jQuery);{function cookedDecimalAdjust(e,o,i){return void 0===i||0==+i?Math[e](o):(i=+i,null===(o=+o)||isNaN(o)||"number"!=typeof i||i%1!=0?NaN:o<0?-cookedDecimalAdjust(e,-o,i):(o=o.toString().split("e"),+((o=(o=Math[e](+(o[0]+"e"+(o[1]?+o[1]-i:-i)))).toString().split("e"))[0]+"e"+(o[1]?+o[1]+i:i))))}}Math.round10||(Math.round10=function(e,o){return cookedDecimalAdjust("round",e,o)});var cooked_recipe_migrate_counter=0,progressIterations=0;function cooked_migrate_recipes(e,d){var c,n,_,o,l=0;0Gd>-?KV13m)QBBT~M9Xo-{LE_kY`XaM@jcX6(;}9F!Oj#RbGx~p-
z_rkf@zks(iD_cmJo&(4f^fOZYITBeRgTlE`PhJ53?}_}q7U{#g2VoDS5jh3Xqfgl~
z "limit" "columns" "match_*"
-
-
-
-
+
+
hide_excerpt ()
hide_author ()
- match_* ()
- *_weight ()
+ match_* ()
diff --git a/includes/class.cooked-recipes.php b/includes/class.cooked-recipes.php index fdd098f..8df0da6 100644 --- a/includes/class.cooked-recipes.php +++ b/includes/class.cooked-recipes.php @@ -182,7 +182,6 @@ public static function get_settings( $post_id, $bc = true ) { // Include the Post ID $recipe_settings['id'] = $post_id; - // You're welcome developers! $recipe_settings = apply_filters( 'cooked_single_recipe_settings', $recipe_settings, $post_id ); return $recipe_settings; diff --git a/includes/class.cooked-related-recipes.php b/includes/class.cooked-related-recipes.php index f8c371a..b2493a8 100644 --- a/includes/class.cooked-related-recipes.php +++ b/includes/class.cooked-related-recipes.php @@ -15,31 +15,14 @@ /** * Cooked_Related_Recipes Class * - * Handles related recipes logic, transient caching, and admin pre-calculation. + * Handles related recipes via a single on-demand WP_Query: recipes sharing at least + * one term in any enabled taxonomy (categories, cuisines, cooking methods, tags, diets), + * ordered randomly. No caching or pre-calculation. * * @since 1.12.0 */ class Cooked_Related_Recipes { - /** - * Constructor. - */ - public function __construct() { - add_action( 'save_post', [ $this, 'maybe_bump_cache_version' ], 10, 1 ); - add_action( 'delete_post', [ $this, 'maybe_bump_cache_version' ], 10, 1 ); - } - - /** - * Bump cache version when a recipe is saved or deleted. - * - * @param int $post_id Post ID. - */ - public function maybe_bump_cache_version( $post_id ) { - if ( get_post_type( $post_id ) === 'cp_recipe' ) { - self::bump_related_cache_version(); - } - } - /** * Get default shortcode attributes. * @@ -59,17 +42,6 @@ public static function get_default_atts() { 'match_cooking_methods' => true, 'match_tags' => true, 'match_diets' => true, - 'match_ingredients' => true, - 'match_author' => false, - 'match_difficulty' => false, - 'category_weight' => 10, - 'cuisine_weight' => 8, - 'ingredient_weight' => 9, - 'cooking_method_weight' => 5, - 'tag_weight' => 5, - 'diet_weight' => 4, - 'author_weight' => 3, - 'difficulty_weight' => 2, ]; /** @@ -83,307 +55,94 @@ public static function get_default_atts() { } /** - * Extract only scoring-related attributes (excludes display-only attributes). - * - * @param array $atts All shortcode attributes. - * @return array Scoring-related attributes only. - */ - public static function get_scoring_atts( $atts ) { - return [ - 'match_categories' => isset( $atts['match_categories'] ) ? $atts['match_categories'] : true, - 'match_cuisines' => isset( $atts['match_cuisines'] ) ? $atts['match_cuisines'] : true, - 'match_cooking_methods' => isset( $atts['match_cooking_methods'] ) ? $atts['match_cooking_methods'] : true, - 'match_tags' => isset( $atts['match_tags'] ) ? $atts['match_tags'] : true, - 'match_diets' => isset( $atts['match_diets'] ) ? $atts['match_diets'] : true, - 'match_ingredients' => isset( $atts['match_ingredients'] ) ? $atts['match_ingredients'] : true, - 'match_author' => isset( $atts['match_author'] ) ? $atts['match_author'] : false, - 'match_difficulty' => isset( $atts['match_difficulty'] ) ? $atts['match_difficulty'] : false, - 'category_weight' => isset( $atts['category_weight'] ) ? $atts['category_weight'] : 10, - 'cuisine_weight' => isset( $atts['cuisine_weight'] ) ? $atts['cuisine_weight'] : 8, - 'cooking_method_weight' => isset( $atts['cooking_method_weight'] ) ? $atts['cooking_method_weight'] : 6, - 'tag_weight' => isset( $atts['tag_weight'] ) ? $atts['tag_weight'] : 5, - 'diet_weight' => isset( $atts['diet_weight'] ) ? $atts['diet_weight'] : 4, - 'ingredient_weight' => isset( $atts['ingredient_weight'] ) ? $atts['ingredient_weight'] : 7, - 'author_weight' => isset( $atts['author_weight'] ) ? $atts['author_weight'] : 3, - 'difficulty_weight' => isset( $atts['difficulty_weight'] ) ? $atts['difficulty_weight'] : 2, - ]; - } - - /** - * Build cache key for related recipes. - * Uses scoring-related attributes + limit + language (since they affect what we store in cache). - * - * @param int $recipe_id Recipe ID. - * @param array $atts Shortcode attributes. - * @return string - */ - public static function get_cache_key( $recipe_id, $atts ) { - $version = (int) get_option( 'cooked_related_version', 1 ); - $scoring_atts = self::get_scoring_atts( $atts ); - // Include limit in cache key since it affects what we store - $limit = isset( $atts['limit'] ) ? (int) $atts['limit'] : 0; - $cache_key_data = $scoring_atts; - $cache_key_data['limit'] = $limit; - - // Include current language in cache key for multilingual support - $current_language = false; - if ( class_exists( 'Cooked_Multilingual' ) && Cooked_Multilingual::is_multilingual_active() ) { - $current_language = Cooked_Multilingual::get_current_language(); - } - if ( $current_language ) { - $cache_key_data['lang'] = $current_language; - } - - return 'cooked_related_v' . $version . '_' . $recipe_id . '_' . md5( serialize( $cache_key_data ) ); - } - - /** - * Bump the related recipes cache version to invalidate all cached results. - */ - public static function bump_related_cache_version() { - update_option( 'cooked_related_version', (int) get_option( 'cooked_related_version', 1 ) + 1 ); - } - - /** - * Get related recipes: check cache first, compute and store on miss. - * Cache is based on scoring attributes only, so it works across different display settings. + * Get related recipes (on-demand query, no cache). + * Uses all enabled taxonomies with OR relation and orderby rand. * * @param int $recipe_id Recipe ID. * @param array $atts Shortcode attributes. - * @return array Array of [ 'id' => int, 'score' => int ]. + * @return array Array of [ 'id' => int ]. */ public static function get_related_recipes( $recipe_id, $atts ) { - $key = self::get_cache_key( $recipe_id, $atts ); - $cached = get_transient( $key ); - if ( $cached !== false && is_array( $cached ) ) { - // Cache already has the limit applied, just return it - return $cached; - } - $source_recipe = Cooked_Recipes::get( $recipe_id, true ); if ( ! $source_recipe || empty( $source_recipe ) ) { return []; } - $scores = self::find_related_recipes( $source_recipe, $atts ); - - // Apply limit when storing in cache - store only what we'll actually use - $limit = isset( $atts['limit'] ) ? (int) $atts['limit'] : 0; - if ( $limit > 0 && count( $scores ) > $limit ) { - $scores = array_slice( $scores, 0, $limit ); - } - - $ttl = (int) apply_filters( 'cooked_related_recipes_cache_ttl', 7 * DAY_IN_SECONDS ); - set_transient( $key, $scores, $ttl ); - - return $scores; - } - - /** - * Pre-fill cache for one recipe using default atts. Used by admin Calculate tool. - * - * @param int $recipe_id Recipe ID. - */ - public static function prime_cache_for_recipe( $recipe_id ) { - $source_recipe = Cooked_Recipes::get( $recipe_id, true ); - if ( ! $source_recipe || empty( $source_recipe ) ) { - return; - } - - $atts = self::get_default_atts(); - $scores = self::find_related_recipes( $source_recipe, $atts ); - - // Apply default limit when storing in cache - store only what we'll actually use - $limit = isset( $atts['limit'] ) ? (int) $atts['limit'] : 0; - if ( $limit > 0 && count( $scores ) > $limit ) { - $scores = array_slice( $scores, 0, $limit ); - } - - $key = self::get_cache_key( $recipe_id, $atts ); - $ttl = (int) apply_filters( 'cooked_related_recipes_cache_ttl', 7 * DAY_IN_SECONDS ); - set_transient( $key, $scores, $ttl ); + return self::find_related_recipes( $source_recipe, $atts ); } /** - * Find related recipes based on various factors. - * Processes recipes in batches to avoid memory issues with large sites. + * Find related recipes: one WP_Query with tax_query (all taxonomies OR) and orderby rand. * * @param array $source_recipe Source recipe data. * @param array $atts Shortcode attributes. - * @return array [ ['id' => int, 'score' => int], ... ] + * @return array [ ['id' => int], ... ] */ public static function find_related_recipes( $source_recipe, $atts ) { $recipe_id = $source_recipe['id']; - $scores = []; + $limit = isset( $atts['limit'] ) ? max( 1, (int) $atts['limit'] ) : 4; + + // Build OR clause for each taxonomy that is enabled via match_* and where the source recipe has terms. + $clauses = []; + $taxonomy_atts = [ + 'cp_recipe_category' => 'match_categories', + 'cp_recipe_cuisine' => 'match_cuisines', + 'cp_recipe_cooking_method' => 'match_cooking_methods', + 'cp_recipe_tags' => 'match_tags', + 'cp_recipe_diet' => 'match_diets', + ]; + foreach ( $taxonomy_atts as $taxonomy => $att_key ) { + if ( empty( $atts[ $att_key ] ) || $atts[ $att_key ] === 'false' ) { + continue; + } + $terms = self::get_recipe_terms( $recipe_id, $taxonomy ); + if ( ! empty( $terms ) ) { + $clauses[] = [ 'taxonomy' => $taxonomy, 'field' => 'term_id', 'terms' => $terms ]; + } + } - // Batch size for processing recipes (process 100 at a time to avoid memory issues) - $batch_size = apply_filters( 'cooked_related_recipes_batch_size', 100 ); - $paged = 1; + if ( empty( $clauses ) ) { + return []; + } - // Pre-calculate source recipe data once - $source_categories = self::get_recipe_terms( $recipe_id, 'cp_recipe_category' ); - $source_cuisines = self::get_recipe_terms( $recipe_id, 'cp_recipe_cuisine' ); - $source_cooking_methods = self::get_recipe_terms( $recipe_id, 'cp_recipe_cooking_method' ); - $source_tags = self::get_recipe_terms( $recipe_id, 'cp_recipe_tags' ); - $source_diets = self::get_recipe_terms( $recipe_id, 'cp_recipe_diet' ); - $source_ingredients = self::get_recipe_ingredients( $source_recipe ); - $source_author = isset( $source_recipe['author']['id'] ) ? $source_recipe['author']['id'] : false; - $source_difficulty = isset( $source_recipe['difficulty_level'] ) ? $source_recipe['difficulty_level'] : false; + $tax_query = array_merge( [ 'relation' => 'OR' ], $clauses ); + + $query_args = [ + 'post_type' => 'cp_recipe', + 'post_status' => 'publish', + 'post__not_in' => [ $recipe_id ], + 'posts_per_page' => $limit, + 'orderby' => 'rand', + 'fields' => 'ids', + ]; + + $query_args['tax_query'] = $tax_query; - // Get current language for multilingual support $current_language = false; if ( class_exists( 'Cooked_Multilingual' ) && Cooked_Multilingual::is_multilingual_active() ) { $current_language = Cooked_Multilingual::get_current_language(); } + $query_args = apply_filters( 'cooked_related_recipes_query_args', $query_args, $current_language ); - // Process recipes in batches using WP_Query directly - while ( true ) { - $query_args = [ - 'post_type' => 'cp_recipe', - 'post_status' => 'publish', - 'post__not_in' => [ $recipe_id ], - 'posts_per_page' => $batch_size, - 'paged' => $paged, - 'fields' => 'ids', // Only get IDs to save memory - 'no_found_rows' => false, // We need to know if there are more pages - ]; - - // Allow multilingual plugins to filter the query - $query_args = apply_filters( 'cooked_related_recipes_query_args', $query_args, $current_language ); - - $query = new \WP_Query( $query_args ); - $recipe_ids = $query->posts; - - if ( empty( $recipe_ids ) ) { - break; - } - - // Process each recipe in the current batch - foreach ( $recipe_ids as $rid ) { - $score = 0; - - // Get recipe settings only when needed (lazy loading) - $recipe_settings = null; - - if ( $atts['match_categories'] && $atts['match_categories'] !== 'false' ) { - $categories = self::get_recipe_terms( $rid, 'cp_recipe_category' ); - $score += count( array_intersect( $source_categories, $categories ) ) * (int) $atts['category_weight']; - } - - if ( $atts['match_cuisines'] && $atts['match_cuisines'] !== 'false' ) { - $cuisines = self::get_recipe_terms( $rid, 'cp_recipe_cuisine' ); - $score += count( array_intersect( $source_cuisines, $cuisines ) ) * (int) $atts['cuisine_weight']; - } + $query = new \WP_Query( $query_args ); + $ids = ! empty( $query->posts ) ? $query->posts : []; + wp_reset_postdata(); - if ( $atts['match_cooking_methods'] && $atts['match_cooking_methods'] !== 'false' ) { - $cooking_methods = self::get_recipe_terms( $rid, 'cp_recipe_cooking_method' ); - $score += count( array_intersect( $source_cooking_methods, $cooking_methods ) ) * (int) $atts['cooking_method_weight']; - } - - if ( $atts['match_tags'] && $atts['match_tags'] !== 'false' ) { - $tags = self::get_recipe_terms( $rid, 'cp_recipe_tags' ); - $score += count( array_intersect( $source_tags, $tags ) ) * (int) $atts['tag_weight']; - } - - if ( $atts['match_diets'] && $atts['match_diets'] !== 'false' ) { - $diets = self::get_recipe_terms( $rid, 'cp_recipe_diet' ); - $score += count( array_intersect( $source_diets, $diets ) ) * (int) $atts['diet_weight']; - } - - // Only load full recipe data if we need ingredients, author, or difficulty - if ( ( $atts['match_ingredients'] && $atts['match_ingredients'] !== 'false' ) || - ( $atts['match_author'] && $atts['match_author'] !== 'false' && $source_author ) || - ( $atts['match_difficulty'] && $atts['match_difficulty'] !== 'false' && $source_difficulty ) ) { - - if ( is_null( $recipe_settings ) ) { - $recipe_settings = Cooked_Recipes::get_settings( $rid ); - } - - if ( $atts['match_ingredients'] && $atts['match_ingredients'] !== 'false' ) { - $recipe_data = [ 'ingredients' => isset( $recipe_settings['ingredients'] ) ? $recipe_settings['ingredients'] : [] ]; - $ingredients = self::get_recipe_ingredients( $recipe_data ); - $score += self::compare_ingredients( $source_ingredients, $ingredients ) * (int) $atts['ingredient_weight']; - unset( $recipe_data ); // Free memory immediately - } - - if ( $atts['match_author'] && $atts['match_author'] !== 'false' && $source_author ) { - $post = get_post( $rid ); - $author = $post ? (int) $post->post_author : false; - if ( $author && $author === (int) $source_author ) { - $score += (int) $atts['author_weight']; - } - } - - if ( $atts['match_difficulty'] && $atts['match_difficulty'] !== 'false' && $source_difficulty ) { - $difficulty = isset( $recipe_settings['difficulty_level'] ) ? $recipe_settings['difficulty_level'] : false; - if ( $difficulty && $difficulty === $source_difficulty ) { - $score += (int) $atts['difficulty_weight']; - } - } - } - - if ( $score > 0 ) { - $recipe_score = [ 'id' => $rid, 'score' => $score ]; - - /** - * Filter individual recipe score before adding to results. - * - * @since 1.12.0 - * - * @param array $recipe_score Recipe score data ['id' => int, 'score' => int]. - * @param int $rid Recipe ID. - * @param array $source_recipe Source recipe data. - * @param array $atts Shortcode attributes. - */ - $recipe_score = apply_filters( 'cooked_related_recipes_recipe_score', $recipe_score, $rid, $source_recipe, $atts ); - - if ( $recipe_score && isset( $recipe_score['id'] ) && isset( $recipe_score['score'] ) && $recipe_score['score'] > 0 ) { - $scores[] = $recipe_score; - } - } - - // Clear recipe settings for next iteration - $recipe_settings = null; - } - - // Clean up query to free memory - wp_reset_postdata(); - - // Check if there are more recipes to process - if ( $paged >= $query->max_num_pages ) { - break; - } - $paged++; + $result = []; + foreach ( $ids as $id ) { + $result[] = [ 'id' => (int) $id ]; } /** - * Filter scores before sorting. - * - * @since 1.12.0 - * - * @param array $scores Array of recipe scores [ ['id' => int, 'score' => int], ... ]. - * @param array $source_recipe Source recipe data. - * @param array $atts Shortcode attributes. - */ - $scores = apply_filters( 'cooked_related_recipes_scores_before_sort', $scores, $source_recipe, $atts ); - - // Sort by score descending - usort( $scores, function ( $a, $b ) { - return $b['score'] - $a['score']; - } ); - - /** - * Filter final sorted scores. + * Filter the related recipe IDs before return. * * @since 1.12.0 * - * @param array $scores Array of sorted recipe scores [ ['id' => int, 'score' => int], ... ]. + * @param array $result Array of [ 'id' => int ]. * @param array $source_recipe Source recipe data. * @param array $atts Shortcode attributes. */ - $scores = apply_filters( 'cooked_related_recipes_scores', $scores, $source_recipe, $atts ); - - return $scores; + return apply_filters( 'cooked_related_recipes_result', $result, $source_recipe, $atts ); } /** @@ -400,51 +159,4 @@ public static function get_recipe_terms( $recipe_id, $taxonomy ) { $terms = wp_get_object_terms( $recipe_id, $taxonomy, [ 'fields' => 'ids' ] ); return is_wp_error( $terms ) ? [] : $terms; } - - /** - * Get normalized ingredient names from recipe data. - * - * @param array $recipe Recipe data. - * @return array - */ - public static function get_recipe_ingredients( $recipe ) { - $ingredients = []; - if ( ! isset( $recipe['ingredients'] ) || empty( $recipe['ingredients'] ) ) { - return $ingredients; - } - foreach ( $recipe['ingredients'] as $ing ) { - if ( isset( $ing['section_heading_name'] ) ) { - continue; - } - $name = isset( $ing['name'] ) ? trim( strtolower( $ing['name'] ) ) : ''; - if ( $name ) { - $ingredients[] = $name; - } - } - return array_unique( $ingredients ); - } - - /** - * Compare ingredient overlap between two recipes. - * - * @param array $ingredients1 First recipe ingredients. - * @param array $ingredients2 Second recipe ingredients. - * @return float - */ - public static function compare_ingredients( $ingredients1, $ingredients2 ) { - if ( empty( $ingredients1 ) || empty( $ingredients2 ) ) { - return 0; - } - $exact = count( array_intersect( $ingredients1, $ingredients2 ) ); - $partial = 0; - foreach ( $ingredients1 as $ing1 ) { - foreach ( $ingredients2 as $ing2 ) { - if ( $ing1 !== $ing2 && ( strpos( $ing1, $ing2 ) !== false || strpos( $ing2, $ing1 ) !== false ) ) { - $partial += 0.5; - break; - } - } - } - return $exact + $partial; - } } diff --git a/includes/class.cooked-settings.php b/includes/class.cooked-settings.php index a2d7c39..869024c 100644 --- a/includes/class.cooked-settings.php +++ b/includes/class.cooked-settings.php @@ -607,25 +607,6 @@ public static function field_migrate_button( $field_name, $title ) { } } - public static function field_calculate_related_button( $field_name, $title ) { - $last = get_option( 'cooked_related_calculation_last', [] ); - $last_ts = isset( $last['time'] ) ? (int) $last['time'] : 0; - $last_count = isset( $last['count'] ) ? (int) $last['count'] : -1; - $last_text = ''; - if ( $last_ts && $last_count >= 0 ) { - $date = date_i18n( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), $last_ts ); - $last_text = sprintf( __( 'Last: %1$s · %2$s recipes', 'cooked' ), $date, number_format_i18n( $last_count ) ); - } - echo '
'; - echo ''; - echo ''; - echo '
'; - echo ''; - echo ''; - echo '
'; - echo ''; - } - public static function field_text($field_name, $placeholder) { global $_cooked_settings; diff --git a/includes/class.cooked-shortcodes.php b/includes/class.cooked-shortcodes.php index 3c16e18..83c1ad1 100644 --- a/includes/class.cooked-shortcodes.php +++ b/includes/class.cooked-shortcodes.php @@ -1086,7 +1086,8 @@ public function cooked_nutrition_shortcode($atts, $content = null) { /** * Related Recipes Shortcode * - * Displays related recipes based on keywords, cuisines, ingredients, categories, and other factors. + * Displays related recipes based on shared terms in any recipe taxonomy (categories, + * cuisines, cooking methods, tags, diets), random order. No scoring, ingredients, or cache. * * @param array $atts Shortcode attributes * @param string $content Shortcode content @@ -1110,7 +1111,7 @@ public function cooked_related_recipes_shortcode($atts, $content = null) { $recipe_id = (int) $atts['id']; } else { // Invalid ID provided (e.g., "asdas", "", "0", "-5") - return ''; + return ''; } } else { // No ID provided, try to get from current post @@ -1120,7 +1121,7 @@ public function cooked_related_recipes_shortcode($atts, $content = null) { } if (!$recipe_id) { - return ''; + return ''; } // Get the source recipe (allow any status to support drafts/pending) @@ -1138,8 +1139,7 @@ public function cooked_related_recipes_shortcode($atts, $content = null) { return ''; } - // Find related recipes (uses transient cache; pre-calc via Recipes > Tools) - // Limit is applied inside get_related_recipes() based on $atts['limit'] + // Find related recipes (on-demand query: taxonomies OR + orderby rand, no cache) $related_recipes = Cooked_Related_Recipes::get_related_recipes( $recipe_id, $atts ); if (empty($related_recipes)) { @@ -1150,7 +1150,7 @@ public function cooked_related_recipes_shortcode($atts, $content = null) { } else { $empty_msg .= ' ' . __('Try adjusting the matching criteria or ensure you have other published recipes with shared categories, tags, or ingredients.', 'cooked'); } - return ''; + return ''; } // Get recipe IDs for display and filter out deleted/invalid recipes @@ -1163,7 +1163,7 @@ public function cooked_related_recipes_shortcode($atts, $content = null) { * @since 1.12.0 * * @param array $recipe_ids Array of recipe IDs to display. - * @param array $related_recipes Full related recipes array with scores. + * @param array $related_recipes Full related recipes array (each item has 'id'). * @param int $recipe_id Source recipe ID. * @param array $atts Shortcode attributes. */ diff --git a/includes/class.cooked-updates.php b/includes/class.cooked-updates.php index c3262e2..8dc02f9 100644 --- a/includes/class.cooked-updates.php +++ b/includes/class.cooked-updates.php @@ -165,6 +165,9 @@ private static function get_version_updates() { 'fix_recipe_line_endings', 'update_rewrite_rules' ], + '1.13.0' => [ + 'purge_legacy_related_recipes_cache', + ], ]); } @@ -249,6 +252,22 @@ private static function fix_recipe_line_endings() { } } + /** + * Purge legacy related-recipes transients and options (cache and pre-calculation data). + * One-time cleanup when moving to on-demand related recipes with no cache. + * + * @since 1.12.0 + */ + private static function purge_legacy_related_recipes_cache() { + global $wpdb; + + $wpdb->query( "DELETE FROM {$wpdb->options} WHERE option_name LIKE '_transient_cooked_related_%' OR option_name LIKE '_transient_timeout_cooked_related_%'" ); + delete_option( 'cooked_related_version' ); + delete_option( 'cooked_related_calculation_last' ); + + error_log( 'Cooked: Purged legacy related-recipes cache and options.' ); + } + /** * Update rewrite rules if needed * diff --git a/languages/cooked.po b/languages/cooked.po index 364774f..3f398e9 100644 --- a/languages/cooked.po +++ b/languages/cooked.po @@ -143,22 +143,22 @@ msgstr "" msgid "You do not have sufficient permissions to access this page." msgstr "" -#: includes/class.cooked-ajax.php:179 +#: includes/class.cooked-ajax.php:175 #: includes/class.cooked-functions.php:134 #: includes/class.cooked-recipe-meta.php:176 #: includes/class.cooked-recipe-meta.php:263 #: includes/class.cooked-recipe-meta.php:1163 -#: includes/class.cooked-recipes.php:636 +#: includes/class.cooked-recipes.php:635 #: templates/front/recipe.php:34 msgid "Ingredients" msgstr "" -#: includes/class.cooked-ajax.php:179 +#: includes/class.cooked-ajax.php:175 #: includes/class.cooked-functions.php:135 #: includes/class.cooked-recipe-meta.php:176 #: includes/class.cooked-recipe-meta.php:269 #: includes/class.cooked-recipe-meta.php:1194 -#: includes/class.cooked-recipes.php:640 +#: includes/class.cooked-recipes.php:639 #: templates/front/recipe.php:35 msgid "Directions" msgstr "" @@ -203,7 +203,7 @@ msgstr "" #: includes/class.cooked-functions.php:136 #: includes/class.cooked-recipe-meta.php:1378 -#: includes/class.cooked-recipes.php:643 +#: includes/class.cooked-recipes.php:642 #: includes/class.cooked-settings.php:232 #: includes/class.cooked-shortcodes.php:775 msgid "Notes" @@ -583,7 +583,7 @@ msgid "cans" msgstr "" #: includes/class.cooked-measurements.php:202 -#: includes/class.cooked-recipes.php:799 +#: includes/class.cooked-recipes.php:798 #: includes/class.cooked-settings.php:236 msgid "Servings" msgstr "" @@ -1159,7 +1159,7 @@ msgstr "" #: includes/class.cooked-recipe-meta.php:1363 #: includes/class.cooked-recipe-meta.php:1393 #: includes/class.cooked-recipe-meta.php:1438 -#: includes/class.cooked-recipe-meta.php:1564 +#: includes/class.cooked-recipe-meta.php:1561 msgid "Available Variables" msgstr "" @@ -1350,49 +1350,49 @@ 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:268 -#: includes/class.cooked-recipes.php:322 +#: includes/class.cooked-recipes.php:267 +#: includes/class.cooked-recipes.php:321 #: templates/front/recipe-single.php:47 #, php-format msgid "By %s" msgstr "" #. translators: For showing "All" of a taxonomy (ex: "All Burgers") -#: includes/class.cooked-recipes.php:384 +#: includes/class.cooked-recipes.php:383 #, php-format msgid "All %s" msgstr "" -#: includes/class.cooked-recipes.php:651 +#: includes/class.cooked-recipes.php:650 msgid "Beginner" msgstr "" -#: includes/class.cooked-recipes.php:652 +#: includes/class.cooked-recipes.php:651 msgid "Intermediate" msgstr "" -#: includes/class.cooked-recipes.php:653 +#: includes/class.cooked-recipes.php:652 msgid "Advanced" msgstr "" -#: includes/class.cooked-recipes.php:679 +#: includes/class.cooked-recipes.php:678 msgid "Cooked Gallery" msgstr "" -#: includes/class.cooked-recipes.php:683 +#: includes/class.cooked-recipes.php:682 msgid "Envira Gallery" msgstr "" -#: includes/class.cooked-recipes.php:687 +#: includes/class.cooked-recipes.php:686 msgid "Soliloquy Slider" msgstr "" -#: includes/class.cooked-recipes.php:691 +#: includes/class.cooked-recipes.php:690 msgid "Slider Revolution" msgstr "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:766 +#: includes/class.cooked-recipes.php:765 #, php-format msgid "Quarter (%s Serving)" msgid_plural "Quarter (%s Servings)" @@ -1400,7 +1400,7 @@ msgstr[0] "" msgstr[1] "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:769 +#: includes/class.cooked-recipes.php:768 #, php-format msgid "Half (%s Serving)" msgid_plural "Half (%s Servings)" @@ -1408,7 +1408,7 @@ msgstr[0] "" msgstr[1] "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:772 +#: includes/class.cooked-recipes.php:771 #, php-format msgid "Default (%s Serving)" msgid_plural "Default (%s Servings)" @@ -1416,25 +1416,25 @@ msgstr[0] "" msgstr[1] "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:775 +#: includes/class.cooked-recipes.php:774 #, php-format msgid "Double (%s Servings)" msgstr "" #. translators: singular and plural quarter "serving" size -#: includes/class.cooked-recipes.php:778 +#: includes/class.cooked-recipes.php:777 #, php-format msgid "Triple (%s Servings)" msgstr "" -#: includes/class.cooked-recipes.php:792 +#: includes/class.cooked-recipes.php:791 #: includes/class.cooked-shortcodes.php:448 msgid "Yields" msgstr "" #. translators: singular and plural "serving" sizes -#: includes/class.cooked-recipes.php:796 -#: includes/class.cooked-recipes.php:807 +#: includes/class.cooked-recipes.php:795 +#: includes/class.cooked-recipes.php:806 #, php-format msgid "%s Serving" msgid_plural "%s Servings" @@ -1442,51 +1442,51 @@ msgstr[0] "" msgstr[1] "" #. translators: singular and plural "steps" -#: includes/class.cooked-recipes.php:962 +#: includes/class.cooked-recipes.php:961 #: includes/class.cooked-seo.php:83 #, php-format msgid "Step %d" msgstr "" -#: includes/class.cooked-recipes.php:1022 +#: includes/class.cooked-recipes.php:1021 msgid "Browse" msgstr "" -#: includes/class.cooked-recipes.php:1040 +#: includes/class.cooked-recipes.php:1039 #: includes/class.cooked-settings.php:157 msgid "No categories" msgstr "" -#: includes/class.cooked-recipes.php:1043 +#: includes/class.cooked-recipes.php:1042 #: includes/class.cooked-settings.php:204 #: includes/class.cooked-taxonomies.php:38 #: includes/class.cooked-taxonomies.php:48 msgid "Categories" msgstr "" -#: includes/class.cooked-recipes.php:1045 +#: includes/class.cooked-recipes.php:1044 #: includes/class.cooked-taxonomies.php:41 #: includes/widgets/recipe-categories.php:48 msgid "All Categories" msgstr "" -#: includes/class.cooked-recipes.php:1116 +#: includes/class.cooked-recipes.php:1115 msgid "Find a recipe..." msgstr "" -#: includes/class.cooked-recipes.php:1131 +#: includes/class.cooked-recipes.php:1130 msgid "Newest first" msgstr "" -#: includes/class.cooked-recipes.php:1135 +#: includes/class.cooked-recipes.php:1134 msgid "Oldest first" msgstr "" -#: includes/class.cooked-recipes.php:1139 +#: includes/class.cooked-recipes.php:1138 msgid "Alphabetical (A-Z)" msgstr "" -#: includes/class.cooked-recipes.php:1143 +#: includes/class.cooked-recipes.php:1142 msgid "Alphabetical (Z-A)" msgstr "" @@ -2162,7 +2162,7 @@ msgstr "" msgid "h6" msgstr "" -#: includes/class.cooked-recipes.php:1118 +#: includes/class.cooked-recipes.php:1117 msgid "Search" msgstr "" @@ -2229,8 +2229,8 @@ msgstr "" msgid "ex. Apple Sauce, Tofu, etc." msgstr "" -#: includes/class.cooked-recipes.php:904 -#: includes/class.cooked-recipes.php:918 +#: includes/class.cooked-recipes.php:903 +#: includes/class.cooked-recipes.php:917 msgid "or" msgstr "" @@ -2255,11 +2255,11 @@ msgid "Simply add the shortcode to your recipe template or content area. The nav msgstr "" #: includes/class.cooked-recipe-meta.php:1481 -#: includes/class.cooked-related-recipes.php:73 +#: includes/class.cooked-related-recipes.php:34 msgid "Related Recipes" msgstr "" -#: includes/class.cooked-shortcodes.php:1130 +#: includes/class.cooked-shortcodes.php:1131 msgid "Recipe not found." msgstr "" @@ -2281,10 +2281,6 @@ msgstr "" msgid "Create translations of your browse page in %s for full multilingual support." msgstr "" -#: includes/class.cooked-recipe-meta.php:1482 -msgid "This will display a grid of related recipes based on categories, cuisines, ingredients, and other factors." -msgstr "" - #: includes/class.cooked-recipe-meta.php:1490 msgid "Specify a recipe ID. If not provided, uses the current recipe." msgstr "" @@ -2293,14 +2289,6 @@ msgstr "" msgid "Set the heading text for the related recipes section." msgstr "" -#: includes/class.cooked-recipe-meta.php:1507 -msgid "Number of recipes to display (default: 6)." -msgstr "" - -#: includes/class.cooked-recipe-meta.php:1514 -msgid "Number of columns in the grid (default: 3)." -msgstr "" - #: includes/class.cooked-recipe-meta.php:1524 msgid "Hide recipe card images." msgstr "" @@ -2313,111 +2301,79 @@ msgstr "" msgid "Hide recipe card authors." msgstr "" -#: includes/class.cooked-recipe-meta.php:1548 -msgid "Enable/disable matching by categories, cuisines, ingredients, etc. (default: true for most)." -msgstr "" - -#: includes/class.cooked-recipe-meta.php:1555 -msgid "Matching Options:" -msgstr "" - -#: includes/class.cooked-recipe-meta.php:1556 -msgid "Control which factors are used to find related recipes: match_categories, match_cuisines, match_cooking_methods, match_tags, match_diets, match_ingredients, match_author, match_difficulty." -msgstr "" - -#: includes/class.cooked-recipe-meta.php:1558 -msgid "Weight Options:" -msgstr "" - -#: includes/class.cooked-recipe-meta.php:1559 -msgid "Adjust the importance of each matching factor: category_weight, cuisine_weight, cooking_method_weight, tag_weight, diet_weight, ingredient_weight, author_weight, difficulty_weight." -msgstr "" - -#: includes/class.cooked-recipe-meta.php:1566 +#: includes/class.cooked-recipe-meta.php:1563 msgid "Recipe ID" msgstr "" -#: includes/class.cooked-recipe-meta.php:1567 +#: includes/class.cooked-recipe-meta.php:1564 msgid "Section heading" msgstr "" -#: includes/class.cooked-recipe-meta.php:1568 +#: includes/class.cooked-recipe-meta.php:1565 msgid "Number of recipes" msgstr "" -#: includes/class.cooked-recipe-meta.php:1569 +#: includes/class.cooked-recipe-meta.php:1566 msgid "Grid columns" msgstr "" +#: includes/class.cooked-recipe-meta.php:1567 +#: includes/class.cooked-recipe-meta.php:1568 +#: includes/class.cooked-recipe-meta.php:1569 #: includes/class.cooked-recipe-meta.php:1570 -#: includes/class.cooked-recipe-meta.php:1571 -#: includes/class.cooked-recipe-meta.php:1572 -#: includes/class.cooked-recipe-meta.php:1573 msgid "true/false" msgstr "" -#: includes/class.cooked-recipe-meta.php:1574 -msgid "Numeric value" -msgstr "" - -#: includes/class.cooked-recipe-meta.php:1576 +#: includes/class.cooked-recipe-meta.php:1572 msgid "Example" msgstr "" -#: includes/class.cooked-admin-enqueues.php:151 -msgid "Pre-calculate related recipes for all published recipes? This may take a while on large sites." -msgstr "" - -#. translators: 1: date and time, 2: number of recipes -#: includes/class.cooked-admin-enqueues.php:153 -#: includes/class.cooked-settings.php:617 -#, php-format -msgid "Last: %1$s · %2$s recipes" +#: includes/class.cooked-shortcodes.php:1114 +msgid "Invalid recipe ID specified. Please provide a valid numeric recipe ID." msgstr "" -#: includes/class.cooked-related-recipes.php:41 -msgid "Tools" +#: includes/class.cooked-shortcodes.php:1124 +msgid "No recipe found. Please specify a recipe ID using the id attribute, or use this shortcode on a recipe page." msgstr "" -#: includes/class.cooked-related-recipes.php:45 -#: includes/class.cooked-settings.php:621 -msgid "Calculate Related Recipes" +#: includes/class.cooked-shortcodes.php:1135 +#, php-format +msgid "The specified ID (%d) is not a recipe." msgstr "" -#: includes/class.cooked-related-recipes.php:46 -msgid "Pre-calculate related recipes for every published recipe. Uses default shortcode options. Run this after importing or adding many recipes, or when the cache was cleared. One recipe is processed per step to avoid memory issues on large sites." +#: includes/class.cooked-shortcodes.php:1137 +#, php-format +msgid "No post found with ID %d." msgstr "" -#: includes/class.cooked-settings.php:626 -msgid "Done." +#: includes/class.cooked-shortcodes.php:1149 +msgid "This may be because there are no other recipes in the current language with matching attributes." msgstr "" -#: includes/class.cooked-settings.php:626 -msgid "Related recipes cached." +#: includes/class.cooked-shortcodes.php:1151 +msgid "Try adjusting the matching criteria or ensure you have other published recipes with shared categories, tags, or ingredients." msgstr "" -#: includes/class.cooked-shortcodes.php:1113 -msgid "Invalid recipe ID specified. Please provide a valid numeric recipe ID." +#: includes/class.cooked-recipe-meta.php:1482 +msgid "Displays a grid of related recipes based on shared terms in any of the recipe taxonomies (categories, cuisines, cooking methods, tags, diets), shown in random order. No cache or pre-calculation." msgstr "" -#: includes/class.cooked-shortcodes.php:1123 -msgid "No recipe found. Please specify a recipe ID using the id attribute, or use this shortcode on a recipe page." +#: includes/class.cooked-recipe-meta.php:1507 +msgid "Number of recipes to display (default: 4)." msgstr "" -#: includes/class.cooked-shortcodes.php:1134 -#, php-format -msgid "The specified ID (%d) is not a recipe." +#: includes/class.cooked-recipe-meta.php:1514 +msgid "Number of columns in the grid (default: 2)." msgstr "" -#: includes/class.cooked-shortcodes.php:1136 -#, php-format -msgid "No post found with ID %d." +#: includes/class.cooked-recipe-meta.php:1548 +msgid "Toggle which taxonomies are used: match_categories, match_cuisines, match_cooking_methods, match_tags, match_diets (default: true)." msgstr "" -#: includes/class.cooked-shortcodes.php:1149 -msgid "This may be because there are no other recipes in the current language with matching attributes." +#: includes/class.cooked-recipe-meta.php:1555 +msgid "Matching options:" msgstr "" -#: includes/class.cooked-shortcodes.php:1151 -msgid "Try adjusting the matching criteria or ensure you have other published recipes with shared categories, tags, or ingredients." +#: includes/class.cooked-recipe-meta.php:1556 +msgid "Set to false to exclude a taxonomy from related recipes, e.g. match_cuisines=\"false\" to ignore cuisines." msgstr "" diff --git a/languages/cooked.pot b/languages/cooked.pot index 79380de..429a9e3 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.12.0\n" +"Project-Id-Version: Cooked - Recipe Management 1.13.0\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/cooked\n" "Last-Translator: FULL NAME' . __( 'Note:', 'cooked' ) . ' ' . __( 'Recipes will be imported with the \'Draft\' status. After the import is complete, you can bulk edit the recipes and change their status to \'Published\'.', 'cooked' ) . '
'; $import_tabs['csv_import'] = [ From a35fb717eea0ee664ad856ef00b5e37a98f73167 Mon Sep 17 00:00:00 2001 From: mgiannopoulos24' . __( 'Note:', 'cooked' ) . ' ' . __( 'Recipes will be imported with the \'Draft\' status. After the import is complete, you can bulk edit the recipes and change their status to \'Published\'.', 'cooked' ) . '
'; From 0a46b070c5f4817f50dff5247d30ed9f79e21661 Mon Sep 17 00:00:00 2001 From: mgiannopoulos24' + errorMsg + '
').show(); + errorsDiv.html('' + cooked_migration_js_vars.i18n_csv_no_file + '
').show(); return; } if (file.type !== 'text/csv' && !file.name.endsWith('.csv')) { - var invalidFileMsg = (cooked_migration_js_vars.i18n_csv_invalid_file || 'Please select a valid CSV file.'); - errorsDiv.html('' + invalidFileMsg + '
').show(); + errorsDiv.html('' + cooked_migration_js_vars.i18n_csv_invalid_file + '
').show(); return; } @@ -109,7 +107,7 @@ return; } - var confirm_import = confirm(cooked_migration_js_vars.i18n_confirm_csv_import || cooked_migration_js_vars.i18n_confirm_import_recipes || 'Are you sure you want to import recipes from this CSV file?'); + var confirm_import = confirm(cooked_migration_js_vars.i18n_confirm_csv_import); if (!confirm_import) { return; } @@ -126,7 +124,7 @@ $_CookedCSVImportProgress.addClass('cooked-active'); $_CookedCSVImportProgressText.addClass('cooked-active'); $_CookedCSVImportProgress.find('.cooked-progress-bar').css({ "width" : "0%" }); - $_CookedCSVImportProgressText.text(cooked_migration_js_vars.i18n_uploading || 'Uploading...'); + $_CookedCSVImportProgressText.text(cooked_migration_js_vars.i18n_uploading); } // Upload file @@ -138,7 +136,7 @@ contentType: false, success: function(response) { if (response.success) { - $_CookedCSVImportProgressText.text(cooked_migration_js_vars.i18n_processing || 'Processing...'); + $_CookedCSVImportProgressText.text(cooked_migration_js_vars.i18n_processing); $_CookedCSVImportProgress.find('.cooked-progress-bar').css({ "width" : "50%" }); // Process CSV @@ -151,13 +149,11 @@ function(processResponse) { if (processResponse.success) { $_CookedCSVImportProgress.find('.cooked-progress-bar').css({ "width" : "100%" }); - var recipesImportedText = cooked_migration_js_vars.i18n_recipes_imported || 'recipes imported'; - $_CookedCSVImportProgressText.text(processResponse.data.success + ' / ' + processResponse.data.total + ' ' + recipesImportedText); + $_CookedCSVImportProgressText.text(processResponse.data.success + ' / ' + processResponse.data.total + ' ' + cooked_migration_js_vars.i18n_recipes_imported); // Show errors if any if (processResponse.data.errors && processResponse.data.errors.length > 0) { - var errorsLabel = cooked_migration_js_vars.i18n_errors || 'Errors:'; - var errorHtml = '' + errorsLabel + '
' + cooked_migration_js_vars.i18n_errors + '
' + (processResponse.data.message || importFailedText) + '
').show(); - if (processResponse.data.errors && processResponse.data.errors.length > 0) { - var errorHtml = '' + (processResponse.data.message || cooked_migration_js_vars.i18n_import_failed) + '
').show(); thisButton.removeClass('disabled').attr('disabled', false); fileInput.attr('disabled', false); $_CookedCSVImportProgress.removeClass('cooked-active'); @@ -192,16 +179,14 @@ }, 'json' ).fail(function() { - var failedProcessText = cooked_migration_js_vars.i18n_failed_process_csv || 'Failed to process CSV file.'; - errorsDiv.html('' + failedProcessText + '
').show(); + errorsDiv.html('' + cooked_migration_js_vars.i18n_failed_process_csv + '
').show(); thisButton.removeClass('disabled').attr('disabled', false); fileInput.attr('disabled', false); $_CookedCSVImportProgress.removeClass('cooked-active'); $_CookedCSVImportProgressText.removeClass('cooked-active'); }); } else { - var fileUploadFailedText = cooked_migration_js_vars.i18n_file_upload_failed || 'File upload failed.'; - errorsDiv.html('' + (response.data.message || fileUploadFailedText) + '
').show(); + errorsDiv.html('' + (response.data.message || cooked_migration_js_vars.i18n_file_upload_failed) + '
').show(); thisButton.removeClass('disabled').attr('disabled', false); fileInput.attr('disabled', false); $_CookedCSVImportProgress.removeClass('cooked-active'); @@ -209,8 +194,7 @@ } }, error: function() { - var failedUploadText = cooked_migration_js_vars.i18n_failed_upload_csv || 'Failed to upload CSV file.'; - errorsDiv.html('' + failedUploadText + '
').show(); + errorsDiv.html('' + cooked_migration_js_vars.i18n_failed_upload_csv + '
').show(); thisButton.removeClass('disabled').attr('disabled', false); fileInput.attr('disabled', false); $_CookedCSVImportProgress.removeClass('cooked-active'); diff --git a/assets/admin/js/cooked-migration.min.js b/assets/admin/js/cooked-migration.min.js index 846468d..4e2024e 100644 --- a/assets/admin/js/cooked-migration.min.js +++ b/assets/admin/js/cooked-migration.min.js @@ -1 +1 @@ -(c=>{c(document).ready(function(){var e=c("#cooked-migration-button"),o=c("#cooked-import-button"),i=c("#cooked-csv-import-button"),a=(c("#cooked-csv-import-form"),c("#cooked-migration-progress"),c("#cooked-migration-progress-text"),c("#cooked-csv-import-progress")),d=c("#cooked-csv-import-progress-text");e.length&&e.on("click",function(e){e.preventDefault();e=c(this);confirm(cooked_migration_js_vars.i18n_confirm_migrate_recipe)&&!e.hasClass("disabled")&&(e.addClass("disabled").attr("disabled",!0),e.hide(),c.post(cooked_migration_js_vars.ajax_url,{action:"cooked_get_migrate_ids"},function(e){var o;e&&(o=JSON.parse(e),0"+(e.data.message||o)+"
").show(),e.data.errors&&0"+e+"
").show(),t.removeClass("disabled").attr("disabled",!1),r.attr("disabled",!1),a.removeClass("cooked-active"),d.removeClass("cooked-active")})):(o=cooked_migration_js_vars.i18n_file_upload_failed||"File upload failed.",s.html(""+(e.data.message||o)+"
").show(),t.removeClass("disabled").attr("disabled",!1),r.attr("disabled",!1),a.removeClass("cooked-active"),d.removeClass("cooked-active"))},error:function(){var e=cooked_migration_js_vars.i18n_failed_upload_csv||"Failed to upload CSV file.";s.html(""+e+"
").show(),t.removeClass("disabled").attr("disabled",!1),r.attr("disabled",!1),a.removeClass("cooked-active"),d.removeClass("cooked-active")}})):(e=cooked_migration_js_vars.i18n_csv_invalid_file||"Please select a valid CSV file.",s.html(""+e+"
").show()):(o=cooked_migration_js_vars.i18n_csv_no_file||"Please select a CSV file.",s.html(""+o+"
").show())})})})(jQuery);{function cookedDecimalAdjust(e,o,i){return void 0===i||0==+i?Math[e](o):(i=+i,null===(o=+o)||isNaN(o)||"number"!=typeof i||i%1!=0?NaN:o<0?-cookedDecimalAdjust(e,-o,i):(o=o.toString().split("e"),+((o=(o=Math[e](+(o[0]+"e"+(o[1]?+o[1]-i:-i)))).toString().split("e"))[0]+"e"+(o[1]?+o[1]+i:i))))}}Math.round10||(Math.round10=function(e,o){return cookedDecimalAdjust("round",e,o)});var cooked_recipe_migrate_counter=0,progressIterations=0;function cooked_migrate_recipes(e,d){var c,n,_,o,l=0;0"+(e.data.message||cooked_migration_js_vars.i18n_import_failed)+"
").show(),t.removeClass("disabled").attr("disabled",!1),i.attr("disabled",!1),r.removeClass("cooked-active"),a.removeClass("cooked-active"))},"json").fail(function(){s.html(""+cooked_migration_js_vars.i18n_failed_process_csv+"
").show(),t.removeClass("disabled").attr("disabled",!1),i.attr("disabled",!1),r.removeClass("cooked-active"),a.removeClass("cooked-active")})):(s.html(""+(e.data.message||cooked_migration_js_vars.i18n_file_upload_failed)+"
").show(),t.removeClass("disabled").attr("disabled",!1),i.attr("disabled",!1),r.removeClass("cooked-active"),a.removeClass("cooked-active"))},error:function(){s.html(""+cooked_migration_js_vars.i18n_failed_upload_csv+"
").show(),t.removeClass("disabled").attr("disabled",!1),i.attr("disabled",!1),r.removeClass("cooked-active"),a.removeClass("cooked-active")}})):s.html(""+cooked_migration_js_vars.i18n_csv_invalid_file+"
").show():s.html(""+cooked_migration_js_vars.i18n_csv_no_file+"
").show()})})})(jQuery);{function cookedDecimalAdjust(e,o,t){return void 0===t||0==+t?Math[e](o):(t=+t,null===(o=+o)||isNaN(o)||"number"!=typeof t||t%1!=0?NaN:o<0?-cookedDecimalAdjust(e,-o,t):(o=o.toString().split("e"),+((o=(o=Math[e](+(o[0]+"e"+(o[1]?+o[1]-t:-t)))).toString().split("e"))[0]+"e"+(o[1]?+o[1]+t:t))))}}Math.round10||(Math.round10=function(e,o){return cookedDecimalAdjust("round",e,o)});var cooked_recipe_migrate_counter=0,progressIterations=0;function cooked_migrate_recipes(e,d){var c,n,_,o,l=0;0' . __( 'Note:', 'cooked' ) . ' ' . __( 'Recipes will be imported with the \'Draft\' status. After the import is complete, you can bulk edit the recipes and change their status to \'Published\'.', 'cooked' ) . '
'; @@ -217,13 +217,12 @@ public static function field_message( $name, $field_options, $color, $field ) { } public static function field_csv_upload( $name, $field_options, $color, $field ) { - wp_enqueue_script('jquery'); echo '