diff --git a/CITATION.cff b/CITATION.cff index 7e59d83..f0268a1 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -6,7 +6,7 @@ authors: given-names: Justin - family-names: Tresova given-names: Armand -version: 1.10.0 +version: 1.11.0 doi: 10.5281/zenodo.1171250 date-released: 2017-05-08 url: "https://github.com/XjSv/cooked" \ No newline at end of file diff --git a/SECURITY.md b/SECURITY.md index a3abe69..09adbea 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,8 +4,10 @@ Versions that are currently being supported with security updates. | Version | Supported | -| ------- | ------------------ | -| 1.9.4 | :white_check_mark: | +| ----------- | ------------------ | +| 1.11.0 | :white_check_mark: | +| 1.10.0 | :x: | +| 1.9.4 | :x: | | 1.9.3 | :x: | | 1.9.2 | :x: | | 1.9.1 | :x: | diff --git a/assets/admin/js/cooked-functions.js b/assets/admin/js/cooked-functions.js index 7b7b934..0a718de 100644 --- a/assets/admin/js/cooked-functions.js +++ b/assets/admin/js/cooked-functions.js @@ -90,7 +90,7 @@ var $_CookedConditionalTimeout = false; cooked_save_default_nonce = thisButton.data('nonce'), cooked_save_default_bulk_nonce = thisButton.data('bulk-nonce'), thisContainer = thisButton.parent(), - confirm_save = confirm(cooked_js_vars.i18n_confirm_save_default_all), + confirm_save = confirm(cooked_functions_js_vars.i18n_confirm_save_default_all), recipe_editor_textarea = $( "#_recipe_settings_content" ), recipe_editor = tinymce.get('_recipe_settings_content'); @@ -104,7 +104,7 @@ var $_CookedConditionalTimeout = false; thisContainer.find('.button, .button-primary').addClass('disabled'); var ajax__save_default_new = $.post( - cooked_js_vars.ajax_url, + cooked_functions_js_vars.ajax_url, { action: 'cooked_save_default', 'default_content': recipe_editor_content, @@ -112,7 +112,7 @@ var $_CookedConditionalTimeout = false; }, function(result) { var ajax__save_default_all = $.post( - cooked_js_vars.ajax_url, + cooked_functions_js_vars.ajax_url, { action: 'cooked_get_recipe_ids', nonce: cooked_save_default_bulk_nonce @@ -152,14 +152,14 @@ var $_CookedConditionalTimeout = false; if (!thisButton.hasClass('disabled')) { thisContainer.find('.button, .button-primary').addClass('disabled'); var ajax__save_default_new = $.post( - cooked_js_vars.ajax_url, + cooked_functions_js_vars.ajax_url, { action: 'cooked_save_default', 'default_content': recipe_editor_content, nonce: nonce }, function(result) { - thisButton.text( cooked_js_vars.i18n_saved ); + thisButton.text( cooked_functions_js_vars.i18n_saved ); thisContainer.find('.button-primary').removeClass('disabled'); } ).fail(function(result) { @@ -175,14 +175,14 @@ var $_CookedConditionalTimeout = false; var thisButton = $(this), thisContainer = thisButton.parent(), - confirm_load = confirm( cooked_js_vars.i18n_confirm_load_default ), + confirm_load = confirm( cooked_functions_js_vars.i18n_confirm_load_default ), recipe_editor_textarea = $( "#_recipe_settings_content" ), recipe_editor = tinymce.get('_recipe_settings_content'); if (confirm_load && !thisButton.hasClass('disabled')) { thisContainer.find('.button, .button-primary').addClass('disabled'); var ajax__save_default_all = $.post( - cooked_js_vars.ajax_url, + cooked_functions_js_vars.ajax_url, { action: 'cooked_load_default' }, @@ -537,8 +537,8 @@ var $_CookedConditionalTimeout = false; // Sets up the media library frame direction_image_frame = wp.media.frames.direction_image_frame = wp.media({ - title: cooked_js_vars.i18n_image_title, - button: { text: cooked_js_vars.i18n_image_button }, + title: cooked_functions_js_vars.i18n_image_title, + button: { text: cooked_functions_js_vars.i18n_image_button }, library: { type: 'image' } }); @@ -550,7 +550,7 @@ var $_CookedConditionalTimeout = false; // Sends the attachment URL to our custom image input field. $('#direction-'+directionID+'-image-src').attr('src',media_attachment.sizes.thumbnail.url).parent().addClass('cooked-has-image'); $('input[name="_recipe_settings[directions]['+directionID+'][image]"]').val( media_attachment.id ); - $('.direction-image-button[data-id="'+directionID+'"]').prop( 'value', cooked_js_vars.i18n_image_change ); + $('.direction-image-button[data-id="'+directionID+'"]').prop( 'value', cooked_functions_js_vars.i18n_image_change ); }); // Opens the media library frame. @@ -576,8 +576,8 @@ var $_CookedConditionalTimeout = false; // Sets up the media library frame gallery_images_frame = wp.media.frames.gallery_images_frame = wp.media({ - title: cooked_js_vars.i18n_gallery_image_title, - button: { text: cooked_js_vars.i18n_gallery_image_title }, + title: cooked_functions_js_vars.i18n_gallery_image_title, + button: { text: cooked_functions_js_vars.i18n_gallery_image_title }, library: { type: 'image' }, multiple: true }); @@ -616,8 +616,8 @@ var $_CookedConditionalTimeout = false; // Sets up the media library frame var image_edit_frame = wp.media.frames.gallery_images_frame = wp.media({ - title: cooked_js_vars.i18n_edit_image_title, - button: { text: cooked_js_vars.i18n_edit_image_button }, + title: cooked_functions_js_vars.i18n_edit_image_title, + button: { text: cooked_functions_js_vars.i18n_edit_image_button }, library: { type: 'image' }, multiple: false }); @@ -657,7 +657,7 @@ var $_CookedConditionalTimeout = false; if ( directionID ) { $('#direction-'+directionID+'-image-src').parent().removeClass('cooked-has-image').prop('src',false); $('input[name="_recipe_settings[directions]['+directionID+'][image]"]').val(''); - $('.direction-image-button[data-id="'+directionID+'"]').prop( 'value',cooked_js_vars.i18n_image_title ); + $('.direction-image-button[data-id="'+directionID+'"]').prop( 'value',cooked_functions_js_vars.i18n_image_title ); } else { thisButton.parent().remove(); } @@ -705,7 +705,7 @@ function cooked_set_default_template(recipe_ids, total_recipes, content, nonce, } var ajax__bulk_save_default_template = jQuery.post( - cooked_js_vars.ajax_url, + cooked_functions_js_vars.ajax_url, { action: 'cooked_save_default_bulk', recipe_ids: recipe_ids, @@ -724,7 +724,7 @@ function cooked_set_default_template(recipe_ids, total_recipes, content, nonce, progress_text.text(cooked_recipe_update_counter + " / " + total_recipes); cooked_set_default_template(new_recipe_ids, total_recipes, content, nonce, instance); } else { - jQuery('.cooked-save-default-all').text(cooked_js_vars.i18n_applied); + jQuery('.cooked-save-default-all').text(cooked_functions_js_vars.i18n_applied); progress_bar.css({ "width" : "100%" }); progress.removeClass('cooked-active'); progress_text.removeClass('cooked-active').text(""); @@ -869,7 +869,7 @@ function cooked_reset_direction_builder() { var fieldID = 'direction-' + randomKeyForInterval + '-' + directionPartName; thisField.attr('id', fieldID); - if (directionPartName === 'content' && thisField.is('textarea') && cooked_js_vars.wp_editor_roles_allowed) { + if (directionPartName === 'content' && thisField.is('textarea') && cooked_functions_js_vars.wp_editor_roles_allowed) { // Init the WordPress Editor. wp.editor.initialize(fieldID, { tinymce: { diff --git a/assets/admin/js/cooked-functions.min.js b/assets/admin/js/cooked-functions.min.js index b2e2b8b..ec07bab 100644 --- a/assets/admin/js/cooked-functions.min.js +++ b/assets/admin/js/cooked-functions.min.js @@ -1 +1 @@ -var $_CookedConditionalTimeout=!1,cooked_recipe_update_counter=((_=>{_(document).ready(function(){var r,o,t,e,i,n,a,d,c,l=_(".cooked-color-field"),s=_("#cooked_recipe_settings").find("select"),u=_("#cooked-recipe-tabs"),k=(_("#cooked-settings-wrap"),_("#cooked_recipe_settings")),p=k.find("input#submit");$_CookedTooltips=_(".cooked-tooltip"),$_CookedConditionals=_(".cooked-conditional-hidden"),$_CookedSortable=_(".cooked-sortable"),$_CookedRecipeSaveDefault=_(".cooked-layout-save-default"),$_CookedShortcodeField=_(".cooked-shortcode-field"),$_CookedIngredientBuilder=_("#cooked-ingredients-builder"),$_CookedAutoNutritionButton=_(".cooked-auto-nutrition-button"),$_CookedDirectionBuilder=_("#cooked-directions-builder"),$_CookedRecipeGallery=_("#cooked-recipe-image-gallery"),$_CookedNutritionFactsTab=_("#cooked-recipe-tab-content-nutrition"),$_CookedSettingsPanel=_("#cooked-settings-panel"),$_CookedSettingsTabs=_("#cooked-settings-tabs"),l.length&&l.wpColorPicker(),$_CookedSortable.length&&($_CookedSortable.find(".cooked-icon-drag")?$_CookedSortable.sortable({stop:function(e,t){var t=t.item.find("textarea"),o=t.attr("name"),t=t.attr("id");wp.editor.remove(t),wp.editor.initialize(t,{tinymce:{wpautop:!1,toolbar1:"bold,italic,underline,blockquote,strikethrough,bullist,numlist,alignleft,aligncenter,alignright,undo,redo,wp_link_advanced,unlink,fullscreen",toolbar2:"",toolbar3:"",toolbar4:"",height:100,textarea_name:o,plugins:"link lists fullscreen wordpress wplink",setup:function(e){}},quicktags:!0,mediaButtons:!1})}}):$_CookedSortable.sortable()),$_CookedRecipeSaveDefault.length&&($_CookedRecipeSaveDefault.tooltipster({theme:["tooltipster-light","tooltipster-sideTip-cooked"],trigger:"click",animation:"grow",delay:0,speed:200,maxWidth:275,contentAsHTML:!0,interactive:!0,functionReady:function(c,e){_(".cooked-save-default-all").on("click",function(e){e.preventDefault();var o,i=_(this),e=i.data("nonce"),n=i.data("bulk-nonce"),t=i.parent(),a=confirm(cooked_js_vars.i18n_confirm_save_default_all),d=_("#_recipe_settings_content"),r=tinymce.get("_recipe_settings_content");o=null===r?d.val():r.getContent(),a&&!i.hasClass("disabled")&&(t.find(".button, .button-primary").addClass("disabled"),_.post(cooked_js_vars.ajax_url,{action:"cooked_save_default",default_content:o,nonce:e},function(e){_.post(cooked_js_vars.ajax_url,{action:"cooked_get_recipe_ids",nonce:n},function(e){var t;i.removeClass("button-primary").addClass("button"),e&&(t=JSON.parse(e),0<(t=Object.keys(t).length))&&cooked_set_default_template(e,t,o,n,c)})}))}),_(".cooked-save-default-new").on("click",function(e){e.preventDefault();var t=_(this),e=t.data("nonce"),o=t.parent(),i=_("#_recipe_settings_content"),n=tinymce.get("_recipe_settings_content");i=null===n?i.val():n.getContent(),t.hasClass("disabled")||(o.find(".button, .button-primary").addClass("disabled"),_.post(cooked_js_vars.ajax_url,{action:"cooked_save_default",default_content:i,nonce:e},function(e){t.text(cooked_js_vars.i18n_saved),o.find(".button-primary").removeClass("disabled")}).fail(function(e){}))})}}),_(".cooked-layout-load-default").on("click",function(e){e.preventDefault();var e=_(this),t=e.parent(),o=confirm(cooked_js_vars.i18n_confirm_load_default),i=_("#_recipe_settings_content"),n=tinymce.get("_recipe_settings_content");o&&!e.hasClass("disabled")&&(t.find(".button, .button-primary").addClass("disabled"),_.post(cooked_js_vars.ajax_url,{action:"cooked_load_default"},function(e){null===n?i.val(e):(i.val(e),n.setContent(e)),t.find(".button, .button-primary").removeClass("disabled")}).fail(function(e){t.find(".button, .button-primary").removeClass("disabled")}))})),s.length&&s.each(function(){_(this).wrap('
')}),$_CookedTooltips.length&&$_CookedTooltips.tooltipster({theme:["tooltipster-light","tooltipster-sideTip-cooked"],animation:"grow",delay:100,speed:200,maxWidth:275,contentAsHTML:!0,interactive:!0}),$_CookedShortcodeField.length&&$_CookedShortcodeField.on("click",function(e){_(this).select()}),$_CookedConditionals.length&&(r=[],$_CookedConditionals.each(function(){var e=_(this),t=_(this).data("condition"),o=_(this).data("value"),i=_("#"+t),o=!!o&&o.split(" "),n=e.is("li")||e.is("span")?"inline-block":"block";i.is(":checkbox")&&i.is(":checked")||i.is(":radio")&&i.is(":checked")||!(i.is(":checkbox")&&!i.is(":checked")||i.is(":radio")&&!i.is(":checked"))&&(!i.is(":checkbox")&&!o&&i.val()||!i.is(":checkbox")&&o&&-1<_.inArray(i.val(),o)||!i.is(":radio")&&!o&&i.val()||!i.is(":radio")&&o&&-1<_.inArray(i.val(),o))?e.css({display:n}):e.hide(),-1==_.inArray(t,r)&&r.push(t);for(var a=r.length,d=0;d a").attr("href")).split("#"))[1],_(".cooked-settings-tab-content").hide(),_("#cooked-settings-tab-content-"+n).show(),s.on("click",function(e){_(".tab-content").hide();var t=_(this).find("a"),t=($_CookedSettingsTabs.find("li").removeClass("active"),_(this).addClass("active"),t.attr("href"));"migration"==(t=(t=t.split("#"))[1])?p.hide():p.show(),_(".cooked-settings-tab-content").hide(),_("#cooked-settings-tab-content-"+t).show(),_("#cooked-settings-panel").hasClass("stuck")?window.scrollTo(0,130):window.scrollTo(0,0)})),$_CookedIngredientBuilder.length&&(cooked_reset_ingredient_builder(),$_CookedIngredientBuilder.on("keydown",'input[data-ingredient-part="name"]',function(e){9!==e.keyCode&&13!==e.keyCode||_(this).parents(".cooked-ingredient-block").is(":last-child")&&(e.preventDefault(),_("#cooked-recipe-tab-content-ingredients").find(".cooked-add-ingredient-button").trigger("click"),$_CookedIngredientBuilder.find('.cooked-ingredient-block:last-child input[data-ingredient-part="amount"]').focus())}),$_CookedIngredientBuilder.parent().on("click",".cooked-show-heading-element",function(e){e.preventDefault();e=_(this).parent();e.hasClass("cooked-expanded")?e.removeClass("cooked-expanded"):(e.addClass("cooked-expanded"),e.find('input[data-ingredient-part="section_heading_element"]').focus())}),$_CookedAutoNutritionButton.length&&$_CookedIngredientBuilder.on("change",'input[data-ingredient-part="name"]',function(e){var t=!1;$_CookedIngredientBuilder.find('input[data-ingredient-part="name"]').each(function(){if(""!=_(this).val())return!(t=!0)}),t?$_CookedAutoNutritionButton.prop("disabled",!1):$_CookedAutoNutritionButton.prop("disabled",!0)}),$_CookedIngredientBuilder.on("keyup",'input[data-ingredient-part="url"]',function(e){var t=_(this).val(),o=_(this).parents(".recipe-setting-block");t?o.addClass("cooked-has-url"):o.removeClass("cooked-has-url")}),$_CookedIngredientBuilder.parent().on("click",".cooked-add-ingredient-button",function(e){e.preventDefault();e=$_CookedIngredientBuilder.parent().find(".cooked-ingredient-template").clone().removeClass("cooked-template cooked-ingredient-template").addClass("cooked-ingredient-block");$_CookedIngredientBuilder.append(e),cooked_reset_ingredient_builder()}),$_CookedIngredientBuilder.parent().on("click",".cooked-add-heading-button",function(e){e.preventDefault();e=$_CookedIngredientBuilder.parent().find(".cooked-heading-template").clone().removeClass("cooked-template cooked-heading-template").addClass("cooked-ingredient-block cooked-ingredient-heading");$_CookedIngredientBuilder.append(e),cooked_reset_ingredient_builder()}),$_CookedIngredientBuilder.parent().on("click",".cooked-delete-ingredient",function(e){e.preventDefault(),_(this).parent().remove(),cooked_reset_ingredient_builder()})),$_CookedDirectionBuilder.length&&(cooked_reset_direction_builder(),$_CookedDirectionBuilder.parent().on("click",".cooked-show-heading-element",function(e){e.preventDefault();e=_(this).parent();e.hasClass("cooked-expanded")?e.removeClass("cooked-expanded"):(e.addClass("cooked-expanded"),e.find('input[data-direction-part="section_heading_element"]').focus())}),$_CookedDirectionBuilder.parent().on("click",".cooked-add-direction-button",function(e){e.preventDefault();e=$_CookedDirectionBuilder.parent().find(".cooked-direction-template").clone().removeClass("cooked-template cooked-direction-template").addClass("cooked-direction-block");$_CookedDirectionBuilder.append(e),cooked_reset_direction_builder()}),$_CookedDirectionBuilder.parent().on("click",".cooked-add-heading-button",function(e){e.preventDefault();e=$_CookedDirectionBuilder.parent().find(".cooked-heading-template").clone().removeClass("cooked-template cooked-heading-template").addClass("cooked-direction-block cooked-direction-heading");$_CookedDirectionBuilder.append(e),cooked_reset_direction_builder()}),$_CookedDirectionBuilder.parent().on("click",".cooked-delete-direction",function(e){e.preventDefault(),_(this).parent().remove(),cooked_reset_direction_builder()}),$_CookedDirectionBuilder.parent().on("click",".remove-image-button",function(e){e.preventDefault(),_(this).parent().removeClass("cooked-has-image"),_(this).parent().find("img").remove(),_(this).parent().find('input[data-direction-part="image"]').val(""),cooked_reset_direction_builder()}),_("body").on("click",".cooked-direction-img-placeholder, .cooked-direction-img",function(e){e.preventDefault(),_(this).parent().find(".direction-image-button").trigger("click")}),_("body").on("click",".direction-image-button",function(e){var t=_(this);d=t.data("id"),e.preventDefault(),a||(a=wp.media.frames.direction_image_frame=wp.media({title:cooked_js_vars.i18n_image_title,button:{text:cooked_js_vars.i18n_image_button},library:{type:"image"}})).on("select",function(){var e=a.state().get("selection").first().toJSON();_("#direction-"+d+"-image-src").attr("src",e.sizes.thumbnail.url).parent().addClass("cooked-has-image"),_('input[name="_recipe_settings[directions]['+d+'][image]"]').val(e.id),_('.direction-image-button[data-id="'+d+'"]').prop("value",cooked_js_vars.i18n_image_change)}),a.open()})),$_CookedRecipeGallery.length&&(cooked_init_gallery_sorting(),_("body").on("click",".cooked-gallery-add-button",function(e){_(this);e.preventDefault(),c||(c=wp.media.frames.gallery_images_frame=wp.media({title:cooked_js_vars.i18n_gallery_image_title,button:{text:cooked_js_vars.i18n_gallery_image_title},library:{type:"image"},multiple:!0})).on("select",function(){var e,t,o,i=c.state().get("selection").toJSON();for(e in i)i.hasOwnProperty(e)&&(o=(t=i[e]).sizes.thumbnail.url,_("#cooked-recipe-image-gallery").append(''));cooked_init_gallery_sorting()}),c.open()}),_("body").on("click",".cooked-recipe-gallery-item img",function(e){e.preventDefault(),_(this).parent().find(".cooked-gallery-edit-button").trigger("click")}),_("body").on("click",".cooked-gallery-edit-button",function(e){var n=_(this),t=n.data("attachment-id"),a=(e.preventDefault(),wp.media.frames.gallery_images_frame=wp.media({title:cooked_js_vars.i18n_edit_image_title,button:{text:cooked_js_vars.i18n_edit_image_button},library:{type:"image"},multiple:!1}));a.on("open",function(){var e=a.state().get("selection");(attachment=wp.media.attachment(t)).fetch(),e.add(attachment?[attachment]:[])}),a.open(),a.on("select",function(){var e,t,o,i=a.state().get("selection").toJSON();for(e in i)i.hasOwnProperty(e)&&(o=(t=i[e]).sizes.thumbnail.url,n.parent().replaceWith(''));cooked_init_gallery_sorting()})}),$_CookedRecipeGallery.on("click",".remove-image-button",function(e){var t=_(this);d=t.data("id"),e.preventDefault(),d?(_("#direction-"+d+"-image-src").parent().removeClass("cooked-has-image").prop("src",!1),_('input[name="_recipe_settings[directions]['+d+'][image]"]').val(""),_('.direction-image-button[data-id="'+d+'"]').prop("value",cooked_js_vars.i18n_image_title)):t.parent().remove()})),$_CookedNutritionFactsTab.length&&(init_nutrition_facts($_CookedNutritionFactsTab),$_CookedNutritionFactsTab.on("keyup","input",function(e){init_nutrition_facts($_CookedNutritionFactsTab)})),_("#cooked-prep-time").length&&_("#cooked-prep-time,#cooked-cook-time").on("change",function(){cooked_updateTotalTimeValue(parseInt(_("#cooked-prep-time").val()),parseInt(_("#cooked-cook-time").val()))})})})(jQuery),0);function cooked_set_default_template(e,o,i,n,a){var d,r,c,l;0[cooked-browse]'),
'type' => 'select',
'default' => 0,
'options' => $categories_array
@@ -286,7 +310,7 @@ public static function tabs_fields() {
'browse_default_sort' => [
'title' => __('Default Sort Order', 'cooked'),
/* translators: a description on how to set the default sort order for the [cooked-browse] shortcode. */
- 'desc' => sprintf(__('Set the default sort order for your %s shortcode display.', 'cooked'), '[cooked-browse]'),
+ 'desc' => sprintf(__('Set the default sort order for your %s shortcode display.', 'cooked'), '[cooked-browse]'),
'type' => 'select',
'default' => 'date_desc',
'options' => apply_filters(
@@ -299,11 +323,29 @@ public static function tabs_fields() {
]
)
],
+ 'section_heading_default_html_tag' => [
+ 'title' => __('Section Heading Default HTML Tag', 'cooked'),
+ /* translators: a description on how to set the default sort order for the [cooked-browse] shortcode. */
+ 'desc' => __('Set the default HTML tag for your section headings.', 'cooked'),
+ 'type' => 'select',
+ 'default' => 'div',
+ 'options' => apply_filters(
+ 'cooked_settings_section_heading_default_html_tag_options',
+ [
+ 'div' => __('div', 'cooked'),
+ 'h2' => __('h2', 'cooked'),
+ 'h3' => __('h3', 'cooked'),
+ 'h4' => __('h4', 'cooked'),
+ 'h5' => __('h5', 'cooked'),
+ 'h6' => __('h6', 'cooked'),
+ ]
+ )
+ ],
'recipe_wp_editor_roles' => [
'title' => __('WP Editor Roles', 'cooked'),
'desc' => __('Choose which user roles can use the WP Editor for the Excerpt, Directions & Notes fields.', 'cooked'),
'type' => 'checkboxes',
- 'default' => apply_filters('cooked_add_recipe_wp_editor_roles_defaults', ['administrator', 'editor', 'cooked_recipe_editor']),
+ 'default' => apply_filters('cooked_recipe_wp_editor_roles_defaults', ['administrator', 'editor', 'cooked_recipe_editor']),
'options' => $role_options
],
'advanced' => [
diff --git a/includes/class.cooked-shortcodes.php b/includes/class.cooked-shortcodes.php
index 3f0ff25..62d7f44 100644
--- a/includes/class.cooked-shortcodes.php
+++ b/includes/class.cooked-shortcodes.php
@@ -134,10 +134,11 @@ public function cooked_timer( $atts, $content = null ) {
}
$timer_id = md5( $seconds . $desc . $content ) . '_' . $cooked_timer_identifier;
+ $desc = $desc ? wp_strip_all_tags( $desc ) : wp_strip_all_tags( $content );
wp_enqueue_script( 'cooked-timer' );
- return ' ' . wp_kses_post( $content ) . '';
+ return ' ' . wp_kses_post( $content ) . '';
}
public function cooked_browse_shortcode( $sc_atts, $content = null ) {
@@ -567,6 +568,7 @@ public function cooked_info_shortcode($atts, $content = null) {
function cooked_kses_servings_switcher($tags) {
$tags['select'] = [
'name' => true,
+ 'id' => true,
'class' => true,
];
$tags['option'] = [
@@ -594,6 +596,7 @@ public static function cooked_info_author() {
if ( !empty($author['id']) ) {
$author_slug = !empty($author['name']) ? sanitize_title($author['name']) : false;
+ // @TODO: Convert the homepage link to use pretty URLs.
$permalink = $front_page_id != $browse_page_id && get_option('permalink_structure') ? esc_url( untrailingslashit( $browse_page_url ) . '/' . $_cooked_settings['recipe_author_permalink'] . '/' . $author['id'] . '/' . trailingslashit( $author_slug ) ) : esc_url( trailingslashit( get_home_url() ) . 'index.php?page_id=' . $_cooked_settings['browse_page'] . '&recipe_author=' . $author['id'] );
$permalink = apply_filters( 'cooked_author_permalink', $permalink, $author['id'] );
} else {
@@ -606,7 +609,7 @@ public static function cooked_info_author() {
echo '';
wp_reset_postdata();
@@ -638,13 +641,13 @@ public static function cooked_info_print() {
$query_args['print'] = 1;
$servings = (float)esc_html( get_query_var( 'servings', false ) );
$query_args['servings'] = !empty($servings) ? $servings : false;
- echo '';
+ echo '';
}
public static function cooked_info_fullscreen() {
global $recipe_settings, $_cooked_settings;
- echo '';
+ echo '';
wp_enqueue_script('cooked-nosleep');
}
@@ -793,7 +796,7 @@ public function cooked_image_shortcode($atts, $content = null) {
if (has_post_thumbnail($recipe)) :
echo '' . esc_html( isset($nutrition_facts[$slug]) ? $nutrition_facts[$slug] : '' ) . '
'; - echo ''; + echo '' . $servings_change . ' ' . esc_html(strtolower($nf['name'])) . '
'; endif; endforeach; - echo '* ' . __('The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.','cooked') . '
'; endif; diff --git a/includes/class.cooked-taxonomies.php b/includes/class.cooked-taxonomies.php index f3ed45b..f2cf640 100644 --- a/includes/class.cooked-taxonomies.php +++ b/includes/class.cooked-taxonomies.php @@ -159,14 +159,14 @@ public static function term_link_filter( $url, $term, $taxonomy ) { $custom_cooked_tax_setting = 'recipe_category_permalink'; } - // $browse_page_id = $_cooked_settings['browse_page']; - // $browse_page_link = get_permalink($browse_page_id); - // $url_test = $browse_page_link . '?taxonomy=' . $taxonomy . '&term=' . $term->slug; - if ( $parent_page_browse_page != $front_page && get_option('permalink_structure') ) { $url = esc_url_raw( untrailingslashit( get_permalink( $parent_page_browse_page ) ) . '/' . $_cooked_settings[$custom_cooked_tax_setting] . '/' . $term->slug ); } elseif ( $parent_page_browse_page == $front_page ) { - $url = esc_url_raw( get_home_url() . '?' . $taxonomy . '=' . ( isset( $term->slug ) ? $term->slug : $taxonomy ) ); + if ( get_option('permalink_structure') ) { + $url = esc_url_raw( get_home_url() . '/' . $_cooked_settings[$custom_cooked_tax_setting] . '/' . $term->slug ); + } else { + $url = esc_url_raw( get_home_url() . '?' . $taxonomy . '=' . ( isset( $term->slug ) ? $term->slug : $taxonomy ) ); + } } else { $url = esc_url_raw( get_permalink( $parent_page_browse_page ) . '&' . $taxonomy . '=' . ( isset( $term->slug ) ? $term->slug : $taxonomy ) ); } diff --git a/includes/class.cooked-users.php b/includes/class.cooked-users.php index 497e9bb..0b29e06 100644 --- a/includes/class.cooked-users.php +++ b/includes/class.cooked-users.php @@ -19,7 +19,7 @@ */ class Cooked_Users { - function __construct(){ + function __construct() { add_action( 'init', [&$this, 'recipe_author_rewrite'], 10 ); add_filter( 'manage_users_columns', [&$this, 'recipe_count_column'] ); @@ -98,9 +98,24 @@ public static function format_author_name( $name, $format = false ) { $format = 'full'; endif; + $filtered = apply_filters( 'cooked_format_author_name', $name, $format ); + + // If the filter returns an array with a second element true, treat as safe. + if ( is_array( $filtered ) && isset( $filtered[1] ) && $filtered[1] === true ) { + $name = $filtered[0]; + $safe = true; + } else { + $name = is_array( $filtered ) ? $filtered[0] : $filtered; + $safe = false; + } + switch ( $format ) { case 'full': - return $name; + if ( $safe ) { + return $name; + } else { + return esc_html( $name ); + } case 'first_last_initial': $name = explode( ' ', $name ); if ( isset($name[1]) ): @@ -118,7 +133,11 @@ public static function format_author_name( $name, $format = false ) { return esc_html( $name[0] ); } - return esc_html( $name ); + if ( $safe ) { + return $name; + } else { + return esc_html( $name ); + } } function recipe_count_column($column_headers) { @@ -141,7 +160,6 @@ function recipe_count_column_value( $value, $column_name, $user_id ) { return $value; } - function pre_user_query( $query ) { global $wpdb, $current_screen; diff --git a/languages/cooked.po b/languages/cooked.po index 712819c..06dd516 100644 --- a/languages/cooked.po +++ b/languages/cooked.po @@ -87,6 +87,7 @@ msgstr "" #. translators: confirmation for migrating all ### recipes, where ### displays the total number for the migration. #: includes/class.cooked-admin-enqueues.php:149 +#, php-format msgid "Please confirm that you are ready to migrate all %s recipes." msgstr "" @@ -96,15 +97,15 @@ msgstr "" #: includes/class.cooked-admin-menus.php:36 #: includes/class.cooked-admin-menus.php:59 -#: includes/class.cooked-post-types.php:454 -#: includes/class.cooked-post-types.php:466 -#: includes/class.cooked-users.php:125 +#: includes/class.cooked-post-types.php:421 +#: includes/class.cooked-post-types.php:433 +#: includes/class.cooked-users.php:144 msgid "Recipes" msgstr "" #: includes/class.cooked-admin-menus.php:37 #: includes/class.cooked-admin-menus.php:61 -#: includes/class.cooked-post-types.php:456 +#: includes/class.cooked-post-types.php:423 msgid "Add New" msgstr "" @@ -112,7 +113,7 @@ msgstr "" #: includes/class.cooked-admin-menus.php:45 #: includes/class.cooked-admin-menus.php:65 #: includes/class.cooked-recipe-meta.php:94 -#: includes/class.cooked-shortcodes.php:148 +#: includes/class.cooked-shortcodes.php:149 #: templates/admin/welcome.php:18 msgid "Settings" msgstr "" @@ -131,7 +132,7 @@ msgid "Upgrade to Pro" msgstr "" #: includes/class.cooked-admin-menus.php:60 -#: includes/class.cooked-post-types.php:461 +#: includes/class.cooked-post-types.php:428 msgid "All Recipes" msgstr "" @@ -167,17 +168,19 @@ msgstr "" msgid "Error importing recipe." msgstr "" -#: includes/class.cooked-enqueues.php:39 +#: includes/class.cooked-enqueues.php:52 #: includes/class.cooked-recipe-meta.php:1309 msgid "Timer" msgstr "" #. translators: a title for the "What's new in Cooked?" section. #: includes/class.cooked-functions.php:96 +#, php-format msgid "What's new in %s?" msgstr "" #: includes/class.cooked-functions.php:120 +#: includes/class.cooked-shortcodes.php:644 msgid "Print" msgstr "" @@ -195,7 +198,7 @@ msgstr "" #: includes/class.cooked-functions.php:125 #: includes/class.cooked-recipe-meta.php:1254 -#: includes/class.cooked-settings.php:228 +#: includes/class.cooked-settings.php:253 msgid "Excerpt" msgstr "" @@ -206,8 +209,8 @@ msgstr "" #: includes/class.cooked-functions.php:129 #: includes/class.cooked-recipe-meta.php:1278 #: includes/class.cooked-recipes.php:643 -#: includes/class.cooked-settings.php:229 -#: includes/class.cooked-shortcodes.php:760 +#: includes/class.cooked-settings.php:254 +#: includes/class.cooked-shortcodes.php:763 msgid "Notes" msgstr "" @@ -218,6 +221,7 @@ msgstr "" #. translators: for displaying singular or plural versions depending on the number of recipes. #: includes/class.cooked-import.php:42 +#, php-format msgid "There is %1$s recipe that should be imported from %2$s." msgid_plural "There are %1$s recipes that should be imported from %2$s." msgstr[0] "" @@ -289,7 +293,7 @@ msgid "Begin Import" msgstr "" #: includes/class.cooked-import.php:119 -#: includes/class.cooked-settings.php:584 +#: includes/class.cooked-settings.php:625 msgid "reload" msgstr "" @@ -572,7 +576,8 @@ msgid "cans" msgstr "" #: includes/class.cooked-measurements.php:202 -#: includes/class.cooked-settings.php:233 +#: includes/class.cooked-recipes.php:799 +#: includes/class.cooked-settings.php:258 msgid "Servings" msgstr "" @@ -748,6 +753,7 @@ msgstr "" #: includes/class.cooked-measurements.php:703 #: includes/class.cooked-measurements.php:714 #: includes/class.cooked-measurements.php:732 +#, php-format msgid "%d min" msgstr "" @@ -755,33 +761,39 @@ msgstr "" #: includes/class.cooked-measurements.php:703 #: includes/class.cooked-measurements.php:714 #: includes/class.cooked-measurements.php:732 +#, php-format msgid "%d mins" msgstr "" #. translators: singular and plural number of hours (shorthand) #: includes/class.cooked-measurements.php:712 #: includes/class.cooked-measurements.php:730 +#, php-format msgid "%d hr" msgstr "" #. translators: singular and plural number of hours (shorthand) #: includes/class.cooked-measurements.php:712 #: includes/class.cooked-measurements.php:730 +#, php-format msgid "%d hrs" msgstr "" #. translators: singular and plural number of days #: includes/class.cooked-measurements.php:728 +#, php-format msgid "%d day" msgstr "" #. translators: singular and plural number of days #: includes/class.cooked-measurements.php:728 +#, php-format msgid "%d days" msgstr "" #. translators: for displaying singular or plural versions depending on the number of recipes. #: includes/class.cooked-migration.php:47 +#, php-format msgid "There is %1$s recipe that should be migrated from %2$s to take advantage of new features and reliability." msgid_plural "There are %1$s recipes that should be migrated from %2$s to take advantage of new features and reliability." msgstr[0] "" @@ -817,6 +829,7 @@ msgstr "" #. translators: for displaying singular or plural versions depending on the number of recipes. #: includes/class.cooked-migration.php:90 +#, php-format msgid "There is %1$s recipe that is from an older version of Cooked. Please %2$s to migrate this recipe." msgid_plural "There are %1$s recipes that are from an older version of Cooked. Please %2$s to migrate these recipes." msgstr[0] "" @@ -835,47 +848,47 @@ msgstr "" msgid "Photo" msgstr "" -#: includes/class.cooked-post-types.php:436 +#: includes/class.cooked-post-types.php:403 msgid "Recipe Archive" msgstr "" -#: includes/class.cooked-post-types.php:455 +#: includes/class.cooked-post-types.php:422 msgid "Recipe" msgstr "" -#: includes/class.cooked-post-types.php:457 +#: includes/class.cooked-post-types.php:424 msgid "Add New Recipe" msgstr "" -#: includes/class.cooked-post-types.php:458 +#: includes/class.cooked-post-types.php:425 msgid "New Recipe" msgstr "" -#: includes/class.cooked-post-types.php:459 +#: includes/class.cooked-post-types.php:426 msgid "Edit Recipe" msgstr "" -#: includes/class.cooked-post-types.php:460 +#: includes/class.cooked-post-types.php:427 msgid "View Recipe" msgstr "" -#: includes/class.cooked-post-types.php:462 +#: includes/class.cooked-post-types.php:429 msgid "Search Recipes" msgstr "" -#: includes/class.cooked-post-types.php:463 +#: includes/class.cooked-post-types.php:430 msgid "No recipes found." msgstr "" -#: includes/class.cooked-post-types.php:464 +#: includes/class.cooked-post-types.php:431 msgid "No recipes found in trash." msgstr "" -#: includes/class.cooked-post-types.php:492 +#: includes/class.cooked-post-types.php:459 msgid "Recipe title ..." msgstr "" -#: includes/class.cooked-post-types.php:510 +#: includes/class.cooked-post-types.php:477 msgid "Cooked Browse Recipes Page" msgstr "" @@ -915,6 +928,7 @@ msgstr "" #. translators: for displaying singular or plural versions depending on the number of recipes. #: includes/class.cooked-recipe-meta.php:305 +#, php-format msgid "It looks like this recipe is from a different version of %s. Please review and click \"Update\" to save it." msgstr "" @@ -971,15 +985,15 @@ msgid "This description is used for SEO purposes and is optional. By default, Co msgstr "" #: includes/class.cooked-recipe-meta.php:380 -#: includes/class.cooked-settings.php:227 +#: includes/class.cooked-settings.php:252 msgid "Difficulty Level" msgstr "" #: includes/class.cooked-recipe-meta.php:389 #: includes/class.cooked-recipe-meta.php:1037 -#: includes/class.cooked-settings.php:230 -#: includes/class.cooked-shortcodes.php:447 -#: includes/class.cooked-shortcodes.php:656 +#: includes/class.cooked-settings.php:255 +#: includes/class.cooked-shortcodes.php:448 +#: includes/class.cooked-shortcodes.php:659 msgid "Prep Time" msgstr "" @@ -991,18 +1005,18 @@ msgstr "" #: includes/class.cooked-recipe-meta.php:394 #: includes/class.cooked-recipe-meta.php:1038 -#: includes/class.cooked-settings.php:231 -#: includes/class.cooked-shortcodes.php:448 -#: includes/class.cooked-shortcodes.php:665 +#: includes/class.cooked-settings.php:256 +#: includes/class.cooked-shortcodes.php:449 +#: includes/class.cooked-shortcodes.php:668 msgid "Cook Time" msgstr "" #: includes/class.cooked-recipe-meta.php:399 #: includes/class.cooked-recipe-meta.php:1039 -#: includes/class.cooked-settings.php:232 -#: includes/class.cooked-shortcodes.php:449 -#: includes/class.cooked-shortcodes.php:676 -#: includes/class.cooked-shortcodes.php:683 +#: includes/class.cooked-settings.php:257 +#: includes/class.cooked-shortcodes.php:450 +#: includes/class.cooked-shortcodes.php:679 +#: includes/class.cooked-shortcodes.php:686 msgid "Total Time" msgstr "" @@ -1057,27 +1071,27 @@ msgid "Nutrition Information" msgstr "" #: includes/class.cooked-recipe-meta.php:839 -#: includes/class.cooked-shortcodes.php:1045 +#: includes/class.cooked-shortcodes.php:1048 msgid "Nutrition Facts" msgstr "" #: includes/class.cooked-recipe-meta.php:857 -#: includes/class.cooked-shortcodes.php:1013 +#: includes/class.cooked-shortcodes.php:1016 msgid "Amount per serving" msgstr "" #: includes/class.cooked-recipe-meta.php:867 -#: includes/class.cooked-shortcodes.php:1023 +#: includes/class.cooked-shortcodes.php:1026 msgid "% Daily Value *" msgstr "" #: includes/class.cooked-recipe-meta.php:886 -#: includes/class.cooked-shortcodes.php:955 +#: includes/class.cooked-shortcodes.php:958 msgid "Includes" msgstr "" #: includes/class.cooked-recipe-meta.php:918 -#: includes/class.cooked-shortcodes.php:1049 +#: includes/class.cooked-shortcodes.php:1052 msgid "The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice." msgstr "" @@ -1091,11 +1105,13 @@ msgstr "" #. translators: a title for the video section of the recipe editor, where users can paste a YouToub or Vimeo URL into the field below. #: includes/class.cooked-recipe-meta.php:961 +#, php-format msgid "%1$s or %2$s Video" msgstr "" #. translators: a message describing how to display a video from YouTube or Vimeo. #: includes/class.cooked-recipe-meta.php:965 +#, php-format msgid "If you would like to display a video as the first item in your gallery, you can paste a valid %1$s or %2$s URL below." msgstr "" @@ -1115,6 +1131,7 @@ msgstr "" #. translators: "left and right" section title #: includes/class.cooked-recipe-meta.php:1011 #: includes/class.cooked-recipe-meta.php:1021 +#, php-format msgid "\"%1$s\" and \"%2$s\"" msgstr "" @@ -1139,15 +1156,15 @@ msgid "Available Variables" msgstr "" #: includes/class.cooked-recipe-meta.php:1036 -#: includes/class.cooked-settings.php:225 -#: includes/class.cooked-shortcodes.php:444 -#: includes/class.cooked-shortcodes.php:609 +#: includes/class.cooked-settings.php:250 +#: includes/class.cooked-shortcodes.php:445 +#: includes/class.cooked-shortcodes.php:612 msgid "Author" msgstr "" #: includes/class.cooked-recipe-meta.php:1040 -#: includes/class.cooked-shortcodes.php:445 -#: includes/class.cooked-shortcodes.php:620 +#: includes/class.cooked-shortcodes.php:446 +#: includes/class.cooked-shortcodes.php:623 msgid "Difficulty" msgstr "" @@ -1156,9 +1173,9 @@ msgid "Servings Switcher" msgstr "" #: includes/class.cooked-recipe-meta.php:1042 -#: includes/class.cooked-settings.php:226 -#: includes/class.cooked-shortcodes.php:703 +#: includes/class.cooked-settings.php:251 #: includes/class.cooked-shortcodes.php:706 +#: includes/class.cooked-shortcodes.php:709 #: includes/class.cooked-taxonomies.php:39 msgid "Category" msgstr "" @@ -1247,21 +1264,25 @@ msgstr "" #. translators: related to the width of slideshows: "80% or 300px" section title #: includes/class.cooked-recipe-meta.php:1223 +#, php-format msgid "ex: \"%1$s\" or \"%2$s\"" msgstr "" #. translators: related to the image ratio for slideshows: "ex: 800/600" section title #: includes/class.cooked-recipe-meta.php:1228 +#, php-format msgid "ex: \"%s\"" msgstr "" #. translators: related to the navigation style for slideshows: "dots, thumbs or false" section title #: includes/class.cooked-recipe-meta.php:1233 +#, php-format msgid "\"%1$s\", \"%2$s\", or \"%3$s\"" msgstr "" #. translators: related to allowing full screen for slideshows: "true or false" section title #: includes/class.cooked-recipe-meta.php:1238 +#, php-format msgid "\"%1$s\" or \"%2$s\"" msgstr "" @@ -1291,6 +1312,7 @@ msgstr "" #. translators: "seconds, minutes and hours" section title #: includes/class.cooked-recipe-meta.php:1319 +#, php-format msgid "\"%1$s\", \"%2$s\" and \"%3$s\"" msgstr "" @@ -1323,11 +1345,13 @@ msgstr "" #: includes/class.cooked-recipes.php:268 #: includes/class.cooked-recipes.php:322 #: 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 +#, php-format msgid "All %s" msgstr "" @@ -1361,6 +1385,7 @@ msgstr "" #. translators: singular and plural quarter "serving" size #: includes/class.cooked-recipes.php:766 +#, php-format msgid "Quarter (%s Serving)" msgid_plural "Quarter (%s Servings)" msgstr[0] "" @@ -1368,6 +1393,7 @@ msgstr[1] "" #. translators: singular and plural quarter "serving" size #: includes/class.cooked-recipes.php:769 +#, php-format msgid "Half (%s Serving)" msgid_plural "Half (%s Servings)" msgstr[0] "" @@ -1375,6 +1401,7 @@ msgstr[1] "" #. translators: singular and plural quarter "serving" size #: includes/class.cooked-recipes.php:772 +#, php-format msgid "Default (%s Serving)" msgid_plural "Default (%s Servings)" msgstr[0] "" @@ -1382,72 +1409,76 @@ msgstr[1] "" #. translators: singular and plural quarter "serving" size #: includes/class.cooked-recipes.php:775 +#, php-format msgid "Double (%s Servings)" msgstr "" #. translators: singular and plural quarter "serving" size #: includes/class.cooked-recipes.php:778 +#, php-format msgid "Triple (%s Servings)" msgstr "" #: includes/class.cooked-recipes.php:792 -#: includes/class.cooked-shortcodes.php:446 +#: includes/class.cooked-shortcodes.php:447 msgid "Yields" msgstr "" #. translators: singular and plural "serving" sizes #: includes/class.cooked-recipes.php:796 -#: includes/class.cooked-recipes.php:806 +#: includes/class.cooked-recipes.php:807 +#, php-format msgid "%s Serving" msgid_plural "%s Servings" msgstr[0] "" msgstr[1] "" #. translators: singular and plural "steps" -#: includes/class.cooked-recipes.php:914 +#: includes/class.cooked-recipes.php:921 #: includes/class.cooked-seo.php:83 +#, php-format msgid "Step %d" msgstr "" -#: includes/class.cooked-recipes.php:969 +#: includes/class.cooked-recipes.php:976 msgid "Browse" msgstr "" -#: includes/class.cooked-recipes.php:986 -#: includes/class.cooked-settings.php:166 +#: includes/class.cooked-recipes.php:993 +#: includes/class.cooked-settings.php:178 msgid "No categories" msgstr "" -#: includes/class.cooked-recipes.php:989 -#: includes/class.cooked-settings.php:213 +#: includes/class.cooked-recipes.php:996 +#: includes/class.cooked-settings.php:226 #: includes/class.cooked-taxonomies.php:38 #: includes/class.cooked-taxonomies.php:48 msgid "Categories" msgstr "" -#: includes/class.cooked-recipes.php:991 +#: includes/class.cooked-recipes.php:998 #: includes/class.cooked-taxonomies.php:41 #: includes/widgets/recipe-categories.php:48 msgid "All Categories" msgstr "" -#: includes/class.cooked-recipes.php:1061 +#: includes/class.cooked-recipes.php:1068 msgid "Find a recipe..." msgstr "" -#: includes/class.cooked-recipes.php:1076 +#: includes/class.cooked-recipes.php:1083 msgid "Newest first" msgstr "" -#: includes/class.cooked-recipes.php:1080 +#: includes/class.cooked-recipes.php:1087 msgid "Oldest first" msgstr "" -#: includes/class.cooked-recipes.php:1084 +#: includes/class.cooked-recipes.php:1091 msgid "Alphabetical (A-Z)" msgstr "" -#: includes/class.cooked-recipes.php:1088 +#: includes/class.cooked-recipes.php:1095 msgid "Alphabetical (Z-A)" msgstr "" @@ -1455,314 +1486,322 @@ msgstr "" msgid "Recipe Editor" msgstr "" -#: includes/class.cooked-settings.php:80 +#: includes/class.cooked-settings.php:87 msgid "Cooked settings has been updated!" msgstr "" -#: includes/class.cooked-settings.php:166 +#: includes/class.cooked-settings.php:178 msgid "No default" msgstr "" -#: includes/class.cooked-settings.php:186 +#: includes/class.cooked-settings.php:198 msgid "General" msgstr "" -#: includes/class.cooked-settings.php:190 +#: includes/class.cooked-settings.php:202 msgid "Browse/Search Recipes Page" msgstr "" #. translators: a description on how to add the [cooked-browse] shortcode to a page -#: includes/class.cooked-settings.php:192 +#: includes/class.cooked-settings.php:204 +#, php-format msgid "Create a page with the %s shortcode on it, then choose it from this dropdown." msgstr "" -#: includes/class.cooked-settings.php:198 +#: includes/class.cooked-settings.php:211 msgid "Recipes Per Page" msgstr "" #. translators: a description on how to choose the default number of recipes per page. -#: includes/class.cooked-settings.php:200 +#: includes/class.cooked-settings.php:213 +#, php-format msgid "Choose the default (set via the %s panel) or choose a different number here." msgstr "" #. translators: a description on how to choose the default number of recipes per page. -#: includes/class.cooked-settings.php:200 +#: includes/class.cooked-settings.php:213 msgid "Settings > Reading" msgstr "" -#: includes/class.cooked-settings.php:206 +#: includes/class.cooked-settings.php:219 msgid "Recipe Taxonomies" msgstr "" -#: includes/class.cooked-settings.php:207 +#: includes/class.cooked-settings.php:220 msgid "Choose which taxonomies you want to enable for your recipes." msgstr "" -#: includes/class.cooked-settings.php:218 +#: includes/class.cooked-settings.php:231 msgid "Global Recipe Toggles" msgstr "" -#: includes/class.cooked-settings.php:219 +#: includes/class.cooked-settings.php:232 msgid "You can quickly hide or show different recipe elements (site-wide) with these checkboxes." msgstr "" -#: includes/class.cooked-settings.php:238 +#: includes/class.cooked-settings.php:263 msgid "Carbs Format" msgstr "" -#: includes/class.cooked-settings.php:239 +#: includes/class.cooked-settings.php:264 msgid "You can display carbs as \"Total\" or \"Net\"." msgstr "" -#: includes/class.cooked-settings.php:245 +#: includes/class.cooked-settings.php:270 msgid "Total Carbs" msgstr "" -#: includes/class.cooked-settings.php:246 +#: includes/class.cooked-settings.php:271 msgid "Net Carbs" msgstr "" -#: includes/class.cooked-settings.php:251 +#: includes/class.cooked-settings.php:276 msgid "Author Name Format" msgstr "" -#: includes/class.cooked-settings.php:252 +#: includes/class.cooked-settings.php:277 msgid "You can show the full author's name or just a part of it." msgstr "" -#: includes/class.cooked-settings.php:258 +#: includes/class.cooked-settings.php:283 msgid "Full name" msgstr "" -#: includes/class.cooked-settings.php:259 +#: includes/class.cooked-settings.php:284 msgid "Full first name w/last name initial" msgstr "" -#: includes/class.cooked-settings.php:260 +#: includes/class.cooked-settings.php:285 msgid "First name initial w/full last name" msgstr "" -#: includes/class.cooked-settings.php:261 +#: includes/class.cooked-settings.php:286 msgid "First name only" msgstr "" -#: includes/class.cooked-settings.php:266 +#: includes/class.cooked-settings.php:291 msgid "Author Links" msgstr "" -#: includes/class.cooked-settings.php:267 +#: includes/class.cooked-settings.php:292 msgid "If you do not want the author names to link to the author recipe listings, you can disable them here." msgstr "" -#: includes/class.cooked-settings.php:274 +#: includes/class.cooked-settings.php:299 msgid "Disable Author Links" msgstr "" -#: includes/class.cooked-settings.php:279 +#: includes/class.cooked-settings.php:304 msgid "Default Category" msgstr "" #. translators: a description on how to set the default recipe category for the [cooked-browse] shortcode. -#: includes/class.cooked-settings.php:281 +#: includes/class.cooked-settings.php:306 +#, php-format msgid "Optionally set the default recipe category for your %s shortcode display." msgstr "" -#: includes/class.cooked-settings.php:287 +#: includes/class.cooked-settings.php:312 msgid "Default Sort Order" msgstr "" #. translators: a description on how to set the default sort order for the [cooked-browse] shortcode. -#: includes/class.cooked-settings.php:289 +#: includes/class.cooked-settings.php:314 +#, php-format msgid "Set the default sort order for your %s shortcode display." msgstr "" -#: includes/class.cooked-settings.php:295 +#: includes/class.cooked-settings.php:320 msgid "Newest First" msgstr "" -#: includes/class.cooked-settings.php:296 +#: includes/class.cooked-settings.php:321 msgid "Oldest First" msgstr "" -#: includes/class.cooked-settings.php:297 +#: includes/class.cooked-settings.php:322 msgid "Alphabetical" msgstr "" -#: includes/class.cooked-settings.php:298 +#: includes/class.cooked-settings.php:323 msgid "Alphabetical (reversed)" msgstr "" -#: includes/class.cooked-settings.php:303 +#: includes/class.cooked-settings.php:346 msgid "WP Editor Roles" msgstr "" -#: includes/class.cooked-settings.php:304 +#: includes/class.cooked-settings.php:347 msgid "Choose which user roles can use the WP Editor for the Excerpt, Directions & Notes fields." msgstr "" -#: includes/class.cooked-settings.php:310 +#: includes/class.cooked-settings.php:353 msgid "Advanced Settings" msgstr "" #. translators: an option to only show recipes with the [cooked-recipe] shortcode. -#: includes/class.cooked-settings.php:320 +#: includes/class.cooked-settings.php:363 msgid "Disable Public Recipes" msgstr "" #. translators: an option to only show recipes with the [cooked-recipe] shortcode. -#: includes/class.cooked-settings.php:320 +#: includes/class.cooked-settings.php:363 +#, php-format msgid "Only show recipes using the %s shortcode." msgstr "" #. translators: an option to disable "meta" tags. -#: includes/class.cooked-settings.php:322 +#: includes/class.cooked-settings.php:365 +#, php-format msgid "Disable %s Tags" msgstr "" #. translators: an option to disable "meta" tags. -#: includes/class.cooked-settings.php:322 +#: includes/class.cooked-settings.php:365 msgid "Prevents duplicates when tags already exist." msgstr "" -#: includes/class.cooked-settings.php:323 +#: includes/class.cooked-settings.php:366 msgid "Disable \"Servings Switcher\"" msgstr "" -#: includes/class.cooked-settings.php:323 +#: includes/class.cooked-settings.php:366 msgid "Removes the servings dropdown on recipes." msgstr "" -#: includes/class.cooked-settings.php:324 +#: includes/class.cooked-settings.php:367 msgid "Disable Recipe Schema Output" msgstr "" -#: includes/class.cooked-settings.php:324 +#: includes/class.cooked-settings.php:367 msgid "You should only do this if you're using something else to output schema information." msgstr "" -#: includes/class.cooked-settings.php:325 +#: includes/class.cooked-settings.php:368 msgid "Disable Recipe Archive Page" msgstr "" -#: includes/class.cooked-settings.php:325 +#: includes/class.cooked-settings.php:368 msgid "Prevents the recipe archive from being displayed." msgstr "" -#: includes/class.cooked-settings.php:332 +#: includes/class.cooked-settings.php:375 msgid "Design" msgstr "" -#: includes/class.cooked-settings.php:336 +#: includes/class.cooked-settings.php:379 msgid "Dark Mode" msgstr "" -#: includes/class.cooked-settings.php:337 +#: includes/class.cooked-settings.php:380 msgid "If your site has a dark background, you should enable \"Dark Mode\" so that Cooked can match this style." msgstr "" -#: includes/class.cooked-settings.php:343 +#: includes/class.cooked-settings.php:386 msgid "Enable \"Dark Mode\"" msgstr "" -#: includes/class.cooked-settings.php:348 +#: includes/class.cooked-settings.php:391 msgid "Author Images" msgstr "" -#: includes/class.cooked-settings.php:349 +#: includes/class.cooked-settings.php:392 msgid "If you do not want to display the author images (avatars), you can disable them here." msgstr "" -#: includes/class.cooked-settings.php:356 +#: includes/class.cooked-settings.php:399 msgid "Hide Author Images" msgstr "" -#: includes/class.cooked-settings.php:361 +#: includes/class.cooked-settings.php:404 msgid "Main Color" msgstr "" -#: includes/class.cooked-settings.php:362 +#: includes/class.cooked-settings.php:405 msgid "Used on buttons, cooking timer, etc." msgstr "" -#: includes/class.cooked-settings.php:368 +#: includes/class.cooked-settings.php:411 msgid "Main Color (on hover)" msgstr "" -#: includes/class.cooked-settings.php:369 +#: includes/class.cooked-settings.php:412 msgid "Used when hovering over buttons." msgstr "" -#: includes/class.cooked-settings.php:375 +#: includes/class.cooked-settings.php:418 msgid "First Responsive Breakpoint" msgstr "" -#: includes/class.cooked-settings.php:376 +#: includes/class.cooked-settings.php:419 msgid "Set the first responsive breakpoint. Best for large tablets." msgstr "" -#: includes/class.cooked-settings.php:382 +#: includes/class.cooked-settings.php:425 msgid "Second Responsive Breakpoint" msgstr "" -#: includes/class.cooked-settings.php:383 +#: includes/class.cooked-settings.php:426 msgid "Set the second responsive breakpoint. Best for small tablets." msgstr "" -#: includes/class.cooked-settings.php:389 +#: includes/class.cooked-settings.php:432 msgid "Third Responsive Breakpoint" msgstr "" -#: includes/class.cooked-settings.php:390 +#: includes/class.cooked-settings.php:433 msgid "Set the third responsive breakpoint. Best for phones and other small devices." msgstr "" -#: includes/class.cooked-settings.php:398 +#: includes/class.cooked-settings.php:441 msgid "Permalinks" msgstr "" -#: includes/class.cooked-settings.php:402 +#: includes/class.cooked-settings.php:445 msgid "Recipe Permalink" msgstr "" -#: includes/class.cooked-settings.php:405 +#: includes/class.cooked-settings.php:448 msgid "recipe-name" msgstr "" -#: includes/class.cooked-settings.php:409 +#: includes/class.cooked-settings.php:452 msgid "Recipe Author Permalink" msgstr "" -#: includes/class.cooked-settings.php:412 +#: includes/class.cooked-settings.php:455 msgid "author-name" msgstr "" -#: includes/class.cooked-settings.php:416 +#: includes/class.cooked-settings.php:459 msgid "Recipe Category Permalink" msgstr "" -#: includes/class.cooked-settings.php:419 +#: includes/class.cooked-settings.php:462 msgid "recipe-category-name" msgstr "" #. translators: posts_per_page default -#: includes/class.cooked-settings.php:430 +#: includes/class.cooked-settings.php:473 +#, php-format msgid "WordPress Default %s" msgstr "" -#: includes/class.cooked-settings.php:435 +#: includes/class.cooked-settings.php:478 msgid "Show All (no pagination)" msgstr "" -#: includes/class.cooked-settings.php:579 +#: includes/class.cooked-settings.php:620 msgid "Begin Migration" msgstr "" #. translators: referring to the bottom of the Settings page. -#: includes/class.cooked-shortcodes.php:148 +#: includes/class.cooked-shortcodes.php:149 +#, php-format msgid "Public recipes are currently disabled. You can change this at the bottom of the %s page." msgstr "" -#: includes/class.cooked-shortcodes.php:296 +#: includes/class.cooked-shortcodes.php:297 msgid "(recipe not found or in draft status)" msgstr "" @@ -1801,6 +1840,7 @@ msgstr "" #. translators: for displaying singular or plural versions depending on the number. #: includes/class.cooked-taxonomies.php:136 +#, php-format msgid "%s Recipe" msgid_plural "%s Recipes" msgstr[0] "" @@ -1923,11 +1963,13 @@ msgstr "" #. translators: referring to "Cooked Pro" #: templates/admin/pro.php:10 +#, php-format msgid "Ready for %s?" msgstr "" #. translators: referring to "Cooked Pro" #: templates/admin/pro.php:14 +#, php-format msgid "The %s upgrade adds loads of new features like ratings, favorites, user profiles, automatic nutrition information and more. Check out the list below for all of the details." msgstr "" @@ -1997,11 +2039,13 @@ msgstr "" #. translators: referring to "Cooked Pro" #: templates/admin/pro.php:48 +#, php-format msgid "Get %s" msgstr "" #. translators: referring to the "COOKED10" coupon code to get "10%" off Cooked Pro #: templates/admin/pro.php:52 +#, php-format msgid "Use coupon code %1$s for %2$s off!" msgstr "" @@ -2016,10 +2060,12 @@ msgstr "" #. translators: referring to "Cooked" #: templates/admin/welcome.php:10 +#, php-format msgid "Thanks for using %s!" msgstr "" #: templates/admin/welcome.php:16 +#, php-format msgid "If this is your first time using %1$s, head over to the %2$s page for some initial configuration. You can also check out the %3$s if you get stuck or contact me on %4$s. If you just recently updated, you can find out what's new below." msgstr "" @@ -2046,6 +2092,7 @@ msgstr "" #. translators: referring to the author (ex: Recipes by John Smith) #: templates/front/recipe-list.php:37 +#, php-format msgid "Recipes by %s" msgstr "" @@ -2060,14 +2107,6 @@ msgstr "" msgid "Heading Element:" msgstr "" -#: includes/class.cooked-settings.php:165 -msgid "Choose a page..." -msgstr "" - -#: includes/class.cooked-settings.php:165 -msgid "No pages" -msgstr "" - #: includes/class.cooked-measurements.php:85 #: includes/class.cooked-measurements.php:86 msgid "dl" @@ -2080,3 +2119,49 @@ msgstr "" #: includes/class.cooked-measurements.php:88 msgid "deciliters" msgstr "" + +#: cooked.php:283 +msgctxt "Page title" +msgid "Browse Recipes" +msgstr "" + +#: includes/class.cooked-settings.php:328 +msgid "Section Heading Default HTML Tag" +msgstr "" + +#. translators: a description on how to set the default sort order for the [cooked-browse] shortcode. +#: includes/class.cooked-settings.php:330 +msgid "Set the default HTML tag for your section headings." +msgstr "" + +#: includes/class.cooked-settings.php:336 +msgid "div" +msgstr "" + +#: includes/class.cooked-settings.php:337 +msgid "h2" +msgstr "" + +#: includes/class.cooked-settings.php:338 +msgid "h3" +msgstr "" + +#: includes/class.cooked-settings.php:339 +msgid "h4" +msgstr "" + +#: includes/class.cooked-settings.php:340 +msgid "h5" +msgstr "" + +#: includes/class.cooked-settings.php:341 +msgid "h6" +msgstr "" + +#: includes/class.cooked-recipes.php:1070 +msgid "Search" +msgstr "" + +#: includes/class.cooked-shortcodes.php:650 +msgid "Fullscreen" +msgstr "" diff --git a/languages/cooked.pot b/languages/cooked.pot index 5610b4e..6545f5a 100644 --- a/languages/cooked.pot +++ b/languages/cooked.pot @@ -2,16 +2,16 @@ # This file is distributed under the GPL2. msgid "" msgstr "" -"Project-Id-Version: Cooked - Recipe Management 1.10.0\n" +"Project-Id-Version: Cooked - Recipe Management 1.11.0\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/cooked\n" "Last-Translator: FULL NAME