Version Description
- Feature: Third and half filled stars to better represent the rating
- Feature: Custom hash for the jump to video button
- Feature: Import MV Create Reviews to comments with ratings
- Feature: Enable link for counter block in the template editor
- Feature: Show number of comments in jump to comments block
- Improvement: Allow comments for public recipe post type
- Fix: Prevent HTML from showing up in associated ingredients
Download this release
Release Info
Developer | BrechtVds |
Plugin | WP Recipe Maker |
Version | 7.5.0 |
Comparing to | |
See all releases |
Code changes from version 7.4.0 to 7.5.0
- dist/admin-modal.js +1 -1
- includes/admin/tools/class-wprm-tools-create-reviews.php +184 -0
- includes/admin/tools/class-wprm-tools-find-ratings.php +17 -6
- includes/class-wp-recipe-maker.php +2 -1
- includes/public/class-wprm-comment-rating.php +13 -3
- includes/public/class-wprm-custom-hash.php +66 -0
- includes/public/class-wprm-post-type.php +29 -4
- includes/public/class-wprm-rating-database.php +1 -1
- includes/public/class-wprm-rating.php +12 -2
- includes/public/class-wprm-recipe-parser.php +7 -0
- includes/public/class-wprm-recipe-sanitizer.php +14 -1
- includes/public/class-wprm-recipe.php +20 -0
- includes/public/shortcodes/general/class-wprm-sc-jump-to-comments.php +9 -1
- includes/public/shortcodes/recipe/class-wprm-sc-counter.php +11 -0
- includes/public/shortcodes/recipe/class-wprm-sc-instructions.php +1 -1
- includes/public/shortcodes/recipe/class-wprm-sc-rating.php +40 -4
- languages/wp-recipe-maker-fr_FR.mo +0 -0
- languages/wp-recipe-maker-fr_FR.po +137 -134
- languages/wp-recipe-maker.pot +115 -26
- news.json +12 -0
- readme.txt +20 -0
- templates/admin/menu/tools/create-reviews.php +21 -0
- templates/admin/tools.php +23 -0
- templates/settings/group-adjustable-servings.php +16 -0
- templates/settings/group-post-type.php +11 -0
- templates/settings/group-recipe-ratings.php +8 -0
- templates/settings/group-recipe-snippets.php +21 -0
- wp-recipe-maker.php +1 -1
dist/admin-modal.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
var WPRecipeMaker;(WPRecipeMaker=void 0===WPRecipeMaker?{}:WPRecipeMaker)["wp-recipe-maker/dist/admin-modal"]=(self.webpackChunkWPRecipeMaker_name_=self.webpackChunkWPRecipeMaker_name_||[]).push([[97],{5831:function(e,t,r){"use strict";r.d(t,{o:function(){return a},L:function(){return s}});r(54883),r(12798),r(22321),r(67838),r(29897),r(68995);var n=r(6),i=r.n(n),o={"¼":"1/4","½":"1/2","¾":"3/4","⅐":"1/7","⅑":"1/9","⅒":"1/10","⅓":"1/3","⅔":"2/3","⅕":"1/5","⅖":"2/5","⅗":"3/5","⅘":"4/5","⅙":"1/6","⅚":"5/6","⅛":"1/8","⅜":"3/8","⅝":"5/8","⅞":"7/8"};function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e,a=!1;if(r){var s=void 0!==window.wprmp_public?wprmp_public.settings.fractions_enabled:wprmp_admin.settings.fractions_enabled;if(s){var l=void 0!==window.wprmp_public?wprmp_public.settings.fractions_use_mixed:wprmp_admin.settings.fractions_use_mixed,c=void 0!==window.wprmp_public?wprmp_public.settings.fractions_use_symbols:wprmp_admin.settings.fractions_use_symbols,u=parseInt(void 0!==window.wprmp_public?wprmp_public.settings.fractions_max_denominator:wprmp_admin.settings.fractions_max_denominator);u=u>1?u:8;var d=i()(e,u,l);if(d&&3===d.length&&!isNaN(d[0])&&!isNaN(d[1])&&!isNaN(d[2])){var p="";if(0<d[0]&&(p+="".concat(d[0]," ")),0<d[1]?0<d[2]&&(p+=1===d[2]?d[1]:"".concat(d[1],"/").concat(d[2])):0===d[0]&&(p+="1/".concat(u)),p){if(c)for(var f of(p=" "+p+" ",Object.keys(o))){var m=o[f];p=p.replace(" ".concat(m," ")," ".concat(f," "))}n=p.trim(),a=!0}}}}return a||(t=parseInt(t),0==(n=parseFloat(parseFloat(e).toFixed(t)))&&(n+=Math.pow(10,-1*t))),n}function s(e){var t=(e=(e=(e=(e=(e=((e=(e=(e=""+e).replace(",",".")).replace(" to ","-"))+"").replace(/(\u00BC|\u00BD|\u00BE|\u2150|\u2151|\u2152|\u2153|\u2154|\u2155|\u2156|\u2157|\u2158|\u2159|\u215A|\u215B|\u215C|\u215D|\u215E)/,(function(e,t){return" "+o[t]}))).replace(/(<([^>]+)>)/gi,"")).replace(/(\[([^\]]+)\])/gi,"")).replace(/[^\d\s\.\/-]/gi,"")).trim()).split(" "),r=!1;if(""!==e){r=0;for(var n=0;n<t.length;n++)if(""!==t[n].trim()){var i=t[n].split("/",2),a=parseFloat(i[0]);if(void 0!==i[1]){var s=parseFloat(i[1]);0!==s&&(a/=s)}isNaN(a)||(r+=a)}}return r}},57622:function(e,t,r){"use strict";r.r(t);var n=r(73961),i=r(89526),o=r(34823),a=r.n(o),s=r(48618),l=r(52082),c=r(99237),u=r(95075),d=e=>{var t=!1,r=!!e.help&&e.help,n="button";if(e.required&&(!wprm_admin.addons.hasOwnProperty(e.required)||!0!==wprm_admin.addons[e.required]))if(t=!0,"premium"!==e.required){var o=e.required[0].toUpperCase()+e.required.substring(1);r="WP Recipe Maker ".concat(o," Bundle Only")}else r="WP Recipe Maker Premium Only";return e.isPrimary&&(n+=" button-primary"),t&&(n+=" wprm-button-required"),i.createElement(u.Z,{content:r},i.createElement("button",{className:n,tabIndex:e.disableTab?"-1":null,onClick:t?()=>{confirm("Want to learn more about the version required for this feature?")&&window.open("https://bootstrapped.ventures/wp-recipe-maker/get-the-plugin/","_blank")}:e.onClick},e.children))},p=r(96005),f=r(86605),m=e=>{var t=!!e.action&&e.action.type,r=[{value:"delete",label:(0,l.S)("Delete Actions"),default:!1}];return i.createElement(i.Fragment,null,i.createElement("div",{className:"wprm-admin-modal-bulk-edit-label"},(0,l.S)("Select an action to perform:")),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-actions"},r.map((r=>i.createElement("div",{className:"wprm-admin-modal-bulk-edit-action",key:r.value},i.createElement("input",{type:"radio",value:r.value,name:"wprm-admin-radio-bulk-edit-action",id:"wprm-admin-radio-bulk-edit-action-".concat(r.value),checked:t===r.value,onChange:()=>{var t={type:r.value,options:r.default};e.onActionChange(t)}}),i.createElement("label",{htmlFor:"wprm-admin-radio-bulk-edit-action-".concat(r.value)},r.label))))))},h=r(59905),g=r(24207);function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var w=e=>{var t=!!e.action&&e.action.type,r=[{value:"change-link",label:(0,l.S)("Change Link"),default:""},{value:"change-nofollow",label:(0,l.S)("Change Link Nofollow"),default:"default"},{value:"export",label:(0,l.S)("Export Equipment"),default:!1,required:"premium"},{value:"delete",label:(0,l.S)("Delete Equipment"),default:!1}];return i.createElement("form",null,i.createElement("div",{className:"wprm-admin-modal-bulk-edit-label"},(0,l.S)("Select an action to perform:")),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-actions"},r.map((r=>i.createElement("div",{className:"wprm-admin-modal-bulk-edit-action",key:r.value},i.createElement("input",{type:"radio",value:r.value,name:"wprm-admin-radio-bulk-edit-action",id:"wprm-admin-radio-bulk-edit-action-".concat(r.value),checked:t===r.value,onChange:()=>{var t={type:r.value,options:r.default};e.onActionChange(t)}}),i.createElement("label",{htmlFor:"wprm-admin-radio-bulk-edit-action-".concat(r.value)},r.label))))),t&&!1!==e.action.options&&i.createElement(i.Fragment,null,i.createElement("div",{className:"wprm-admin-modal-bulk-edit-label"},(0,l.S)("Action options:")),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-options"},"change-link"===t&&i.createElement(h.Z,{name:"equipment-link",value:e.action.options,placeholder:(0,l.S)("Equipment Link"),onChange:t=>{var r=b(b({},e.action),{},{options:t});e.onActionChange(r)}}),"change-nofollow"===t&&i.createElement(g.Z,{id:"nofollow",options:wprm_admin_modal.options.equipment_link_nofollow,value:e.action.options,onChange:t=>{var r=b(b({},e.action),{},{options:t});e.onActionChange(r)}}))))};function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function S(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach((function(t){x(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function x(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var I=e=>{var t=!!e.action&&e.action.type,r=[{value:"change-group",label:(0,l.S)("Change Shopping List Group"),default:""},{value:"change-link",label:(0,l.S)("Change Link"),default:""},{value:"change-nofollow",label:(0,l.S)("Change Link Nofollow"),default:"default"},{value:"create-nutrition",label:(0,l.S)("Add as Custom Nutrition Ingredient"),default:!1},{value:"export",label:(0,l.S)("Export Ingredients"),default:!1,required:"premium"},{value:"delete",label:(0,l.S)("Delete Ingredients"),default:!1}];return i.createElement("form",null,i.createElement("div",{className:"wprm-admin-modal-bulk-edit-label"},(0,l.S)("Select an action to perform:")),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-actions"},r.map((r=>i.createElement("div",{className:"wprm-admin-modal-bulk-edit-action",key:r.value},i.createElement("input",{type:"radio",value:r.value,name:"wprm-admin-radio-bulk-edit-action",id:"wprm-admin-radio-bulk-edit-action-".concat(r.value),checked:t===r.value,onChange:()=>{var t={type:r.value,options:r.default};e.onActionChange(t)}}),i.createElement("label",{htmlFor:"wprm-admin-radio-bulk-edit-action-".concat(r.value)},r.label))))),t&&!1!==e.action.options&&i.createElement(i.Fragment,null,i.createElement("div",{className:"wprm-admin-modal-bulk-edit-label"},(0,l.S)("Action options:")),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-options"},"change-group"===t&&i.createElement(h.Z,{name:"shopping-list-group",value:e.action.options,placeholder:(0,l.S)("Shopping List Group"),onChange:t=>{var r=S(S({},e.action),{},{options:t});e.onActionChange(r)}}),"change-link"===t&&i.createElement(h.Z,{name:"ingredient-link",value:e.action.options,placeholder:(0,l.S)("Ingredient Link"),onChange:t=>{var r=S(S({},e.action),{},{options:t});e.onActionChange(r)}}),"change-nofollow"===t&&i.createElement(g.Z,{id:"nofollow",options:wprm_admin_modal.options.ingredient_link_nofollow,value:e.action.options,onChange:t=>{var r=S(S({},e.action),{},{options:t});e.onActionChange(r)}}))))},O=e=>{var t=!!e.action&&e.action.type,r=[{value:"delete",label:(0,l.S)("Delete Ratings"),default:!1}];return i.createElement(i.Fragment,null,i.createElement("div",{className:"wprm-admin-modal-bulk-edit-label"},(0,l.S)("Select an action to perform:")),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-actions"},r.map((r=>i.createElement("div",{className:"wprm-admin-modal-bulk-edit-action",key:r.value},i.createElement("input",{type:"radio",value:r.value,name:"wprm-admin-radio-bulk-edit-action",id:"wprm-admin-radio-bulk-edit-action-".concat(r.value),checked:t===r.value,onChange:()=>{var t={type:r.value,options:r.default};e.onActionChange(t)}}),i.createElement("label",{htmlFor:"wprm-admin-radio-bulk-edit-action-".concat(r.value)},r.label))))))},C=r(43636),D=r(69347),M=(r(54883),r(33130),r(68995),r(2778)),P=r.n(M),N=r(844),k=(r(12821),r(2652),r(23078)),A=r(24573),T=(r(72144),r(72638),r(6185));function j(){return(j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var L,R,_,B=function(e,t){void 0===e&&(e="");var r=String(e).toLowerCase(),n=String(t.value).toLowerCase(),i=String(t.label).toLowerCase();return n===r||i===r},F=j({allowCreateWhileLoading:!1,createOptionPosition:"last"},{formatCreateLabel:function(e){return'Create "'+e+'"'},isValidNewOption:function(e,t,r){return!(!e||t.some((function(t){return B(e,t)}))||r.some((function(t){return B(e,t)})))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}}),Z=(L=A.S,_=R=function(e){var t,r;function n(t){var r;(r=e.call(this,t)||this).select=void 0,r.onChange=function(e,t){var n=r.props,i=n.getNewOptionData,o=n.inputValue,a=n.isMulti,s=n.onChange,l=n.onCreateOption,c=n.value,u=n.name;if("select-option"!==t.action)return s(e,t);var d=r.state.newOption,p=Array.isArray(e)?e:[e];if(p[p.length-1]!==d)s(e,t);else if(l)l(o);else{var f=i(o,o),m={action:"create-option",name:u};s(a?[].concat((0,k.e)(c),[f]):f,m)}};var n=t.options||[];return r.state={newOption:void 0,options:n},r}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var o=n.prototype;return o.UNSAFE_componentWillReceiveProps=function(e){var t=e.allowCreateWhileLoading,r=e.createOptionPosition,n=e.formatCreateLabel,i=e.getNewOptionData,o=e.inputValue,a=e.isLoading,s=e.isValidNewOption,l=e.value,c=e.options||[],u=this.state.newOption;u=s(o,(0,k.e)(l),c)?i(o,n(o)):void 0,this.setState({newOption:u,options:!t&&a||!u?c:"first"===r?[u].concat(c):[].concat(c,[u])})},o.focus=function(){this.select.focus()},o.blur=function(){this.select.blur()},o.render=function(){var e=this,t=this.state.options;return i.createElement(L,j({},this.props,{ref:function(t){e.select=t},options:t,onChange:this.onChange}))},n}(i.Component),R.defaultProps=F,_),H=(0,T.m)(Z);function U(){return(U=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function W(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function G(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?W(Object(r),!0).forEach((function(t){z(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):W(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function z(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class q extends i.Component{shouldComponentUpdate(e){return this.props.id!==e.id||JSON.stringify(this.props.value)!==JSON.stringify(e.value)}render(){var e=this,t=wprm_admin_modal.categories[this.props.id].terms,r=[],n=[],o=function(t){var i={value:t.term_id,label:P().decode(t.name)};r.push(i),e.props.value.find((e=>e.term_id===t.term_id||e.name===t.term_id))&&n.push(i)};for(var a of t)o(a);var s=this.props.custom?this.props.custom:{},c=this.props.creatable?H:N.ZP;return i.createElement(c,U({isMulti:!0,options:r,value:n,placeholder:this.props.creatable?(0,l.S)("Select from list or type to create..."):(0,l.S)("Select from list..."),onChange:t=>{var r=[];if(t){var n=function(t){t.hasOwnProperty("__isNew__")&&t.__isNew__&&wprm_admin_modal.categories[e.props.id].terms.push({term_id:t.label,name:t.label});var n=wprm_admin_modal.categories[e.props.id].terms.find((e=>e.term_id===t.value));n&&r.push(n)};for(var i of t)n(i)}this.props.onChange(r)},styles:{placeholder:e=>G(G({},e),{},{color:"#444",opacity:"0.333"}),control:e=>G(G({},e),{},{backgroundColor:"white"}),container:e=>G(G({},e),{},{width:"100%",maxWidth:this.props.width?this.props.width:"100%"})}},s))}}function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function J(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?V(Object(r),!0).forEach((function(t){Y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Q=e=>{var t=!!e.action&&e.action.type,r=!1,n=[];Object.keys(wprm_admin_manage.taxonomies).map(((e,t)=>{var i=e.substr(5);r||(r=i),n.push({value:i,label:wprm_admin_manage.taxonomies[e].name})}));var o=[];return 0<n.length&&o.push({value:"add-terms",label:(0,l.S)("Add Terms"),default:{taxonomy:r,terms:[]}},{value:"remove-terms",label:(0,l.S)("Remove Terms"),default:{taxonomy:r,terms:[]}}),"public"===wprm_admin.settings.post_type_structure&&o.push({value:"change-status",label:(0,l.S)("Change Recipe Status"),default:"draft"}),o.push({value:"change-type",label:(0,l.S)("Change Recipe Type"),default:"food"},{value:"change-author",label:(0,l.S)("Change Display Author"),default:{author:"default",author_name:"",author_link:""}},{value:"change-servings",label:(0,l.S)("Change Servings"),default:{servings:"",servings_unit:""}},{value:"recalculate-time",label:(0,l.S)("Recalculate Total Time"),default:!1},{value:"print",label:(0,l.S)("Print Recipes"),default:!1},{value:"export",label:(0,l.S)("Export Recipes"),default:"recipe",required:"premium"},{value:"delete",label:(0,l.S)("Delete Recipes"),default:!1}),i.createElement("form",null,i.createElement("div",{className:"wprm-admin-modal-bulk-edit-label"},(0,l.S)("Select an action to perform:")),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-actions"},o.map((r=>i.createElement("div",{className:"wprm-admin-modal-bulk-edit-action",key:r.value},i.createElement("input",{type:"radio",value:r.value,name:"wprm-admin-radio-bulk-edit-action",id:"wprm-admin-radio-bulk-edit-action-".concat(r.value),checked:t===r.value,onChange:()=>{var t={type:r.value,options:r.default};r.hasOwnProperty("required")&&(t.required=r.required),e.onActionChange(t)}}),i.createElement("label",{htmlFor:"wprm-admin-radio-bulk-edit-action-".concat(r.value)},r.label))))),t&&!1!==e.action.options&&i.createElement(i.Fragment,null,i.createElement("div",{className:"wprm-admin-modal-bulk-edit-label"},(0,l.S)("Action options:")),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-options"},"change-status"===t&&i.createElement(g.Z,{id:"status",options:wprm_admin_modal.options.post_status,value:e.action.options,onChange:t=>{var r=J(J({},e.action),{},{options:t});e.onActionChange(r)}}),"change-type"===t&&i.createElement(g.Z,{id:"type",options:[{value:"food",label:(0,l.S)("Food Recipe")},{value:"howto",label:(0,l.S)("How-to Instructions")},{value:"other",label:(0,l.S)("Other (no metadata)")}],value:e.action.options,onChange:t=>{var r=J(J({},e.action),{},{options:t});e.onActionChange(r)}}),"change-author"===t&&i.createElement(i.Fragment,null,i.createElement(D.Z,{options:wprm_admin_modal.options.author.filter((e=>"same"!==e.actual)),value:e.action.options.author,onChange:t=>{var r=J(J({},e.action),{},{options:{author:t,author_name:"",author_link:""}});e.onActionChange(r)},width:300,custom:{menuPlacement:"top",maxMenuHeight:150}}),"custom"===wprm_admin_modal.options.author.find((t=>t.value===e.action.options.author)).actual&&i.createElement(i.Fragment,null," ",i.createElement(h.Z,{name:"author-name",placeholder:(0,l.S)("Author Name"),value:e.action.options.author_name,onChange:t=>{var r=J(J({},e.action),{},{options:J(J({},e.action.options),{},{author_name:t})});e.onActionChange(r)}})," ",i.createElement(h.Z,{name:"author-link",placeholder:"https://bootstrapped.ventures",type:"url",value:e.action.options.author_link,onChange:t=>{var r=J(J({},e.action),{},{options:J(J({},e.action.options),{},{author_link:t})});e.onActionChange(r)}}))),"change-servings"===t&&i.createElement(C.Z,{id:"servings"},i.createElement(h.Z,{placeholder:"4",type:"number",value:0!=e.action.options.servings?e.action.options.servings:"",onChange:t=>{var r=J(J({},e.action),{},{options:J(J({},e.action.options),{},{servings:t})});e.onActionChange(r)}}),i.createElement(h.Z,{name:"servings-unit",placeholder:(0,l.S)("people"),value:e.servings_unit,onChange:t=>{var r=J(J({},e.action),{},{options:J(J({},e.action.options),{},{servings_unit:t})});e.onActionChange(r)}})),("add-terms"===t||"remove-terms"===t)&&i.createElement(i.Fragment,null,i.createElement(D.Z,{options:n,value:e.action.options.taxonomy,onChange:t=>{var r=J(J({},e.action),{},{options:{taxonomy:t,terms:[]}});e.onActionChange(r)},width:200,custom:{menuPlacement:"top",maxMenuHeight:150}})," ",i.createElement(q,{id:e.action.options.taxonomy,value:e.action.options.terms,onChange:t=>{var r=J(J({},e.action),{},{options:{taxonomy:e.action.options.taxonomy,terms:t}});e.onActionChange(r)},custom:{menuPlacement:"top",maxMenuHeight:200}})),"export"===t&&i.createElement(g.Z,{id:"type",options:[{value:"recipe",label:(0,l.S)("Recipes only")},{value:"with_parent",label:(0,l.S)("Recipes with their parent post")}],value:e.action.options,onChange:t=>{var r=J(J({},e.action),{},{options:t});e.onActionChange(r)}}))))},X=e=>{var t=!!e.action&&e.action.type,r=[{value:"delete",label:(0,l.S)("Delete Revisions"),default:!1}];return i.createElement(i.Fragment,null,i.createElement("div",{className:"wprm-admin-modal-bulk-edit-label"},(0,l.S)("Select an action to perform:")),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-actions"},r.map((r=>i.createElement("div",{className:"wprm-admin-modal-bulk-edit-action",key:r.value},i.createElement("input",{type:"radio",value:r.value,name:"wprm-admin-radio-bulk-edit-action",id:"wprm-admin-radio-bulk-edit-action-".concat(r.value),checked:t===r.value,onChange:()=>{var t={type:r.value,options:r.default};e.onActionChange(t)}}),i.createElement("label",{htmlFor:"wprm-admin-radio-bulk-edit-action-".concat(r.value)},r.label))))))},K=e=>{var t=!!e.action&&e.action.type,r=[{value:"export",label:(0,l.S)("Export Terms"),default:!1,required:"premium"},{value:"delete",label:(0,l.S)("Delete Terms"),default:!1}];return i.createElement(i.Fragment,null,i.createElement("div",{className:"wprm-admin-modal-bulk-edit-label"},(0,l.S)("Select an action to perform:")),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-actions"},r.map((r=>i.createElement("div",{className:"wprm-admin-modal-bulk-edit-action",key:r.value},i.createElement("input",{type:"radio",value:r.value,name:"wprm-admin-radio-bulk-edit-action",id:"wprm-admin-radio-bulk-edit-action-".concat(r.value),checked:t===r.value,onChange:()=>{var t={type:r.value,options:r.default};e.onActionChange(t)}}),i.createElement("label",{htmlFor:"wprm-admin-radio-bulk-edit-action-".concat(r.value)},r.label))))),t&&!1!==e.action.options&&i.createElement(i.Fragment,null,i.createElement("div",{className:"wprm-admin-modal-bulk-edit-label"},(0,l.S)("Action options:")),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-options"})))},$=e=>{var t=!!e.action&&e.action.type,r=[{value:"delete",label:(0,l.S)("Permanently Delete Recipes"),default:!1}];return i.createElement(i.Fragment,null,i.createElement("div",{className:"wprm-admin-modal-bulk-edit-label"},(0,l.S)("Select an action to perform:")),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-actions"},r.map((r=>i.createElement("div",{className:"wprm-admin-modal-bulk-edit-action",key:r.value},i.createElement("input",{type:"radio",value:r.value,name:"wprm-admin-radio-bulk-edit-action",id:"wprm-admin-radio-bulk-edit-action-".concat(r.value),checked:t===r.value,onChange:()=>{var t={type:r.value,options:r.default};e.onActionChange(t)}}),i.createElement("label",{htmlFor:"wprm-admin-radio-bulk-edit-action-".concat(r.value)},r.label))))))},ee={analytics:{label:(0,l.S)("Actions"),elem:m},rating:{label:(0,l.S)("Ratings"),elem:O},recipe:{label:(0,l.S)("Recipes"),elem:Q},revision:{label:(0,l.S)("Revisions"),elem:X},ingredient:{label:(0,l.S)("Ingredients"),elem:I},equipment:{label:(0,l.S)("Equipment"),elem:w},trash:{label:(0,l.S)("Recipes"),elem:$},nutrition_ingredient:{label:(0,l.S)("Custom Nutrition Ingredients"),elem:K}};Object.keys(wprm_admin_modal.categories).map((e=>{var t=wprm_admin_modal.categories[e];ee[e]={label:t.label,elem:K}}));class te extends i.Component{constructor(e){super(e),this.state={route:e.args.hasOwnProperty("route")?e.args.route:"recipe",type:e.args.hasOwnProperty("type")?e.args.type:"recipe",ids:e.args.hasOwnProperty("ids")?e.args.ids:[],action:!1,savingChanges:!1,result:!1},this.onBulkEdit=this.onBulkEdit.bind(this),this.allowCloseModal=this.allowCloseModal.bind(this)}onBulkEdit(){this.state.action&&this.setState({savingChanges:!0},(()=>{c.Z.manage.bulkEdit(this.state.route,this.state.type,this.state.ids,this.state.action).then((e=>{var t=!1;e.hasOwnProperty("result")&&(t=e.result),this.setState({savingChanges:!1,result:t},(()=>{"function"==typeof this.props.args.saveCallback&&this.props.args.saveCallback(),t||this.props.maybeCloseModal()}))}))}))}allowCloseModal(){return!this.state.savingChanges}changesMade(){return!(!this.state.action||!this.state.action.type)&&(!Array.isArray(this.state.action.options)||0!==this.state.action.options.length)}render(){var e=!!ee.hasOwnProperty(this.state.type)&&ee[this.state.type];if(!e)return null;var t=e.elem,r="".concat((0,l.S)("Bulk Edit")," ").concat(this.state.ids.length," ").concat(e.label);return i.createElement(i.Fragment,null,i.createElement(p.Z,{onCloseModal:this.props.maybeCloseModal},r),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-container"},!1===this.state.result?i.createElement(t,{action:this.state.action,onActionChange:e=>{this.setState({action:e})}}):i.createElement("div",{dangerouslySetInnerHTML:{__html:this.state.result}})),i.createElement(f.Z,{savingChanges:this.state.savingChanges},!1===this.state.result?i.createElement(d,{isPrimary:!0,required:this.state.action&&this.state.action.hasOwnProperty("required")?this.state.action.required:null,onClick:this.onBulkEdit,disabled:!this.changesMade()},r):i.createElement(d,{isPrimary:!0,onClick:this.props.maybeCloseModal},(0,l.S)("Close"))))}}var re=e=>i.createElement("textarea",{value:e.value,placeholder:e.placeholder,onChange:t=>{e.onChange(t.target.value)}});class ne extends i.Component{constructor(e){super(e),this.state={fields:e.args.fields}}render(){return i.createElement(i.Fragment,null,i.createElement(p.Z,{onCloseModal:this.props.maybeCloseModal},this.props.args.header),i.createElement("div",{className:"wprm-admin-modal-input-fields-container"},this.state.fields.map(((e,t)=>{var r=h.Z;switch(e.hasOwnProperty("type")?e.type:"text"){case"textarea":r=re}return i.createElement(i.Fragment,{key:t},e.hasOwnProperty("label")&&i.createElement("div",{className:"wprm-admin-modal-input-fields-field-label"},e.label),i.createElement(r,{value:e.value,onChange:e=>{var r=[...this.state.fields];r[t].value=e,this.setState({fields:r})}}))}))),i.createElement(f.Z,{savingChanges:!1},i.createElement("button",{className:"button button-primary",onClick:()=>{"function"==typeof this.props.args.insertCallback&&this.props.args.insertCallback(this.state),this.props.maybeCloseModal()}},(0,l.S)("Change"))))}}r(22321);function ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function oe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(r),!0).forEach((function(t){ae(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ie(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ae(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var se=e=>e=(e=(e=(e=e.replace(/"/gm,"%22")).replace(/\[/gm,"%5B")).replace(/\]/gm,"%5D")).replace(/\r?\n|\r/gm,"%0A");class le extends i.Component{render(){return i.createElement(i.Fragment,null,i.createElement(p.Z,{onCloseModal:this.props.maybeCloseModal},"WP Recipe Maker"),i.createElement("div",{className:"wprm-admin-modal-menu-container"},i.createElement("h2",null,(0,l.S)("Recipes")),i.createElement("div",{className:"wprm-admin-modal-menu-buttons"},i.createElement(d,{isPrimary:!0,onClick:()=>{var e=this.props.args;if(wprm_admin.settings.hasOwnProperty("recipe_name_from_post_title")&&wprm_admin.settings.recipe_name_from_post_title){var t=document.querySelector("#title[name=post_title]");if(t){var r=JSON.parse(JSON.stringify(wprm_admin_modal.recipe));r.name=t.value,e.recipe=r}}WPRM_Modal.open("recipe",e,!0)}},(0,l.S)("Create new Recipe")),i.createElement(d,{onClick:()=>{WPRM_Modal.open("select",{title:(0,l.S)("Insert existing Recipe"),button:(0,l.S)("Insert"),fields:{recipe:{}},insertCallback:e=>{"function"==typeof this.props.args.insertCallback&&this.props.args.insertCallback('[wprm-recipe id="'.concat(e.recipe.id,'"]'))}},!0)}},(0,l.S)("Insert existing Recipe")),i.createElement(d,{required:"premium",onClick:()=>{WPRM_Modal.open("select",{title:(0,l.S)("Create new from existing Recipe"),button:(0,l.S)("Clone Recipe"),fields:{recipe:{}},nextStepCallback:e=>{WPRM_Modal.open("recipe",oe(oe({},this.props.args),{},{recipeId:e.recipe.id,cloneRecipe:!0}),!0)}},!0)}},(0,l.S)("Create new from existing Recipe"))),i.createElement("h2",null,(0,l.S)("Recipe Snippets")),i.createElement("div",{className:"wprm-admin-modal-menu-buttons"},i.createElement(d,{help:(0,l.S)("Displays default snippet template as set in the WPRM Settings"),onClick:()=>{WPRM_Modal.open("select",{title:(0,l.S)("Full Snippet Template"),button:(0,l.S)("Insert"),fields:{recipe:{showFirst:!0}},insertCallback:e=>{if("function"==typeof this.props.args.insertCallback){var t="[wprm-recipe-snippet";t+=e.recipe&&e.recipe.id?' id="'.concat(e.recipe.id,'"]'):"]",this.props.args.insertCallback(t)}}},!0)}},(0,l.S)("Full Snippet Template")),i.createElement(d,{onClick:()=>{WPRM_Modal.open("select",{title:(0,l.S)("Jump to Recipe"),button:(0,l.S)("Insert"),fields:{recipe:{showFirst:!0}},insertCallback:e=>{if("function"==typeof this.props.args.insertCallback){var t="[wprm-recipe-jump";t+=e.recipe&&e.recipe.id?' id="'.concat(e.recipe.id,'"]'):"]",this.props.args.insertCallback(t)}}},!0)}},(0,l.S)("Jump to Recipe")),i.createElement(d,{onClick:()=>{WPRM_Modal.open("select",{title:(0,l.S)("Jump to Video"),button:(0,l.S)("Insert"),fields:{recipe:{showFirst:!0}},insertCallback:e=>{if("function"==typeof this.props.args.insertCallback){var t="[wprm-recipe-jump-video";t+=e.recipe&&e.recipe.id?' id="'.concat(e.recipe.id,'"]'):"]",this.props.args.insertCallback(t)}}},!0)}},(0,l.S)("Jump to Video")),i.createElement(d,{onClick:()=>{WPRM_Modal.open("select",{title:(0,l.S)("Print Recipe"),button:(0,l.S)("Insert"),fields:{recipe:{showFirst:!0}},insertCallback:e=>{if("function"==typeof this.props.args.insertCallback){var t="[wprm-recipe-print";t+=e.recipe&&e.recipe.id?' id="'.concat(e.recipe.id,'"]'):"]",this.props.args.insertCallback(t)}}},!0)}},(0,l.S)("Print Recipe"))),i.createElement("h2",null,(0,l.S)("Recipe Parts")),i.createElement("div",{className:"wprm-admin-modal-menu-buttons"},i.createElement(d,{required:"premium",onClick:()=>{WPRM_Modal.open("select",{title:(0,l.S)("Nutrition Label"),button:(0,l.S)("Insert"),fields:{recipe:{showFirst:!0}},insertCallback:e=>{if("function"==typeof this.props.args.insertCallback){var t="[wprm-nutrition-label";t+=e.recipe&&e.recipe.id?' id="'.concat(e.recipe.id,'"]'):"]",this.props.args.insertCallback(t)}}},!0)}},(0,l.S)("Nutrition Label")),i.createElement(d,{onClick:()=>{WPRM_Modal.open("select",{title:(0,l.S)("Recipe Video"),button:(0,l.S)("Insert"),fields:{recipe:{showFirst:!0}},insertCallback:e=>{if("function"==typeof this.props.args.insertCallback){var t="[wprm-recipe-video";t+=e.recipe&&e.recipe.id?' id="'.concat(e.recipe.id,'"]'):"]",this.props.args.insertCallback(t)}}},!0)}},(0,l.S)("Recipe Video"))),i.createElement("h2",null,(0,l.S)("Other Features")),i.createElement("div",{className:"wprm-admin-modal-menu-buttons"},i.createElement(d,{help:(0,l.S)("Use for a list of existing recipes on your website"),onClick:()=>{WPRM_Modal.open("roundup",{insertCallback:e=>{if("function"==typeof this.props.args.insertCallback)if(e.hasOwnProperty("type")&&"external"===e.type){var t="[wprm-recipe-roundup-item";t+=' link="'.concat(se(e.link),'"'),t+=e.nofollow?' nofollow="1"':"",t+=e.newtab?"":' newtab="0"',t+=' name="'.concat(se(e.name),'"'),t+=' summary="'.concat(se(e.summary),'"'),t+=e.image.id?' image="'.concat(e.image.id,'"'):"",-1===e.image.id&&e.image.url&&(t+=e.image.url?' image_url="'.concat(e.image.url,'"'):""),t+="]",this.props.args.insertCallback(t)}else this.props.args.insertCallback('[wprm-recipe-roundup-item id="'.concat(e.recipe.id,'"]'))}},!0)}},(0,l.S)("Recipe Roundup Item")),i.createElement(d,{required:"elite",onClick:()=>{"function"==typeof this.props.args.insertCallback&&this.props.args.insertCallback("[wprm-recipe-submission]"),this.props.maybeCloseModal()}},(0,l.S)("Recipe Submission Form")),i.createElement(d,{required:"elite",onClick:()=>{"function"==typeof this.props.args.insertCallback&&this.props.args.insertCallback("[wprm-recipe-collections]"),this.props.maybeCloseModal()}},(0,l.S)("Recipe Collections")),i.createElement(d,{required:"elite",help:(0,l.S)("Find the saved collection ID on the WP Recipe Maker > Manage > Saved Collections page"),onClick:()=>{"function"==typeof this.props.args.insertCallback&&this.props.args.insertCallback('[wprm-saved-collection id=""]'),this.props.maybeCloseModal()}},(0,l.S)("Saved Recipe Collection")))))}}var ce=r(68470),ue=r(55565),de=r.n(ue),pe=r(34133),fe=e=>{var t=null;return e.id&&(t="wprm-admin-modal-fields-group-".concat(e.id)),i.createElement(ce.W_,{className:"wprm-admin-modal-fields-group",id:t,name:t},e.header?i.createElement("div",{className:"wprm-admin-modal-fields-group-header"},e.header):null,i.createElement("div",{className:"wprm-admin-modal-fields"},e.children))},me=e=>i.createElement(i.Fragment,null,i.createElement(C.Z,{label:(0,l.S)("Import from Text")},i.createElement(re,{placeholder:(0,l.S)("Paste or type recipe to start..."),value:"",onChange:t=>{t&&e.onModeChange("text-import",t)}})),i.createElement(C.Z,{label:(0,l.S)("Import from JSON")},i.createElement(re,{placeholder:(0,l.S)("Paste the recipe JSON data to import"),value:"",onChange:t=>{if(t)try{var r=JSON.parse(t);e.onImportJSON(r),alert((0,l.S)("The recipe has been imported."))}catch(n){alert((0,l.S)("No valid recipe found."))}}}))),he=r(5308),ge=e=>{var t=e.id>0,r=t=>{t.preventDefault(),he.Z.selectImage((t=>{if(e.hasOwnProperty("requirements")){var r=[];e.requirements.hasOwnProperty("width")&&t.width&&t.width<e.requirements.width&&r.push("".concat((0,l.S)("The image should have at least this width:")," ").concat(e.requirements.width,"px")),e.requirements.hasOwnProperty("height")&&t.height&&t.height<e.requirements.height&&r.push("".concat((0,l.S)("The image should have at least this height:")," ").concat(e.requirements.width,"px")),r.length&&alert("".concat((0,l.S)("Warning! We recommend making sure the image meets the following requirements:"),"\n\n").concat(r.join("\n")))}e.onChange(t.id,t.url)}))};return i.createElement("div",{className:"wprm-admin-modal-field-image"},t?i.createElement("div",{className:"wprm-admin-modal-field-image-preview"},i.createElement("img",{onClick:r,src:e.url}),i.createElement("a",{href:"#",tabIndex:e.disableTab?"-1":null,onClick:t=>{t.preventDefault(),e.onChange(0,"")}},(0,l.S)("Remove Image"))):i.createElement(d,{required:e.required,disableTab:e.disableTab,onClick:r},(0,l.S)("Select Image")))},ve=e=>{var t=e.id>0,r=!t&&(-1==e.id||e.embed),n=t||r,o=t=>{t.preventDefault(),he.Z.selectVideo((t=>{e.onChange(t.attributes.id,t.attributes.thumb.src)}))};return i.createElement("div",{className:"wprm-admin-modal-field-video"},n?i.createElement(i.Fragment,null,t?i.createElement("div",{className:"wprm-admin-modal-field-video-preview"},i.createElement("img",{onClick:o,src:e.thumb||wprm_admin_modal.images.video}),i.createElement("a",{href:"#",onClick:t=>{t.preventDefault(),e.onChange(0,"")}},(0,l.S)("Remove Video"))):i.createElement(i.Fragment,null,i.createElement(re,{value:e.embed,onChange:t=>{e.onChange(-1,"",t)},placeholder:(0,l.S)("Use URL to the video (e.g. https://www.youtube.com/watch?v=dQw4w9WgXcQ) or the full embed code.")}),i.createElement("a",{href:"#",onClick:t=>{t.preventDefault(),e.onChange(0,"","")}},(0,l.S)("Remove Video")))):i.createElement(i.Fragment,null,i.createElement("button",{className:"button",onClick:o},(0,l.S)("Upload Video")),i.createElement("button",{className:"button",onClick:t=>{t.preventDefault(),e.onChange(-1,"")}},(0,l.S)("Embed Video"))))},be=e=>i.createElement(i.Fragment,null,i.createElement(C.Z,{label:(0,l.S)("Image"),help:(0,l.S)("Used in the recipe metadata. Should be an image of the completed dish.")},i.createElement(ge,{requirements:{width:500,height:500},id:e.image.id,url:e.image.url,onChange:(t,r)=>{e.onRecipeChange({image_id:t,image_url:r})}})),"recipe_image"!==wprm_admin.settings.pinterest_use_for_image?i.createElement(C.Z,{label:(0,l.S)("Pin Image"),help:(0,l.S)('Optionally set a different image to use for the "Pin Recipe" button.')},i.createElement(ge,{required:"premium",id:e.pinImage.id,url:e.pinImage.url,onChange:(t,r)=>{e.onRecipeChange({pin_image_id:t,pin_image_url:r})}})):null,i.createElement(C.Z,{label:(0,l.S)("Video"),help:(0,l.S)("Used in the recipe metadata. Can be displayed elsewhere on the page using the [wprm-recipe-video] shortcode.")},i.createElement(ve,{id:e.video.id,thumb:e.video.thumb,embed:e.video.embed,onChange:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i={video_id:t,video_thumb_url:r};!1!==n&&(i.video_embed=n),e.onRecipeChange(i)}}))),ye=e=>i.createElement(i.Fragment,null,i.createElement(C.Z,{id:"slug",label:(0,l.S)("Slug")},i.createElement(h.Z,{name:"recipe-slug",placeholder:(0,l.S)("recipe-slug"),value:e.slug,onChange:t=>{e.onRecipeChange({slug:t})}})),i.createElement(C.Z,{id:"post_status",label:(0,l.S)("Status")},i.createElement(D.Z,{options:wprm_admin_modal.options.post_status,value:e.post_status,onChange:t=>{e.onRecipeChange({post_status:t})},width:300}))),we=r(38974),Ee=r.n(we);function Se(){return Ee().getParser(window.navigator.userAgent).satisfies({edge:"<80",ie:">0"})}var xe,Ie=e=>{var t=!!e.hasOwnProperty("disabled")&&e.disabled;return i.createElement("input",{type:"checkbox",className:"wprm-admin-modal-field-checkbox",disabled:t,name:e.name,checked:e.value,onChange:t=>{e.onChange(t.target.checked)}})};r(9968);
|
2 |
/*!
|
3 |
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
4 |
*
|
1 |
+
var WPRecipeMaker;(WPRecipeMaker=void 0===WPRecipeMaker?{}:WPRecipeMaker)["wp-recipe-maker/dist/admin-modal"]=(self.webpackChunkWPRecipeMaker_name_=self.webpackChunkWPRecipeMaker_name_||[]).push([[97],{5831:function(e,t,r){"use strict";r.d(t,{o:function(){return a},L:function(){return s}});r(54883),r(12798),r(22321),r(67838),r(29897),r(68995);var n=r(6),i=r.n(n),o={"¼":"1/4","½":"1/2","¾":"3/4","⅐":"1/7","⅑":"1/9","⅒":"1/10","⅓":"1/3","⅔":"2/3","⅕":"1/5","⅖":"2/5","⅗":"3/5","⅘":"4/5","⅙":"1/6","⅚":"5/6","⅛":"1/8","⅜":"3/8","⅝":"5/8","⅞":"7/8"};function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e,a=!1;if(r){var s=void 0!==window.wprmp_public?wprmp_public.settings.fractions_enabled:wprmp_admin.settings.fractions_enabled;if(s){var l=void 0!==window.wprmp_public?wprmp_public.settings.fractions_use_mixed:wprmp_admin.settings.fractions_use_mixed,c=void 0!==window.wprmp_public?wprmp_public.settings.fractions_use_symbols:wprmp_admin.settings.fractions_use_symbols,u=parseInt(void 0!==window.wprmp_public?wprmp_public.settings.fractions_max_denominator:wprmp_admin.settings.fractions_max_denominator);u=u>1?u:8;var d=i()(e,u,l);if(d&&3===d.length&&!isNaN(d[0])&&!isNaN(d[1])&&!isNaN(d[2])){var p="";if(0<d[0]&&(p+="".concat(d[0]," ")),0<d[1]?0<d[2]&&(p+=1===d[2]?d[1]:"".concat(d[1],"/").concat(d[2])):0===d[0]&&(p+="1/".concat(u)),p){if(c)for(var f of(p=" "+p+" ",Object.keys(o))){var m=o[f];p=p.replace(" ".concat(m," ")," ".concat(f," "))}n=p.trim(),a=!0}}}}if(!a){t=parseInt(t),0==(n=parseFloat(parseFloat(e).toFixed(t)))&&(n+=Math.pow(10,-1*t)),n=""+n;var h=void 0!==window.wprmp_public?wprmp_public.settings.decimal_separator:wprmp_admin.settings.decimal_separator;"comma"===h&&(n=n.replace(".",","))}return n}function s(e){var t=(e=(e=(e=(e=(e=((e=(e=(e=""+e).replace(",",".")).replace(" to ","-"))+"").replace(/(\u00BC|\u00BD|\u00BE|\u2150|\u2151|\u2152|\u2153|\u2154|\u2155|\u2156|\u2157|\u2158|\u2159|\u215A|\u215B|\u215C|\u215D|\u215E)/,(function(e,t){return" "+o[t]}))).replace(/(<([^>]+)>)/gi,"")).replace(/(\[([^\]]+)\])/gi,"")).replace(/[^\d\s\.\/-]/gi,"")).trim()).split(" "),r=!1;if(""!==e){r=0;for(var n=0;n<t.length;n++)if(""!==t[n].trim()){var i=t[n].split("/",2),a=parseFloat(i[0]);if(void 0!==i[1]){var s=parseFloat(i[1]);0!==s&&(a/=s)}isNaN(a)||(r+=a)}}return r}},57622:function(e,t,r){"use strict";r.r(t);var n=r(73961),i=r(89526),o=r(34823),a=r.n(o),s=r(48618),l=r(52082),c=r(99237),u=r(95075),d=e=>{var t=!1,r=!!e.help&&e.help,n="button";if(e.required&&(!wprm_admin.addons.hasOwnProperty(e.required)||!0!==wprm_admin.addons[e.required]))if(t=!0,"premium"!==e.required){var o=e.required[0].toUpperCase()+e.required.substring(1);r="WP Recipe Maker ".concat(o," Bundle Only")}else r="WP Recipe Maker Premium Only";return e.isPrimary&&(n+=" button-primary"),t&&(n+=" wprm-button-required"),i.createElement(u.Z,{content:r},i.createElement("button",{className:n,tabIndex:e.disableTab?"-1":null,onClick:t?()=>{confirm("Want to learn more about the version required for this feature?")&&window.open("https://bootstrapped.ventures/wp-recipe-maker/get-the-plugin/","_blank")}:e.onClick},e.children))},p=r(96005),f=r(86605),m=e=>{var t=!!e.action&&e.action.type,r=[{value:"delete",label:(0,l.S)("Delete Actions"),default:!1}];return i.createElement(i.Fragment,null,i.createElement("div",{className:"wprm-admin-modal-bulk-edit-label"},(0,l.S)("Select an action to perform:")),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-actions"},r.map((r=>i.createElement("div",{className:"wprm-admin-modal-bulk-edit-action",key:r.value},i.createElement("input",{type:"radio",value:r.value,name:"wprm-admin-radio-bulk-edit-action",id:"wprm-admin-radio-bulk-edit-action-".concat(r.value),checked:t===r.value,onChange:()=>{var t={type:r.value,options:r.default};e.onActionChange(t)}}),i.createElement("label",{htmlFor:"wprm-admin-radio-bulk-edit-action-".concat(r.value)},r.label))))))},h=r(59905),g=r(24207);function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var w=e=>{var t=!!e.action&&e.action.type,r=[{value:"change-link",label:(0,l.S)("Change Link"),default:""},{value:"change-nofollow",label:(0,l.S)("Change Link Nofollow"),default:"default"},{value:"export",label:(0,l.S)("Export Equipment"),default:!1,required:"premium"},{value:"delete",label:(0,l.S)("Delete Equipment"),default:!1}];return i.createElement("form",null,i.createElement("div",{className:"wprm-admin-modal-bulk-edit-label"},(0,l.S)("Select an action to perform:")),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-actions"},r.map((r=>i.createElement("div",{className:"wprm-admin-modal-bulk-edit-action",key:r.value},i.createElement("input",{type:"radio",value:r.value,name:"wprm-admin-radio-bulk-edit-action",id:"wprm-admin-radio-bulk-edit-action-".concat(r.value),checked:t===r.value,onChange:()=>{var t={type:r.value,options:r.default};e.onActionChange(t)}}),i.createElement("label",{htmlFor:"wprm-admin-radio-bulk-edit-action-".concat(r.value)},r.label))))),t&&!1!==e.action.options&&i.createElement(i.Fragment,null,i.createElement("div",{className:"wprm-admin-modal-bulk-edit-label"},(0,l.S)("Action options:")),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-options"},"change-link"===t&&i.createElement(h.Z,{name:"equipment-link",value:e.action.options,placeholder:(0,l.S)("Equipment Link"),onChange:t=>{var r=b(b({},e.action),{},{options:t});e.onActionChange(r)}}),"change-nofollow"===t&&i.createElement(g.Z,{id:"nofollow",options:wprm_admin_modal.options.equipment_link_nofollow,value:e.action.options,onChange:t=>{var r=b(b({},e.action),{},{options:t});e.onActionChange(r)}}))))};function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function S(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach((function(t){x(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function x(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var I=e=>{var t=!!e.action&&e.action.type,r=[{value:"change-group",label:(0,l.S)("Change Shopping List Group"),default:""},{value:"change-link",label:(0,l.S)("Change Link"),default:""},{value:"change-nofollow",label:(0,l.S)("Change Link Nofollow"),default:"default"},{value:"create-nutrition",label:(0,l.S)("Add as Custom Nutrition Ingredient"),default:!1},{value:"export",label:(0,l.S)("Export Ingredients"),default:!1,required:"premium"},{value:"delete",label:(0,l.S)("Delete Ingredients"),default:!1}];return i.createElement("form",null,i.createElement("div",{className:"wprm-admin-modal-bulk-edit-label"},(0,l.S)("Select an action to perform:")),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-actions"},r.map((r=>i.createElement("div",{className:"wprm-admin-modal-bulk-edit-action",key:r.value},i.createElement("input",{type:"radio",value:r.value,name:"wprm-admin-radio-bulk-edit-action",id:"wprm-admin-radio-bulk-edit-action-".concat(r.value),checked:t===r.value,onChange:()=>{var t={type:r.value,options:r.default};e.onActionChange(t)}}),i.createElement("label",{htmlFor:"wprm-admin-radio-bulk-edit-action-".concat(r.value)},r.label))))),t&&!1!==e.action.options&&i.createElement(i.Fragment,null,i.createElement("div",{className:"wprm-admin-modal-bulk-edit-label"},(0,l.S)("Action options:")),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-options"},"change-group"===t&&i.createElement(h.Z,{name:"shopping-list-group",value:e.action.options,placeholder:(0,l.S)("Shopping List Group"),onChange:t=>{var r=S(S({},e.action),{},{options:t});e.onActionChange(r)}}),"change-link"===t&&i.createElement(h.Z,{name:"ingredient-link",value:e.action.options,placeholder:(0,l.S)("Ingredient Link"),onChange:t=>{var r=S(S({},e.action),{},{options:t});e.onActionChange(r)}}),"change-nofollow"===t&&i.createElement(g.Z,{id:"nofollow",options:wprm_admin_modal.options.ingredient_link_nofollow,value:e.action.options,onChange:t=>{var r=S(S({},e.action),{},{options:t});e.onActionChange(r)}}))))},O=e=>{var t=!!e.action&&e.action.type,r=[{value:"delete",label:(0,l.S)("Delete Ratings"),default:!1}];return i.createElement(i.Fragment,null,i.createElement("div",{className:"wprm-admin-modal-bulk-edit-label"},(0,l.S)("Select an action to perform:")),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-actions"},r.map((r=>i.createElement("div",{className:"wprm-admin-modal-bulk-edit-action",key:r.value},i.createElement("input",{type:"radio",value:r.value,name:"wprm-admin-radio-bulk-edit-action",id:"wprm-admin-radio-bulk-edit-action-".concat(r.value),checked:t===r.value,onChange:()=>{var t={type:r.value,options:r.default};e.onActionChange(t)}}),i.createElement("label",{htmlFor:"wprm-admin-radio-bulk-edit-action-".concat(r.value)},r.label))))))},C=r(43636),D=r(69347),M=(r(54883),r(33130),r(68995),r(2778)),P=r.n(M),N=r(844),k=(r(12821),r(2652),r(23078)),A=r(24573),T=(r(72144),r(72638),r(6185));function j(){return(j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var L,R,_,B=function(e,t){void 0===e&&(e="");var r=String(e).toLowerCase(),n=String(t.value).toLowerCase(),i=String(t.label).toLowerCase();return n===r||i===r},F=j({allowCreateWhileLoading:!1,createOptionPosition:"last"},{formatCreateLabel:function(e){return'Create "'+e+'"'},isValidNewOption:function(e,t,r){return!(!e||t.some((function(t){return B(e,t)}))||r.some((function(t){return B(e,t)})))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}}),Z=(L=A.S,_=R=function(e){var t,r;function n(t){var r;(r=e.call(this,t)||this).select=void 0,r.onChange=function(e,t){var n=r.props,i=n.getNewOptionData,o=n.inputValue,a=n.isMulti,s=n.onChange,l=n.onCreateOption,c=n.value,u=n.name;if("select-option"!==t.action)return s(e,t);var d=r.state.newOption,p=Array.isArray(e)?e:[e];if(p[p.length-1]!==d)s(e,t);else if(l)l(o);else{var f=i(o,o),m={action:"create-option",name:u};s(a?[].concat((0,k.e)(c),[f]):f,m)}};var n=t.options||[];return r.state={newOption:void 0,options:n},r}r=e,(t=n).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var o=n.prototype;return o.UNSAFE_componentWillReceiveProps=function(e){var t=e.allowCreateWhileLoading,r=e.createOptionPosition,n=e.formatCreateLabel,i=e.getNewOptionData,o=e.inputValue,a=e.isLoading,s=e.isValidNewOption,l=e.value,c=e.options||[],u=this.state.newOption;u=s(o,(0,k.e)(l),c)?i(o,n(o)):void 0,this.setState({newOption:u,options:!t&&a||!u?c:"first"===r?[u].concat(c):[].concat(c,[u])})},o.focus=function(){this.select.focus()},o.blur=function(){this.select.blur()},o.render=function(){var e=this,t=this.state.options;return i.createElement(L,j({},this.props,{ref:function(t){e.select=t},options:t,onChange:this.onChange}))},n}(i.Component),R.defaultProps=F,_),H=(0,T.m)(Z);function U(){return(U=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function W(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function G(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?W(Object(r),!0).forEach((function(t){z(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):W(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function z(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class q extends i.Component{shouldComponentUpdate(e){return this.props.id!==e.id||JSON.stringify(this.props.value)!==JSON.stringify(e.value)}render(){var e=this,t=wprm_admin_modal.categories[this.props.id].terms,r=[],n=[],o=function(t){var i={value:t.term_id,label:P().decode(t.name)};r.push(i),e.props.value.find((e=>e.term_id===t.term_id||e.name===t.term_id))&&n.push(i)};for(var a of t)o(a);var s=this.props.custom?this.props.custom:{},c=this.props.creatable?H:N.ZP;return i.createElement(c,U({isMulti:!0,options:r,value:n,placeholder:this.props.creatable?(0,l.S)("Select from list or type to create..."):(0,l.S)("Select from list..."),onChange:t=>{var r=[];if(t){var n=function(t){t.hasOwnProperty("__isNew__")&&t.__isNew__&&wprm_admin_modal.categories[e.props.id].terms.push({term_id:t.label,name:t.label});var n=wprm_admin_modal.categories[e.props.id].terms.find((e=>e.term_id===t.value));n&&r.push(n)};for(var i of t)n(i)}this.props.onChange(r)},styles:{placeholder:e=>G(G({},e),{},{color:"#444",opacity:"0.333"}),control:e=>G(G({},e),{},{backgroundColor:"white"}),container:e=>G(G({},e),{},{width:"100%",maxWidth:this.props.width?this.props.width:"100%"})}},s))}}function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function J(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?V(Object(r),!0).forEach((function(t){Y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Q=e=>{var t=!!e.action&&e.action.type,r=!1,n=[];Object.keys(wprm_admin_manage.taxonomies).map(((e,t)=>{var i=e.substr(5);r||(r=i),n.push({value:i,label:wprm_admin_manage.taxonomies[e].name})}));var o=[];return 0<n.length&&o.push({value:"add-terms",label:(0,l.S)("Add Terms"),default:{taxonomy:r,terms:[]}},{value:"remove-terms",label:(0,l.S)("Remove Terms"),default:{taxonomy:r,terms:[]}}),"public"===wprm_admin.settings.post_type_structure&&o.push({value:"change-status",label:(0,l.S)("Change Recipe Status"),default:"draft"}),o.push({value:"change-type",label:(0,l.S)("Change Recipe Type"),default:"food"},{value:"change-author",label:(0,l.S)("Change Display Author"),default:{author:"default",author_name:"",author_link:""}},{value:"change-servings",label:(0,l.S)("Change Servings"),default:{servings:"",servings_unit:""}},{value:"recalculate-time",label:(0,l.S)("Recalculate Total Time"),default:!1},{value:"print",label:(0,l.S)("Print Recipes"),default:!1},{value:"export",label:(0,l.S)("Export Recipes"),default:"recipe",required:"premium"},{value:"delete",label:(0,l.S)("Delete Recipes"),default:!1}),i.createElement("form",null,i.createElement("div",{className:"wprm-admin-modal-bulk-edit-label"},(0,l.S)("Select an action to perform:")),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-actions"},o.map((r=>i.createElement("div",{className:"wprm-admin-modal-bulk-edit-action",key:r.value},i.createElement("input",{type:"radio",value:r.value,name:"wprm-admin-radio-bulk-edit-action",id:"wprm-admin-radio-bulk-edit-action-".concat(r.value),checked:t===r.value,onChange:()=>{var t={type:r.value,options:r.default};r.hasOwnProperty("required")&&(t.required=r.required),e.onActionChange(t)}}),i.createElement("label",{htmlFor:"wprm-admin-radio-bulk-edit-action-".concat(r.value)},r.label))))),t&&!1!==e.action.options&&i.createElement(i.Fragment,null,i.createElement("div",{className:"wprm-admin-modal-bulk-edit-label"},(0,l.S)("Action options:")),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-options"},"change-status"===t&&i.createElement(g.Z,{id:"status",options:wprm_admin_modal.options.post_status,value:e.action.options,onChange:t=>{var r=J(J({},e.action),{},{options:t});e.onActionChange(r)}}),"change-type"===t&&i.createElement(g.Z,{id:"type",options:[{value:"food",label:(0,l.S)("Food Recipe")},{value:"howto",label:(0,l.S)("How-to Instructions")},{value:"other",label:(0,l.S)("Other (no metadata)")}],value:e.action.options,onChange:t=>{var r=J(J({},e.action),{},{options:t});e.onActionChange(r)}}),"change-author"===t&&i.createElement(i.Fragment,null,i.createElement(D.Z,{options:wprm_admin_modal.options.author.filter((e=>"same"!==e.actual)),value:e.action.options.author,onChange:t=>{var r=J(J({},e.action),{},{options:{author:t,author_name:"",author_link:""}});e.onActionChange(r)},width:300,custom:{menuPlacement:"top",maxMenuHeight:150}}),"custom"===wprm_admin_modal.options.author.find((t=>t.value===e.action.options.author)).actual&&i.createElement(i.Fragment,null," ",i.createElement(h.Z,{name:"author-name",placeholder:(0,l.S)("Author Name"),value:e.action.options.author_name,onChange:t=>{var r=J(J({},e.action),{},{options:J(J({},e.action.options),{},{author_name:t})});e.onActionChange(r)}})," ",i.createElement(h.Z,{name:"author-link",placeholder:"https://bootstrapped.ventures",type:"url",value:e.action.options.author_link,onChange:t=>{var r=J(J({},e.action),{},{options:J(J({},e.action.options),{},{author_link:t})});e.onActionChange(r)}}))),"change-servings"===t&&i.createElement(C.Z,{id:"servings"},i.createElement(h.Z,{placeholder:"4",type:"number",value:0!=e.action.options.servings?e.action.options.servings:"",onChange:t=>{var r=J(J({},e.action),{},{options:J(J({},e.action.options),{},{servings:t})});e.onActionChange(r)}}),i.createElement(h.Z,{name:"servings-unit",placeholder:(0,l.S)("people"),value:e.servings_unit,onChange:t=>{var r=J(J({},e.action),{},{options:J(J({},e.action.options),{},{servings_unit:t})});e.onActionChange(r)}})),("add-terms"===t||"remove-terms"===t)&&i.createElement(i.Fragment,null,i.createElement(D.Z,{options:n,value:e.action.options.taxonomy,onChange:t=>{var r=J(J({},e.action),{},{options:{taxonomy:t,terms:[]}});e.onActionChange(r)},width:200,custom:{menuPlacement:"top",maxMenuHeight:150}})," ",i.createElement(q,{id:e.action.options.taxonomy,value:e.action.options.terms,onChange:t=>{var r=J(J({},e.action),{},{options:{taxonomy:e.action.options.taxonomy,terms:t}});e.onActionChange(r)},custom:{menuPlacement:"top",maxMenuHeight:200}})),"export"===t&&i.createElement(g.Z,{id:"type",options:[{value:"recipe",label:(0,l.S)("Recipes only")},{value:"with_parent",label:(0,l.S)("Recipes with their parent post")}],value:e.action.options,onChange:t=>{var r=J(J({},e.action),{},{options:t});e.onActionChange(r)}}))))},X=e=>{var t=!!e.action&&e.action.type,r=[{value:"delete",label:(0,l.S)("Delete Revisions"),default:!1}];return i.createElement(i.Fragment,null,i.createElement("div",{className:"wprm-admin-modal-bulk-edit-label"},(0,l.S)("Select an action to perform:")),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-actions"},r.map((r=>i.createElement("div",{className:"wprm-admin-modal-bulk-edit-action",key:r.value},i.createElement("input",{type:"radio",value:r.value,name:"wprm-admin-radio-bulk-edit-action",id:"wprm-admin-radio-bulk-edit-action-".concat(r.value),checked:t===r.value,onChange:()=>{var t={type:r.value,options:r.default};e.onActionChange(t)}}),i.createElement("label",{htmlFor:"wprm-admin-radio-bulk-edit-action-".concat(r.value)},r.label))))))},K=e=>{var t=!!e.action&&e.action.type,r=[{value:"export",label:(0,l.S)("Export Terms"),default:!1,required:"premium"},{value:"delete",label:(0,l.S)("Delete Terms"),default:!1}];return i.createElement(i.Fragment,null,i.createElement("div",{className:"wprm-admin-modal-bulk-edit-label"},(0,l.S)("Select an action to perform:")),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-actions"},r.map((r=>i.createElement("div",{className:"wprm-admin-modal-bulk-edit-action",key:r.value},i.createElement("input",{type:"radio",value:r.value,name:"wprm-admin-radio-bulk-edit-action",id:"wprm-admin-radio-bulk-edit-action-".concat(r.value),checked:t===r.value,onChange:()=>{var t={type:r.value,options:r.default};e.onActionChange(t)}}),i.createElement("label",{htmlFor:"wprm-admin-radio-bulk-edit-action-".concat(r.value)},r.label))))),t&&!1!==e.action.options&&i.createElement(i.Fragment,null,i.createElement("div",{className:"wprm-admin-modal-bulk-edit-label"},(0,l.S)("Action options:")),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-options"})))},$=e=>{var t=!!e.action&&e.action.type,r=[{value:"delete",label:(0,l.S)("Permanently Delete Recipes"),default:!1}];return i.createElement(i.Fragment,null,i.createElement("div",{className:"wprm-admin-modal-bulk-edit-label"},(0,l.S)("Select an action to perform:")),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-actions"},r.map((r=>i.createElement("div",{className:"wprm-admin-modal-bulk-edit-action",key:r.value},i.createElement("input",{type:"radio",value:r.value,name:"wprm-admin-radio-bulk-edit-action",id:"wprm-admin-radio-bulk-edit-action-".concat(r.value),checked:t===r.value,onChange:()=>{var t={type:r.value,options:r.default};e.onActionChange(t)}}),i.createElement("label",{htmlFor:"wprm-admin-radio-bulk-edit-action-".concat(r.value)},r.label))))))},ee={analytics:{label:(0,l.S)("Actions"),elem:m},rating:{label:(0,l.S)("Ratings"),elem:O},recipe:{label:(0,l.S)("Recipes"),elem:Q},revision:{label:(0,l.S)("Revisions"),elem:X},ingredient:{label:(0,l.S)("Ingredients"),elem:I},equipment:{label:(0,l.S)("Equipment"),elem:w},trash:{label:(0,l.S)("Recipes"),elem:$},nutrition_ingredient:{label:(0,l.S)("Custom Nutrition Ingredients"),elem:K}};Object.keys(wprm_admin_modal.categories).map((e=>{var t=wprm_admin_modal.categories[e];ee[e]={label:t.label,elem:K}}));class te extends i.Component{constructor(e){super(e),this.state={route:e.args.hasOwnProperty("route")?e.args.route:"recipe",type:e.args.hasOwnProperty("type")?e.args.type:"recipe",ids:e.args.hasOwnProperty("ids")?e.args.ids:[],action:!1,savingChanges:!1,result:!1},this.onBulkEdit=this.onBulkEdit.bind(this),this.allowCloseModal=this.allowCloseModal.bind(this)}onBulkEdit(){this.state.action&&this.setState({savingChanges:!0},(()=>{c.Z.manage.bulkEdit(this.state.route,this.state.type,this.state.ids,this.state.action).then((e=>{var t=!1;e.hasOwnProperty("result")&&(t=e.result),this.setState({savingChanges:!1,result:t},(()=>{"function"==typeof this.props.args.saveCallback&&this.props.args.saveCallback(),t||this.props.maybeCloseModal()}))}))}))}allowCloseModal(){return!this.state.savingChanges}changesMade(){return!(!this.state.action||!this.state.action.type)&&(!Array.isArray(this.state.action.options)||0!==this.state.action.options.length)}render(){var e=!!ee.hasOwnProperty(this.state.type)&&ee[this.state.type];if(!e)return null;var t=e.elem,r="".concat((0,l.S)("Bulk Edit")," ").concat(this.state.ids.length," ").concat(e.label);return i.createElement(i.Fragment,null,i.createElement(p.Z,{onCloseModal:this.props.maybeCloseModal},r),i.createElement("div",{className:"wprm-admin-modal-bulk-edit-container"},!1===this.state.result?i.createElement(t,{action:this.state.action,onActionChange:e=>{this.setState({action:e})}}):i.createElement("div",{dangerouslySetInnerHTML:{__html:this.state.result}})),i.createElement(f.Z,{savingChanges:this.state.savingChanges},!1===this.state.result?i.createElement(d,{isPrimary:!0,required:this.state.action&&this.state.action.hasOwnProperty("required")?this.state.action.required:null,onClick:this.onBulkEdit,disabled:!this.changesMade()},r):i.createElement(d,{isPrimary:!0,onClick:this.props.maybeCloseModal},(0,l.S)("Close"))))}}var re=e=>i.createElement("textarea",{value:e.value,placeholder:e.placeholder,onChange:t=>{e.onChange(t.target.value)}});class ne extends i.Component{constructor(e){super(e),this.state={fields:e.args.fields}}render(){return i.createElement(i.Fragment,null,i.createElement(p.Z,{onCloseModal:this.props.maybeCloseModal},this.props.args.header),i.createElement("div",{className:"wprm-admin-modal-input-fields-container"},this.state.fields.map(((e,t)=>{var r=h.Z;switch(e.hasOwnProperty("type")?e.type:"text"){case"textarea":r=re}return i.createElement(i.Fragment,{key:t},e.hasOwnProperty("label")&&i.createElement("div",{className:"wprm-admin-modal-input-fields-field-label"},e.label),i.createElement(r,{value:e.value,onChange:e=>{var r=[...this.state.fields];r[t].value=e,this.setState({fields:r})}}))}))),i.createElement(f.Z,{savingChanges:!1},i.createElement("button",{className:"button button-primary",onClick:()=>{"function"==typeof this.props.args.insertCallback&&this.props.args.insertCallback(this.state),this.props.maybeCloseModal()}},(0,l.S)("Change"))))}}r(22321);function ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function oe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(r),!0).forEach((function(t){ae(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ie(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ae(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var se=e=>e=(e=(e=(e=e.replace(/"/gm,"%22")).replace(/\[/gm,"%5B")).replace(/\]/gm,"%5D")).replace(/\r?\n|\r/gm,"%0A");class le extends i.Component{render(){return i.createElement(i.Fragment,null,i.createElement(p.Z,{onCloseModal:this.props.maybeCloseModal},"WP Recipe Maker"),i.createElement("div",{className:"wprm-admin-modal-menu-container"},i.createElement("h2",null,(0,l.S)("Recipes")),i.createElement("div",{className:"wprm-admin-modal-menu-buttons"},i.createElement(d,{isPrimary:!0,onClick:()=>{var e=this.props.args;if(wprm_admin.settings.hasOwnProperty("recipe_name_from_post_title")&&wprm_admin.settings.recipe_name_from_post_title){var t=document.querySelector("#title[name=post_title]");if(t){var r=JSON.parse(JSON.stringify(wprm_admin_modal.recipe));r.name=t.value,e.recipe=r}}WPRM_Modal.open("recipe",e,!0)}},(0,l.S)("Create new Recipe")),i.createElement(d,{onClick:()=>{WPRM_Modal.open("select",{title:(0,l.S)("Insert existing Recipe"),button:(0,l.S)("Insert"),fields:{recipe:{}},insertCallback:e=>{"function"==typeof this.props.args.insertCallback&&this.props.args.insertCallback('[wprm-recipe id="'.concat(e.recipe.id,'"]'))}},!0)}},(0,l.S)("Insert existing Recipe")),i.createElement(d,{required:"premium",onClick:()=>{WPRM_Modal.open("select",{title:(0,l.S)("Create new from existing Recipe"),button:(0,l.S)("Clone Recipe"),fields:{recipe:{}},nextStepCallback:e=>{WPRM_Modal.open("recipe",oe(oe({},this.props.args),{},{recipeId:e.recipe.id,cloneRecipe:!0}),!0)}},!0)}},(0,l.S)("Create new from existing Recipe"))),i.createElement("h2",null,(0,l.S)("Recipe Snippets")),i.createElement("div",{className:"wprm-admin-modal-menu-buttons"},i.createElement(d,{help:(0,l.S)("Displays default snippet template as set in the WPRM Settings"),onClick:()=>{WPRM_Modal.open("select",{title:(0,l.S)("Full Snippet Template"),button:(0,l.S)("Insert"),fields:{recipe:{showFirst:!0}},insertCallback:e=>{if("function"==typeof this.props.args.insertCallback){var t="[wprm-recipe-snippet";t+=e.recipe&&e.recipe.id?' id="'.concat(e.recipe.id,'"]'):"]",this.props.args.insertCallback(t)}}},!0)}},(0,l.S)("Full Snippet Template")),i.createElement(d,{onClick:()=>{WPRM_Modal.open("select",{title:(0,l.S)("Jump to Recipe"),button:(0,l.S)("Insert"),fields:{recipe:{showFirst:!0}},insertCallback:e=>{if("function"==typeof this.props.args.insertCallback){var t="[wprm-recipe-jump";t+=e.recipe&&e.recipe.id?' id="'.concat(e.recipe.id,'"]'):"]",this.props.args.insertCallback(t)}}},!0)}},(0,l.S)("Jump to Recipe")),i.createElement(d,{onClick:()=>{WPRM_Modal.open("select",{title:(0,l.S)("Jump to Video"),button:(0,l.S)("Insert"),fields:{recipe:{showFirst:!0}},insertCallback:e=>{if("function"==typeof this.props.args.insertCallback){var t="[wprm-recipe-jump-video";t+=e.recipe&&e.recipe.id?' id="'.concat(e.recipe.id,'"]'):"]",this.props.args.insertCallback(t)}}},!0)}},(0,l.S)("Jump to Video")),i.createElement(d,{onClick:()=>{WPRM_Modal.open("select",{title:(0,l.S)("Print Recipe"),button:(0,l.S)("Insert"),fields:{recipe:{showFirst:!0}},insertCallback:e=>{if("function"==typeof this.props.args.insertCallback){var t="[wprm-recipe-print";t+=e.recipe&&e.recipe.id?' id="'.concat(e.recipe.id,'"]'):"]",this.props.args.insertCallback(t)}}},!0)}},(0,l.S)("Print Recipe"))),i.createElement("h2",null,(0,l.S)("Recipe Parts")),i.createElement("div",{className:"wprm-admin-modal-menu-buttons"},i.createElement(d,{required:"premium",onClick:()=>{WPRM_Modal.open("select",{title:(0,l.S)("Nutrition Label"),button:(0,l.S)("Insert"),fields:{recipe:{showFirst:!0}},insertCallback:e=>{if("function"==typeof this.props.args.insertCallback){var t="[wprm-nutrition-label";t+=e.recipe&&e.recipe.id?' id="'.concat(e.recipe.id,'"]'):"]",this.props.args.insertCallback(t)}}},!0)}},(0,l.S)("Nutrition Label")),i.createElement(d,{onClick:()=>{WPRM_Modal.open("select",{title:(0,l.S)("Recipe Video"),button:(0,l.S)("Insert"),fields:{recipe:{showFirst:!0}},insertCallback:e=>{if("function"==typeof this.props.args.insertCallback){var t="[wprm-recipe-video";t+=e.recipe&&e.recipe.id?' id="'.concat(e.recipe.id,'"]'):"]",this.props.args.insertCallback(t)}}},!0)}},(0,l.S)("Recipe Video"))),i.createElement("h2",null,(0,l.S)("Other Features")),i.createElement("div",{className:"wprm-admin-modal-menu-buttons"},i.createElement(d,{help:(0,l.S)("Use for a list of existing recipes on your website"),onClick:()=>{WPRM_Modal.open("roundup",{insertCallback:e=>{if("function"==typeof this.props.args.insertCallback)if(e.hasOwnProperty("type")&&"external"===e.type){var t="[wprm-recipe-roundup-item";t+=' link="'.concat(se(e.link),'"'),t+=e.nofollow?' nofollow="1"':"",t+=e.newtab?"":' newtab="0"',t+=' name="'.concat(se(e.name),'"'),t+=' summary="'.concat(se(e.summary),'"'),t+=e.image.id?' image="'.concat(e.image.id,'"'):"",-1===e.image.id&&e.image.url&&(t+=e.image.url?' image_url="'.concat(e.image.url,'"'):""),t+="]",this.props.args.insertCallback(t)}else this.props.args.insertCallback('[wprm-recipe-roundup-item id="'.concat(e.recipe.id,'"]'))}},!0)}},(0,l.S)("Recipe Roundup Item")),i.createElement(d,{required:"elite",onClick:()=>{"function"==typeof this.props.args.insertCallback&&this.props.args.insertCallback("[wprm-recipe-submission]"),this.props.maybeCloseModal()}},(0,l.S)("Recipe Submission Form")),i.createElement(d,{required:"elite",onClick:()=>{"function"==typeof this.props.args.insertCallback&&this.props.args.insertCallback("[wprm-recipe-collections]"),this.props.maybeCloseModal()}},(0,l.S)("Recipe Collections")),i.createElement(d,{required:"elite",help:(0,l.S)("Find the saved collection ID on the WP Recipe Maker > Manage > Saved Collections page"),onClick:()=>{"function"==typeof this.props.args.insertCallback&&this.props.args.insertCallback('[wprm-saved-collection id=""]'),this.props.maybeCloseModal()}},(0,l.S)("Saved Recipe Collection")))))}}var ce=r(68470),ue=r(55565),de=r.n(ue),pe=r(34133),fe=e=>{var t=null;return e.id&&(t="wprm-admin-modal-fields-group-".concat(e.id)),i.createElement(ce.W_,{className:"wprm-admin-modal-fields-group",id:t,name:t},e.header?i.createElement("div",{className:"wprm-admin-modal-fields-group-header"},e.header):null,i.createElement("div",{className:"wprm-admin-modal-fields"},e.children))},me=e=>i.createElement(i.Fragment,null,i.createElement(C.Z,{label:(0,l.S)("Import from Text")},i.createElement(re,{placeholder:(0,l.S)("Paste or type recipe to start..."),value:"",onChange:t=>{t&&e.onModeChange("text-import",t)}})),i.createElement(C.Z,{label:(0,l.S)("Import from JSON")},i.createElement(re,{placeholder:(0,l.S)("Paste the recipe JSON data to import"),value:"",onChange:t=>{if(t)try{var r=JSON.parse(t);e.onImportJSON(r),alert((0,l.S)("The recipe has been imported."))}catch(n){alert((0,l.S)("No valid recipe found."))}}}))),he=r(5308),ge=e=>{var t=e.id>0,r=t=>{t.preventDefault(),he.Z.selectImage((t=>{if(e.hasOwnProperty("requirements")){var r=[];e.requirements.hasOwnProperty("width")&&t.width&&t.width<e.requirements.width&&r.push("".concat((0,l.S)("The image should have at least this width:")," ").concat(e.requirements.width,"px")),e.requirements.hasOwnProperty("height")&&t.height&&t.height<e.requirements.height&&r.push("".concat((0,l.S)("The image should have at least this height:")," ").concat(e.requirements.width,"px")),r.length&&alert("".concat((0,l.S)("Warning! We recommend making sure the image meets the following requirements:"),"\n\n").concat(r.join("\n")))}e.onChange(t.id,t.url)}))};return i.createElement("div",{className:"wprm-admin-modal-field-image"},t?i.createElement("div",{className:"wprm-admin-modal-field-image-preview"},i.createElement("img",{onClick:r,src:e.url}),i.createElement("a",{href:"#",tabIndex:e.disableTab?"-1":null,onClick:t=>{t.preventDefault(),e.onChange(0,"")}},(0,l.S)("Remove Image"))):i.createElement(d,{required:e.required,disableTab:e.disableTab,onClick:r},(0,l.S)("Select Image")))},ve=e=>{var t=e.id>0,r=!t&&(-1==e.id||e.embed),n=t||r,o=t=>{t.preventDefault(),he.Z.selectVideo((t=>{e.onChange(t.attributes.id,t.attributes.thumb.src)}))};return i.createElement("div",{className:"wprm-admin-modal-field-video"},n?i.createElement(i.Fragment,null,t?i.createElement("div",{className:"wprm-admin-modal-field-video-preview"},i.createElement("img",{onClick:o,src:e.thumb||wprm_admin_modal.images.video}),i.createElement("a",{href:"#",onClick:t=>{t.preventDefault(),e.onChange(0,"")}},(0,l.S)("Remove Video"))):i.createElement(i.Fragment,null,i.createElement(re,{value:e.embed,onChange:t=>{e.onChange(-1,"",t)},placeholder:(0,l.S)("Use URL to the video (e.g. https://www.youtube.com/watch?v=dQw4w9WgXcQ) or the full embed code.")}),i.createElement("a",{href:"#",onClick:t=>{t.preventDefault(),e.onChange(0,"","")}},(0,l.S)("Remove Video")))):i.createElement(i.Fragment,null,i.createElement("button",{className:"button",onClick:o},(0,l.S)("Upload Video")),i.createElement("button",{className:"button",onClick:t=>{t.preventDefault(),e.onChange(-1,"")}},(0,l.S)("Embed Video"))))},be=e=>i.createElement(i.Fragment,null,i.createElement(C.Z,{label:(0,l.S)("Image"),help:(0,l.S)("Used in the recipe metadata. Should be an image of the completed dish.")},i.createElement(ge,{requirements:{width:500,height:500},id:e.image.id,url:e.image.url,onChange:(t,r)=>{e.onRecipeChange({image_id:t,image_url:r})}})),"recipe_image"!==wprm_admin.settings.pinterest_use_for_image?i.createElement(C.Z,{label:(0,l.S)("Pin Image"),help:(0,l.S)('Optionally set a different image to use for the "Pin Recipe" button.')},i.createElement(ge,{required:"premium",id:e.pinImage.id,url:e.pinImage.url,onChange:(t,r)=>{e.onRecipeChange({pin_image_id:t,pin_image_url:r})}})):null,i.createElement(C.Z,{label:(0,l.S)("Video"),help:(0,l.S)("Used in the recipe metadata. Can be displayed elsewhere on the page using the [wprm-recipe-video] shortcode.")},i.createElement(ve,{id:e.video.id,thumb:e.video.thumb,embed:e.video.embed,onChange:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i={video_id:t,video_thumb_url:r};!1!==n&&(i.video_embed=n),e.onRecipeChange(i)}}))),ye=e=>i.createElement(i.Fragment,null,i.createElement(C.Z,{id:"slug",label:(0,l.S)("Slug")},i.createElement(h.Z,{name:"recipe-slug",placeholder:(0,l.S)("recipe-slug"),value:e.slug,onChange:t=>{e.onRecipeChange({slug:t})}})),i.createElement(C.Z,{id:"post_status",label:(0,l.S)("Status")},i.createElement(D.Z,{options:wprm_admin_modal.options.post_status,value:e.post_status,onChange:t=>{e.onRecipeChange({post_status:t})},width:300}))),we=r(38974),Ee=r.n(we);function Se(){return Ee().getParser(window.navigator.userAgent).satisfies({edge:"<80",ie:">0"})}var xe,Ie=e=>{var t=!!e.hasOwnProperty("disabled")&&e.disabled;return i.createElement("input",{type:"checkbox",className:"wprm-admin-modal-field-checkbox",disabled:t,name:e.name,checked:e.value,onChange:t=>{e.onChange(t.target.checked)}})};r(9968);
|
2 |
/*!
|
3 |
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
4 |
*
|
includes/admin/tools/class-wprm-tools-create-reviews.php
ADDED
@@ -0,0 +1,184 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Responsible for handling the import MV Create Reviews tool.
|
4 |
+
*
|
5 |
+
* @link https://bootstrapped.ventures
|
6 |
+
* @since 7.5.0
|
7 |
+
*
|
8 |
+
* @package WP_Recipe_Maker
|
9 |
+
* @subpackage WP_Recipe_Maker/includes/admin
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Responsible for handling the import MV Create Reviews tool.
|
14 |
+
*
|
15 |
+
* @since 7.5.0
|
16 |
+
* @package WP_Recipe_Maker
|
17 |
+
* @subpackage WP_Recipe_Maker/includes/admin
|
18 |
+
* @author Brecht Vandersmissen <brecht@bootstrapped.ventures>
|
19 |
+
*/
|
20 |
+
class WPRM_Tools_Create_Reviews {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Register actions and filters.
|
24 |
+
*
|
25 |
+
* @since 7.5.0
|
26 |
+
*/
|
27 |
+
public static function init() {
|
28 |
+
add_action( 'admin_menu', array( __CLASS__, 'add_submenu_page' ), 20 );
|
29 |
+
add_action( 'wp_ajax_wprm_create_reviews', array( __CLASS__, 'ajax_create_reviews' ) );
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Add the tools submenu to the WPRM menu.
|
34 |
+
*
|
35 |
+
* @since 7.5.0
|
36 |
+
*/
|
37 |
+
public static function add_submenu_page() {
|
38 |
+
add_submenu_page( null, __( 'Importing Reviews', 'wp-recipe-maker' ), __( 'Importing Reviews', 'wp-recipe-maker' ), WPRM_Settings::get( 'features_tools_access' ), 'wprm_create_reviews', array( __CLASS__, 'create_reviews' ) );
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Get the template for the import ingredient nutrition from WP Ultimate Recipe page.
|
43 |
+
*
|
44 |
+
* @since 7.5.0
|
45 |
+
*/
|
46 |
+
public static function create_reviews() {
|
47 |
+
$args = array(
|
48 |
+
'post_type' => WPRM_POST_TYPE,
|
49 |
+
'post_status' => 'all',
|
50 |
+
'posts_per_page' => -1,
|
51 |
+
'fields' => 'ids',
|
52 |
+
);
|
53 |
+
|
54 |
+
$posts = get_posts( $args );
|
55 |
+
|
56 |
+
// Only when debugging.
|
57 |
+
if ( WPRM_Tools_Manager::$debugging ) {
|
58 |
+
$result = self::import_reviews( $posts ); // Input var okay.
|
59 |
+
var_dump( $result );
|
60 |
+
die();
|
61 |
+
}
|
62 |
+
|
63 |
+
// Handle via AJAX.
|
64 |
+
wp_localize_script( 'wprm-admin', 'wprm_tools', array(
|
65 |
+
'action' => 'create_reviews',
|
66 |
+
'posts' => $posts,
|
67 |
+
'args' => array(),
|
68 |
+
));
|
69 |
+
|
70 |
+
require_once( WPRM_DIR . 'templates/admin/menu/tools/create-reviews.php' );
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Import WP Ultimate Recipe ingredient nutrition through AJAX.
|
75 |
+
*
|
76 |
+
* @since 2.1.0
|
77 |
+
*/
|
78 |
+
public static function ajax_create_reviews() {
|
79 |
+
if ( check_ajax_referer( 'wprm', 'security', false ) ) {
|
80 |
+
$posts = isset( $_POST['posts'] ) ? json_decode( wp_unslash( $_POST['posts'] ) ) : array(); // Input var okay.
|
81 |
+
|
82 |
+
$posts_left = array();
|
83 |
+
$posts_processed = array();
|
84 |
+
|
85 |
+
if ( count( $posts ) > 0 ) {
|
86 |
+
$posts_left = $posts;
|
87 |
+
$posts_processed = array_map( 'intval', array_splice( $posts_left, 0, 10 ) );
|
88 |
+
|
89 |
+
$result = self::import_reviews( $posts_processed );
|
90 |
+
|
91 |
+
if ( is_wp_error( $result ) ) {
|
92 |
+
wp_send_json_error( array(
|
93 |
+
'redirect' => add_query_arg( array( 'sub' => 'advanced' ), admin_url( 'admin.php?page=wprm_tools' ) ),
|
94 |
+
) );
|
95 |
+
}
|
96 |
+
}
|
97 |
+
|
98 |
+
wp_send_json_success( array(
|
99 |
+
'posts_processed' => $posts_processed,
|
100 |
+
'posts_left' => $posts_left,
|
101 |
+
) );
|
102 |
+
}
|
103 |
+
|
104 |
+
wp_die();
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Import MV Create Reviews.
|
109 |
+
*
|
110 |
+
* @since 7.5.0
|
111 |
+
* @param array $recipes Recipes to import the reviews for.
|
112 |
+
*/
|
113 |
+
public static function import_reviews( $recipes ) {
|
114 |
+
global $wpdb;
|
115 |
+
$mv_reviews_table = $wpdb->prefix . 'mv_reviews';
|
116 |
+
|
117 |
+
foreach ( $recipes as $recipe_id ) {
|
118 |
+
$recipe = WPRM_Recipe_Manager::get_recipe( $recipe_id );
|
119 |
+
|
120 |
+
if ( $recipe ) {
|
121 |
+
$import_source = get_post_meta( $recipe_id, 'wprm_import_source', true );
|
122 |
+
$import_backup = get_post_meta( $recipe_id, 'wprm_import_backup', true );
|
123 |
+
|
124 |
+
$parent_post_id = $recipe->parent_post_id();
|
125 |
+
|
126 |
+
if ( $parent_post_id && 'create' === $import_source && isset( $import_backup['mv_creation_id'] ) ) {
|
127 |
+
$mv_creation_id = intval( $import_backup['mv_creation_id'] );
|
128 |
+
|
129 |
+
// Get reviews for this MV ID.
|
130 |
+
$reviews = $wpdb->get_results( 'SELECT * FROM ' . $mv_reviews_table . ' WHERE review_content IS NOT NULL AND creation = ' . $mv_creation_id );
|
131 |
+
|
132 |
+
if ( $reviews ) {
|
133 |
+
foreach ( $reviews as $review ) {
|
134 |
+
// Delete any existing imported comments for this review ID.
|
135 |
+
$args = array(
|
136 |
+
'meta_key' => 'wprm_create_review_import',
|
137 |
+
'meta_value' => $review->id,
|
138 |
+
);
|
139 |
+
|
140 |
+
$comments_query = new WP_Comment_Query( $args );
|
141 |
+
$comments = $comments_query->comments;
|
142 |
+
|
143 |
+
foreach ( $comments as $comment ) {
|
144 |
+
WPRM_Rating_Database::delete_ratings_for_comment( $comment->comment_ID );
|
145 |
+
wp_delete_comment( $comment->comment_ID, true );
|
146 |
+
}
|
147 |
+
|
148 |
+
// Create comment associated with parent post.
|
149 |
+
$comment_id = wp_insert_comment( array(
|
150 |
+
'comment_author' => $review->author_name,
|
151 |
+
'comment_author_email' => $review->author_email,
|
152 |
+
'comment_content' => $review->review_content,
|
153 |
+
'comment_date' => $review->created,
|
154 |
+
'comment_date_gmt' => $review->created,
|
155 |
+
'comment_post_ID' => $parent_post_id,
|
156 |
+
'comment_meta' => array(
|
157 |
+
'wprm_create_review_import' => $review->id,
|
158 |
+
),
|
159 |
+
) );
|
160 |
+
|
161 |
+
if ( $comment_id ) {
|
162 |
+
// Changing to comment rating, so remove from user ratings.
|
163 |
+
$existing_user_ratings = WPRM_Rating_Database::get_ratings( array(
|
164 |
+
'where' => 'ip = "mv-create-' . intval( $review->id ) . '"',
|
165 |
+
) );
|
166 |
+
|
167 |
+
$existing_user_ratings_ids = wp_list_pluck( $existing_user_ratings['ratings'], 'id' );
|
168 |
+
|
169 |
+
if ( $existing_user_ratings_ids ) {
|
170 |
+
WPRM_Rating_Database::delete_ratings( $existing_user_ratings_ids );
|
171 |
+
}
|
172 |
+
|
173 |
+
// Create comment rating.
|
174 |
+
WPRM_Comment_Rating::add_or_update_rating_for( $comment_id, ceil( floatval( $review->rating ) ) );
|
175 |
+
}
|
176 |
+
}
|
177 |
+
}
|
178 |
+
}
|
179 |
+
}
|
180 |
+
}
|
181 |
+
}
|
182 |
+
}
|
183 |
+
|
184 |
+
WPRM_Tools_Create_Reviews::init();
|
includes/admin/tools/class-wprm-tools-find-ratings.php
CHANGED
@@ -121,21 +121,32 @@ class WPRM_Tools_Find_Ratings {
|
|
121 |
// Get comment ratings.
|
122 |
$comments = array();
|
123 |
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
if ( $recipe->parent_post_id() ) {
|
|
|
|
|
|
|
|
|
|
|
125 |
$args = array(
|
126 |
-
'
|
127 |
'status' => array( 'all', 'trash' ),
|
128 |
);
|
129 |
$comments = get_comments( $args );
|
130 |
-
|
131 |
// Check for Multi Rating ratings associated with parent post.
|
132 |
if ( class_exists( 'MRP_Multi_Rating_API' ) ) {
|
133 |
$mrp_ratings = MRP_Multi_Rating_API::get_rating_entries( array( 'post_id' => $recipe->parent_post_id() ) );
|
134 |
-
|
135 |
foreach ( $mrp_ratings as $mrp_rating ) {
|
136 |
if ( 'approved' === $mrp_rating['entry_status'] ) {
|
137 |
$rating_value = array_sum( $mrp_rating['rating_item_values'] );
|
138 |
-
|
139 |
if ( 0 < $rating_value && $rating_value <= 5 ) {
|
140 |
$rating = array(
|
141 |
'date' => $mrp_rating['entry_date'],
|
@@ -143,7 +154,7 @@ class WPRM_Tools_Find_Ratings {
|
|
143 |
'ip' => 'mrp_rating_' . $mrp_rating['rating_entry_id'],
|
144 |
'rating' => $rating_value,
|
145 |
);
|
146 |
-
|
147 |
// Check if comment rating or user rating.
|
148 |
$comment_id = isset( $mrp_rating['comment_id'] ) ? intval( $mrp_rating['comment_id'] ) : false;
|
149 |
if ( $comment_id ) {
|
@@ -151,7 +162,7 @@ class WPRM_Tools_Find_Ratings {
|
|
151 |
} else {
|
152 |
$rating['recipe_id'] = $recipe->id();
|
153 |
}
|
154 |
-
|
155 |
WPRM_Rating_Database::add_or_update_rating( $rating );
|
156 |
}
|
157 |
}
|
121 |
// Get comment ratings.
|
122 |
$comments = array();
|
123 |
|
124 |
+
$comment_post_ids = array();
|
125 |
+
|
126 |
+
if ( 'public' === WPRM_Settings::get( 'post_type_structure' ) && WPRM_Settings::get( 'post_type_comments' ) ) {
|
127 |
+
$comment_post_ids[] = $post_id;
|
128 |
+
}
|
129 |
+
|
130 |
if ( $recipe->parent_post_id() ) {
|
131 |
+
$comment_post_ids[] = $recipe->parent_post_id();
|
132 |
+
}
|
133 |
+
|
134 |
+
// Check for comment ratings in both recipe itself and parent post.
|
135 |
+
if ( $comment_post_ids ) {
|
136 |
$args = array(
|
137 |
+
'post__in' => $comment_post_ids,
|
138 |
'status' => array( 'all', 'trash' ),
|
139 |
);
|
140 |
$comments = get_comments( $args );
|
141 |
+
|
142 |
// Check for Multi Rating ratings associated with parent post.
|
143 |
if ( class_exists( 'MRP_Multi_Rating_API' ) ) {
|
144 |
$mrp_ratings = MRP_Multi_Rating_API::get_rating_entries( array( 'post_id' => $recipe->parent_post_id() ) );
|
145 |
+
|
146 |
foreach ( $mrp_ratings as $mrp_rating ) {
|
147 |
if ( 'approved' === $mrp_rating['entry_status'] ) {
|
148 |
$rating_value = array_sum( $mrp_rating['rating_item_values'] );
|
149 |
+
|
150 |
if ( 0 < $rating_value && $rating_value <= 5 ) {
|
151 |
$rating = array(
|
152 |
'date' => $mrp_rating['entry_date'],
|
154 |
'ip' => 'mrp_rating_' . $mrp_rating['rating_entry_id'],
|
155 |
'rating' => $rating_value,
|
156 |
);
|
157 |
+
|
158 |
// Check if comment rating or user rating.
|
159 |
$comment_id = isset( $mrp_rating['comment_id'] ) ? intval( $mrp_rating['comment_id'] ) : false;
|
160 |
if ( $comment_id ) {
|
162 |
} else {
|
163 |
$rating['recipe_id'] = $recipe->id();
|
164 |
}
|
165 |
+
|
166 |
WPRM_Rating_Database::add_or_update_rating( $rating );
|
167 |
}
|
168 |
}
|
includes/class-wp-recipe-maker.php
CHANGED
@@ -31,7 +31,7 @@ class WP_Recipe_Maker {
|
|
31 |
* @since 1.0.0
|
32 |
*/
|
33 |
private function define_constants() {
|
34 |
-
define( 'WPRM_VERSION', '7.
|
35 |
define( 'WPRM_PREMIUM_VERSION_REQUIRED', '7.0.0' );
|
36 |
define( 'WPRM_POST_TYPE', 'wprm_recipe' );
|
37 |
define( 'WPRM_DIR', plugin_dir_path( dirname( __FILE__ ) ) );
|
@@ -155,6 +155,7 @@ class WP_Recipe_Maker {
|
|
155 |
require_once( WPRM_DIR . 'includes/admin/menu/class-wprm-admin-menu.php' );
|
156 |
|
157 |
// Tools.
|
|
|
158 |
require_once( WPRM_DIR . 'includes/admin/tools/class-wprm-tools-find-parents.php' );
|
159 |
require_once( WPRM_DIR . 'includes/admin/tools/class-wprm-tools-find-ratings.php' );
|
160 |
require_once( WPRM_DIR . 'includes/admin/tools/class-wprm-tools-fix-comment-ratings.php' );
|
31 |
* @since 1.0.0
|
32 |
*/
|
33 |
private function define_constants() {
|
34 |
+
define( 'WPRM_VERSION', '7.5.0' );
|
35 |
define( 'WPRM_PREMIUM_VERSION_REQUIRED', '7.0.0' );
|
36 |
define( 'WPRM_POST_TYPE', 'wprm_recipe' );
|
37 |
define( 'WPRM_DIR', plugin_dir_path( dirname( __FILE__ ) ) );
|
155 |
require_once( WPRM_DIR . 'includes/admin/menu/class-wprm-admin-menu.php' );
|
156 |
|
157 |
// Tools.
|
158 |
+
require_once( WPRM_DIR . 'includes/admin/tools/class-wprm-tools-create-reviews.php' );
|
159 |
require_once( WPRM_DIR . 'includes/admin/tools/class-wprm-tools-find-parents.php' );
|
160 |
require_once( WPRM_DIR . 'includes/admin/tools/class-wprm-tools-find-ratings.php' );
|
161 |
require_once( WPRM_DIR . 'includes/admin/tools/class-wprm-tools-fix-comment-ratings.php' );
|
includes/public/class-wprm-comment-rating.php
CHANGED
@@ -69,13 +69,23 @@ class WPRM_Comment_Rating {
|
|
69 |
$query_where = '';
|
70 |
|
71 |
if ( WPRM_Migrations::is_migrated_to( 'ratings_db_post_id' ) ) {
|
72 |
-
|
|
|
|
|
|
|
|
|
|
|
73 |
|
|
|
74 |
if ( $parent_post_id ) {
|
|
|
|
|
|
|
|
|
75 |
$comment_ratings = WPRM_Rating_Database::get_ratings(array(
|
76 |
-
'where' => 'approved = 1 AND post_id
|
77 |
));
|
78 |
-
|
79 |
$ratings = $comment_ratings['ratings'];
|
80 |
}
|
81 |
} else {
|
69 |
$query_where = '';
|
70 |
|
71 |
if ( WPRM_Migrations::is_migrated_to( 'ratings_db_post_id' ) ) {
|
72 |
+
// Can be comment ratings both to recipe itself and its parent post.
|
73 |
+
$post_ids = array();
|
74 |
+
|
75 |
+
if ( 'public' === WPRM_Settings::get( 'post_type_structure' ) && WPRM_Settings::get( 'post_type_comments' ) ) {
|
76 |
+
$post_ids[] = $recipe_id;
|
77 |
+
}
|
78 |
|
79 |
+
$parent_post_id = $recipe->parent_post_id();
|
80 |
if ( $parent_post_id ) {
|
81 |
+
$post_ids[] = $parent_post_id;
|
82 |
+
}
|
83 |
+
|
84 |
+
if ( $post_ids ) {
|
85 |
$comment_ratings = WPRM_Rating_Database::get_ratings(array(
|
86 |
+
'where' => 'approved = 1 AND post_id IN (' . implode( ', ', array_map( 'intval', $post_ids ) ) . ')',
|
87 |
));
|
88 |
+
|
89 |
$ratings = $comment_ratings['ratings'];
|
90 |
}
|
91 |
} else {
|
includes/public/class-wprm-custom-hash.php
CHANGED
@@ -27,6 +27,15 @@ class WPRM_Custom_Hash {
|
|
27 |
*/
|
28 |
private static $custom_hash_recipe_id = false;
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
/**
|
31 |
* Register actions and filters.
|
32 |
*
|
@@ -34,7 +43,9 @@ class WPRM_Custom_Hash {
|
|
34 |
*/
|
35 |
public static function init() {
|
36 |
add_filter( 'wprm_recipe_snippet_shortcode_output', array( __CLASS__, 'snippet_shortcode' ), 10, 3 );
|
|
|
37 |
add_filter( 'wprm_recipe_shortcode_output', array( __CLASS__, 'recipe_shortcode' ), 99, 2 );
|
|
|
38 |
}
|
39 |
|
40 |
/**
|
@@ -65,6 +76,24 @@ class WPRM_Custom_Hash {
|
|
65 |
}
|
66 |
}
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
return $output;
|
69 |
}
|
70 |
|
@@ -95,6 +124,34 @@ class WPRM_Custom_Hash {
|
|
95 |
return $output;
|
96 |
}
|
97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
/**
|
99 |
* Get the custom hash.
|
100 |
*
|
@@ -103,6 +160,15 @@ class WPRM_Custom_Hash {
|
|
103 |
public static function get_hash() {
|
104 |
return trim( esc_attr( WPRM_Settings::get( 'jump_to_recipe_custom_hash' ) ) );
|
105 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
}
|
107 |
|
108 |
WPRM_Custom_Hash::init();
|
27 |
*/
|
28 |
private static $custom_hash_recipe_id = false;
|
29 |
|
30 |
+
/**
|
31 |
+
* ID of the recipe using the custom video hash.
|
32 |
+
*
|
33 |
+
* @since 7.5.0
|
34 |
+
* @access private
|
35 |
+
* @var mixed $custom_video_hash_recipe_id ID of the recipe using the custom video hash.
|
36 |
+
*/
|
37 |
+
private static $custom_video_hash_recipe_id = false;
|
38 |
+
|
39 |
/**
|
40 |
* Register actions and filters.
|
41 |
*
|
43 |
*/
|
44 |
public static function init() {
|
45 |
add_filter( 'wprm_recipe_snippet_shortcode_output', array( __CLASS__, 'snippet_shortcode' ), 10, 3 );
|
46 |
+
|
47 |
add_filter( 'wprm_recipe_shortcode_output', array( __CLASS__, 'recipe_shortcode' ), 99, 2 );
|
48 |
+
add_filter( 'wprm_recipe_video_shortcode', array( __CLASS__, 'video_shortcode' ), 10, 3 );
|
49 |
}
|
50 |
|
51 |
/**
|
76 |
}
|
77 |
}
|
78 |
|
79 |
+
if ( WPRM_Settings::get( 'jump_to_video_use_custom_hash' ) ) {
|
80 |
+
// Check if this snippet didn't have the ID hardcoded. This might be the custom hash recipe we need.
|
81 |
+
if ( ! isset( $atts['id'] ) || ! $atts['id'] ) {
|
82 |
+
if ( false === self::$custom_video_hash_recipe_id ) {
|
83 |
+
self::$custom_video_hash_recipe_id = $recipe_id;
|
84 |
+
}
|
85 |
+
}
|
86 |
+
|
87 |
+
// Snippet should jump to our custom hash.
|
88 |
+
if ( self::$custom_video_hash_recipe_id === $recipe_id ) {
|
89 |
+
$video_hash = self::get_video_hash();
|
90 |
+
|
91 |
+
if ( $video_hash ) {
|
92 |
+
$output = str_replace( '"#wprm-recipe-video-container-' . $recipe_id . '"', '"#' . $video_hash . '"', $output );
|
93 |
+
}
|
94 |
+
}
|
95 |
+
}
|
96 |
+
|
97 |
return $output;
|
98 |
}
|
99 |
|
124 |
return $output;
|
125 |
}
|
126 |
|
127 |
+
/**
|
128 |
+
* Alter the output of the recipe video shortcode.
|
129 |
+
*
|
130 |
+
* @since 7.3.0
|
131 |
+
* @param mixed $output Current output.
|
132 |
+
* @param mixed $atts Shortcode attributes.
|
133 |
+
* @param mixed $recipe Recipe being output.
|
134 |
+
*/
|
135 |
+
public static function video_shortcode( $output, $atts, $recipe ) {
|
136 |
+
if ( WPRM_Settings::get( 'jump_to_video_use_custom_hash' ) ) {
|
137 |
+
if ( $recipe ) {
|
138 |
+
if ( false === self::$custom_video_hash_recipe_id ) {
|
139 |
+
self::$custom_video_hash_recipe_id = $recipe->id();
|
140 |
+
}
|
141 |
+
|
142 |
+
if ( self::$custom_video_hash_recipe_id === $recipe->id() ) {
|
143 |
+
$video_hash = self::get_video_hash();
|
144 |
+
|
145 |
+
if ( $video_hash ) {
|
146 |
+
$output = '<div id="' . $video_hash . '"></div>' . $output;
|
147 |
+
}
|
148 |
+
}
|
149 |
+
}
|
150 |
+
}
|
151 |
+
|
152 |
+
return $output;
|
153 |
+
}
|
154 |
+
|
155 |
/**
|
156 |
* Get the custom hash.
|
157 |
*
|
160 |
public static function get_hash() {
|
161 |
return trim( esc_attr( WPRM_Settings::get( 'jump_to_recipe_custom_hash' ) ) );
|
162 |
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Get the custom video hash.
|
166 |
+
*
|
167 |
+
* @since 7.3.0
|
168 |
+
*/
|
169 |
+
public static function get_video_hash() {
|
170 |
+
return trim( esc_attr( WPRM_Settings::get( 'jump_to_video_custom_hash' ) ) );
|
171 |
+
}
|
172 |
}
|
173 |
|
174 |
WPRM_Custom_Hash::init();
|
includes/public/class-wprm-post-type.php
CHANGED
@@ -26,6 +26,8 @@ class WPRM_Post_Type {
|
|
26 |
*/
|
27 |
public static function init() {
|
28 |
add_action( 'init', array( __CLASS__, 'register_post_type' ), 1 );
|
|
|
|
|
29 |
add_filter( 'post_type_link', array( __CLASS__, 'recipe_permalink' ), 10, 2 );
|
30 |
}
|
31 |
|
@@ -65,6 +67,10 @@ class WPRM_Post_Type {
|
|
65 |
$args['rewrite'] = array(
|
66 |
'slug' => $slug ? $slug : 'recipe',
|
67 |
);
|
|
|
|
|
|
|
|
|
68 |
}
|
69 |
|
70 |
// WP Ultimate Post Grid text search compatibility.
|
@@ -76,11 +82,30 @@ class WPRM_Post_Type {
|
|
76 |
}
|
77 |
|
78 |
/**
|
79 |
-
*
|
80 |
*
|
81 |
-
* @since
|
82 |
-
* @param
|
83 |
-
* @param
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
*/
|
85 |
public static function recipe_permalink( $url, $post ) {
|
86 |
if ( WPRM_POST_TYPE === $post->post_type ) {
|
26 |
*/
|
27 |
public static function init() {
|
28 |
add_action( 'init', array( __CLASS__, 'register_post_type' ), 1 );
|
29 |
+
|
30 |
+
add_filter( 'comments_open', array( __CLASS__, 'comments_open' ), 10, 2 );
|
31 |
add_filter( 'post_type_link', array( __CLASS__, 'recipe_permalink' ), 10, 2 );
|
32 |
}
|
33 |
|
67 |
$args['rewrite'] = array(
|
68 |
'slug' => $slug ? $slug : 'recipe',
|
69 |
);
|
70 |
+
|
71 |
+
if ( WPRM_Settings::get( 'post_type_comments' ) ) {
|
72 |
+
$args['supports'][] = 'comments';
|
73 |
+
}
|
74 |
}
|
75 |
|
76 |
// WP Ultimate Post Grid text search compatibility.
|
82 |
}
|
83 |
|
84 |
/**
|
85 |
+
* Set comments open for recipes when enabled.
|
86 |
*
|
87 |
+
* @since 7.5.0
|
88 |
+
* @param boolean $open Wether or not the comments are open.
|
89 |
+
* @param int $post_id The post ID.
|
90 |
+
*/
|
91 |
+
public static function comments_open( $open, $post_id ) {
|
92 |
+
if ( 'public' === WPRM_Settings::get( 'post_type_structure' ) && WPRM_Settings::get( 'post_type_comments' ) ) {
|
93 |
+
$post = get_post( $post_id );
|
94 |
+
|
95 |
+
if ( WPRM_POST_TYPE === $post->post_type ) {
|
96 |
+
return true;
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
return $open;
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Alter the recipe permalink.
|
105 |
+
*
|
106 |
+
* @since 1.0.0
|
107 |
+
* @param mixed $url The post URL.
|
108 |
+
* @param object $post The post object.
|
109 |
*/
|
110 |
public static function recipe_permalink( $url, $post ) {
|
111 |
if ( WPRM_POST_TYPE === $post->post_type ) {
|
includes/public/class-wprm-rating-database.php
CHANGED
@@ -311,7 +311,7 @@ class WPRM_Rating_Database {
|
|
311 |
global $wpdb;
|
312 |
$table_name = self::get_table_name();
|
313 |
|
314 |
-
if ( is_array( $ids ) ) {
|
315 |
// Delete all these rating IDs.
|
316 |
$ids = implode( ',', array_map( 'intval', $ids ) );
|
317 |
$wpdb->query( 'DELETE FROM ' . $table_name . ' WHERE ID IN (' . $ids . ')' );
|
311 |
global $wpdb;
|
312 |
$table_name = self::get_table_name();
|
313 |
|
314 |
+
if ( is_array( $ids ) && $ids ) {
|
315 |
// Delete all these rating IDs.
|
316 |
$ids = implode( ',', array_map( 'intval', $ids ) );
|
317 |
$wpdb->query( 'DELETE FROM ' . $table_name . ' WHERE ID IN (' . $ids . ')' );
|
includes/public/class-wprm-rating.php
CHANGED
@@ -112,10 +112,20 @@ class WPRM_Rating {
|
|
112 |
// Get comment ratings.
|
113 |
if ( WPRM_Settings::get( 'features_comment_ratings' ) ) {
|
114 |
if ( WPRM_Migrations::is_migrated_to( 'ratings_db_post_id' ) ) {
|
115 |
-
|
|
|
|
|
|
|
|
|
|
|
116 |
|
|
|
117 |
if ( $parent_post_id ) {
|
118 |
-
$
|
|
|
|
|
|
|
|
|
119 |
$query_where .= $query_where ? ' OR ' . $where_comments : $where_comments;
|
120 |
}
|
121 |
} else {
|
112 |
// Get comment ratings.
|
113 |
if ( WPRM_Settings::get( 'features_comment_ratings' ) ) {
|
114 |
if ( WPRM_Migrations::is_migrated_to( 'ratings_db_post_id' ) ) {
|
115 |
+
// Can be comment ratings both to recipe itself and its parent post.
|
116 |
+
$post_ids = array();
|
117 |
+
|
118 |
+
if ( 'public' === WPRM_Settings::get( 'post_type_structure' ) && WPRM_Settings::get( 'post_type_comments' ) ) {
|
119 |
+
$post_ids[] = $recipe_id;
|
120 |
+
}
|
121 |
|
122 |
+
$parent_post_id = $recipe->parent_post_id();
|
123 |
if ( $parent_post_id ) {
|
124 |
+
$post_ids[] = $parent_post_id;
|
125 |
+
}
|
126 |
+
|
127 |
+
if ( $post_ids ) {
|
128 |
+
$where_comments = 'approved = 1 AND post_id IN (' . implode( ', ', array_map( 'intval', $post_ids ) ) . ')';
|
129 |
$query_where .= $query_where ? ' OR ' . $where_comments : $where_comments;
|
130 |
}
|
131 |
} else {
|
includes/public/class-wprm-recipe-parser.php
CHANGED
@@ -386,6 +386,13 @@ class WPRM_Recipe_Parser {
|
|
386 |
if ( 0 < intval( $test_formatted ) && intval( $test_formatted ) == floatval( $test_formatted ) ) {
|
387 |
$formatted = number_format( $raw, 0 );
|
388 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
389 |
}
|
390 |
}
|
391 |
|
386 |
if ( 0 < intval( $test_formatted ) && intval( $test_formatted ) == floatval( $test_formatted ) ) {
|
387 |
$formatted = number_format( $raw, 0 );
|
388 |
}
|
389 |
+
|
390 |
+
// Optionally use comma as decimal separator (point is default).
|
391 |
+
if ( 'comma' === WPRM_Settings::get( 'decimal_separator' ) ) {
|
392 |
+
$formatted = str_replace( '.', '|', $formatted );
|
393 |
+
$formatted = str_replace( ',', '.', $formatted );
|
394 |
+
$formatted = str_replace( '|', ',', $formatted );
|
395 |
+
}
|
396 |
}
|
397 |
}
|
398 |
|
includes/public/class-wprm-recipe-sanitizer.php
CHANGED
@@ -239,7 +239,20 @@ class WPRM_Recipe_Sanitizer {
|
|
239 |
$sanitized_recipe['nutrition'][ $nutrition_field ] = '' !== $nutritition_value ? floatval( str_replace( ',', '.', $nutritition_value ) ) : false;
|
240 |
}
|
241 |
|
242 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
}
|
244 |
|
245 |
// Only for "public" recipe type.
|
239 |
$sanitized_recipe['nutrition'][ $nutrition_field ] = '' !== $nutritition_value ? floatval( str_replace( ',', '.', $nutritition_value ) ) : false;
|
240 |
}
|
241 |
|
242 |
+
$serving_unit = isset( $recipe['nutrition']['serving_unit'] ) && '' !== trim( $recipe['nutrition']['serving_unit'] ) ? $recipe['nutrition']['serving_unit'] : false;
|
243 |
+
|
244 |
+
if ( $serving_unit ) {
|
245 |
+
$sanitized_serving_unit = sanitize_text_field( $recipe['nutrition']['serving_unit'] );
|
246 |
+
|
247 |
+
// Allow 1 space in front to have a space before the unit.
|
248 |
+
if ( ' ' === substr( $serving_unit, 0, 1 ) ) {
|
249 |
+
$sanitized_serving_unit = ' ' . $sanitized_serving_unit;
|
250 |
+
}
|
251 |
+
|
252 |
+
$serving_unit = $sanitized_serving_unit;
|
253 |
+
}
|
254 |
+
|
255 |
+
$sanitized_recipe['nutrition']['serving_unit'] = $serving_unit;
|
256 |
}
|
257 |
|
258 |
// Only for "public" recipe type.
|
includes/public/class-wprm-recipe.php
CHANGED
@@ -1173,6 +1173,16 @@ class WPRM_Recipe {
|
|
1173 |
}
|
1174 |
}
|
1175 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1176 |
return $ingredients_flat;
|
1177 |
}
|
1178 |
|
@@ -1256,6 +1266,16 @@ class WPRM_Recipe {
|
|
1256 |
}
|
1257 |
}
|
1258 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1259 |
return $instructions_flat;
|
1260 |
}
|
1261 |
|
1173 |
}
|
1174 |
}
|
1175 |
|
1176 |
+
// Prevent uid problem.
|
1177 |
+
$max_uid = -1;
|
1178 |
+
|
1179 |
+
foreach ( $ingredients_flat as $index => $ingredient ) {
|
1180 |
+
if ( $ingredient['uid'] <= $max_uid ) {
|
1181 |
+
$ingredients_flat[ $index ]['uid'] = $max_uid + 1;
|
1182 |
+
}
|
1183 |
+
$max_uid = $ingredients_flat[ $index ]['uid'];
|
1184 |
+
}
|
1185 |
+
|
1186 |
return $ingredients_flat;
|
1187 |
}
|
1188 |
|
1266 |
}
|
1267 |
}
|
1268 |
|
1269 |
+
// Prevent uid problem.
|
1270 |
+
$max_uid = -1;
|
1271 |
+
|
1272 |
+
foreach ( $instructions_flat as $index => $instruction ) {
|
1273 |
+
if ( $instruction['uid'] <= $max_uid ) {
|
1274 |
+
$instructions_flat[ $index ]['uid'] = $max_uid + 1;
|
1275 |
+
}
|
1276 |
+
$max_uid = $instructions_flat[ $index ]['uid'];
|
1277 |
+
}
|
1278 |
+
|
1279 |
return $instructions_flat;
|
1280 |
}
|
1281 |
|
includes/public/shortcodes/general/class-wprm-sc-jump-to-comments.php
CHANGED
@@ -42,6 +42,7 @@ class WPRM_SC_Jump_To_Comments extends WPRM_Template_Shortcode {
|
|
42 |
),
|
43 |
'text' => array(
|
44 |
'default' => __( 'Rate this Recipe', 'wp-recipe-maker' ),
|
|
|
45 |
'type' => 'text',
|
46 |
),
|
47 |
'text_style' => array(
|
@@ -177,7 +178,14 @@ class WPRM_SC_Jump_To_Comments extends WPRM_Template_Shortcode {
|
|
177 |
$style .= 'padding: ' . $atts['vertical_padding'] . ' ' . $atts['horizontal_padding'] . ';';
|
178 |
}
|
179 |
|
180 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
return apply_filters( parent::get_hook(), $output, $atts );
|
182 |
}
|
183 |
}
|
42 |
),
|
43 |
'text' => array(
|
44 |
'default' => __( 'Rate this Recipe', 'wp-recipe-maker' ),
|
45 |
+
'help' => __( 'Use the %comments% placeholder to show the number of comments.', 'wp-recipe-maker' ),
|
46 |
'type' => 'text',
|
47 |
),
|
48 |
'text_style' => array(
|
178 |
$style .= 'padding: ' . $atts['vertical_padding'] . ' ' . $atts['horizontal_padding'] . ';';
|
179 |
}
|
180 |
|
181 |
+
// Optionally display number of comments.
|
182 |
+
$text = __( $atts['text'], 'wp-recipe-maker' );
|
183 |
+
if ( false !== strpos( $text, '%comments%' ) ) {
|
184 |
+
$nbr_comments = $atts['is_template_editor_preview'] ? 2 : get_comments_number();
|
185 |
+
$text = str_ireplace( '%comments%', $nbr_comments, $text );
|
186 |
+
}
|
187 |
+
|
188 |
+
$output = '<a href="' . esc_url( $atts['link'] ) . '" style="' . $style . '" class="' . implode( ' ', $classes ) . '">' . $icon . $text . '</a>';
|
189 |
return apply_filters( parent::get_hook(), $output, $atts );
|
190 |
}
|
191 |
}
|
includes/public/shortcodes/recipe/class-wprm-sc-counter.php
CHANGED
@@ -50,6 +50,10 @@ class WPRM_SC_Counter extends WPRM_Template_Shortcode {
|
|
50 |
'h6' => 'h6',
|
51 |
),
|
52 |
),
|
|
|
|
|
|
|
|
|
53 |
);
|
54 |
parent::init();
|
55 |
}
|
@@ -82,6 +86,13 @@ class WPRM_SC_Counter extends WPRM_Template_Shortcode {
|
|
82 |
$text = str_ireplace( '%count%', $count, $text );
|
83 |
$text = WPRM_Template_Helper::recipe_placeholders( $recipe, $text );
|
84 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
$tag = trim( $atts['tag'] );
|
86 |
$output = '<' . $tag . ' class="' . implode( ' ', $classes ) . '">' . $text . '</' . $tag . '>';
|
87 |
return apply_filters( parent::get_hook(), $output, $atts, $recipe );
|
50 |
'h6' => 'h6',
|
51 |
),
|
52 |
),
|
53 |
+
'link' => array(
|
54 |
+
'default' => '0',
|
55 |
+
'type' => 'toggle',
|
56 |
+
),
|
57 |
);
|
58 |
parent::init();
|
59 |
}
|
86 |
$text = str_ireplace( '%count%', $count, $text );
|
87 |
$text = WPRM_Template_Helper::recipe_placeholders( $recipe, $text );
|
88 |
|
89 |
+
if ( $atts['link'] && $recipe->permalink() ) {
|
90 |
+
$target = $recipe->parent_url_new_tab() ? ' target="_blank"' : '';
|
91 |
+
$nofollow = $recipe->parent_url_nofollow() ? ' rel="nofollow"' : '';
|
92 |
+
|
93 |
+
$text = '<a href="' . esc_url( $recipe->permalink() ) . '"' . $target . $nofollow . '>' . $text . '</a>';
|
94 |
+
}
|
95 |
+
|
96 |
$tag = trim( $atts['tag'] );
|
97 |
$output = '<' . $tag . ' class="' . implode( ' ', $classes ) . '">' . $text . '</' . $tag . '>';
|
98 |
return apply_filters( parent::get_hook(), $output, $atts, $recipe );
|
includes/public/shortcodes/recipe/class-wprm-sc-instructions.php
CHANGED
@@ -431,7 +431,7 @@ class WPRM_SC_Instructions extends WPRM_Template_Shortcode {
|
|
431 |
}
|
432 |
|
433 |
$output .= '<' . $tag . ' class="'. implode( ' ', $classes ) . '"' . $style . '>';
|
434 |
-
$output .=
|
435 |
$output .= '</' . $tag . '>';
|
436 |
}
|
437 |
|
431 |
}
|
432 |
|
433 |
$output .= '<' . $tag . ' class="'. implode( ' ', $classes ) . '"' . $style . '>';
|
434 |
+
$output .= wp_strip_all_tags( $text );
|
435 |
$output .= '</' . $tag . '>';
|
436 |
}
|
437 |
|
includes/public/shortcodes/recipe/class-wprm-sc-rating.php
CHANGED
@@ -20,6 +20,8 @@
|
|
20 |
class WPRM_SC_Rating extends WPRM_Template_Shortcode {
|
21 |
public static $shortcode = 'wprm-recipe-rating';
|
22 |
|
|
|
|
|
23 |
public static function init() {
|
24 |
self::$attributes = array(
|
25 |
'id' => array(
|
@@ -180,7 +182,11 @@ class WPRM_SC_Rating extends WPRM_Template_Shortcode {
|
|
180 |
*/
|
181 |
private static function get_stars( $rating, $atts, $recipe ) {
|
182 |
$output = '';
|
183 |
-
$rating_value =
|
|
|
|
|
|
|
|
|
184 |
|
185 |
// Backwards compatibility.
|
186 |
$voteable = (bool) $atts['voteable'];
|
@@ -191,9 +197,22 @@ class WPRM_SC_Rating extends WPRM_Template_Shortcode {
|
|
191 |
if ( $rating_value ) {
|
192 |
// Output style for star color.
|
193 |
$output .= '<style>';
|
194 |
-
$output .= '.
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
$output .= '</style>';
|
196 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
// Get classes.
|
198 |
$classes = array(
|
199 |
'wprm-recipe-rating',
|
@@ -204,9 +223,26 @@ class WPRM_SC_Rating extends WPRM_Template_Shortcode {
|
|
204 |
}
|
205 |
|
206 |
// Output stars.
|
207 |
-
$output .= '<div class="' . implode( ' ', $classes ) . '">';
|
208 |
for ( $i = 1; $i <= 5; $i++ ) {
|
209 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
$output .= '<span class="wprm-rating-star wprm-rating-star-' . $i . ' ' . $class . '" data-rating="' . $i . '" data-color="' . $color . '">';
|
211 |
$output .= apply_filters( 'wprm_recipe_rating_star_icon', WPRM_Icon::get( $icon, $color) );
|
212 |
$output .= '</span>';
|
20 |
class WPRM_SC_Rating extends WPRM_Template_Shortcode {
|
21 |
public static $shortcode = 'wprm-recipe-rating';
|
22 |
|
23 |
+
private static $uid = 0;
|
24 |
+
|
25 |
public static function init() {
|
26 |
self::$attributes = array(
|
27 |
'id' => array(
|
182 |
*/
|
183 |
private static function get_stars( $rating, $atts, $recipe ) {
|
184 |
$output = '';
|
185 |
+
$rating_value = $rating['average'];
|
186 |
+
|
187 |
+
// UID for these stars.
|
188 |
+
$id = 'wprm-recipe-rating-' . self::$uid;
|
189 |
+
self::$uid++;
|
190 |
|
191 |
// Backwards compatibility.
|
192 |
$voteable = (bool) $atts['voteable'];
|
197 |
if ( $rating_value ) {
|
198 |
// Output style for star color.
|
199 |
$output .= '<style>';
|
200 |
+
$output .= '#' . $id . ' .wprm-rating-star.wprm-rating-star-full svg * { fill: ' . $color . '; }';
|
201 |
+
$output .= '#' . $id . ' .wprm-rating-star.wprm-rating-star-33 svg * { fill: url(#' . $id . '-33); }';
|
202 |
+
$output .= '#' . $id . ' .wprm-rating-star.wprm-rating-star-50 svg * { fill: url(#' . $id . '-50); }';
|
203 |
+
$output .= '#' . $id . ' .wprm-rating-star.wprm-rating-star-66 svg * { fill: url(#' . $id . '-66); }';
|
204 |
+
$output .= 'linearGradient#' . $id . '-33 stop { stop-color: ' . $color . '; }';
|
205 |
+
$output .= 'linearGradient#' . $id . '-50 stop { stop-color: ' . $color . '; }';
|
206 |
+
$output .= 'linearGradient#' . $id . '-66 stop { stop-color: ' . $color . '; }';
|
207 |
$output .= '</style>';
|
208 |
|
209 |
+
// Definitions for quarter and half stars.
|
210 |
+
$output .= '<svg xmlns="http://www.w3.org/2000/svg" width="0" height="0" style="display:inline;width:0px;height:0px">';
|
211 |
+
$output .= '<defs><linearGradient id="' . $id .'-33"><stop offset="0%" stop-opacity="1" /><stop offset="33%" stop-opacity="1" /><stop offset="33%" stop-opacity="0" /><stop offset="100%" stop-opacity="0" /></linearGradient></defs>';
|
212 |
+
$output .= '<defs><linearGradient id="' . $id .'-50"><stop offset="0%" stop-opacity="1" /><stop offset="50%" stop-opacity="1" /><stop offset="50%" stop-opacity="0" /><stop offset="100%" stop-opacity="0" /></linearGradient></defs>';
|
213 |
+
$output .= '<defs><linearGradient id="' . $id .'-66"><stop offset="0%" stop-opacity="1" /><stop offset="66%" stop-opacity="1" /><stop offset="66%" stop-opacity="0" /><stop offset="100%" stop-opacity="0" /></linearGradient></defs>';
|
214 |
+
$output .= '</svg>';
|
215 |
+
|
216 |
// Get classes.
|
217 |
$classes = array(
|
218 |
'wprm-recipe-rating',
|
223 |
}
|
224 |
|
225 |
// Output stars.
|
226 |
+
$output .= '<div id="' . $id . '" class="' . implode( ' ', $classes ) . '">';
|
227 |
for ( $i = 1; $i <= 5; $i++ ) {
|
228 |
+
// Get star class.
|
229 |
+
if ( $i <= $rating_value ) {
|
230 |
+
$class = 'wprm-rating-star-full';
|
231 |
+
} else {
|
232 |
+
$difference = $rating_value - $i + 1;
|
233 |
+
if ( 0 < $difference && $difference <= 0.33 ) {
|
234 |
+
$class = 'wprm-rating-star-33';
|
235 |
+
} elseif ( 0 < $difference && $difference <= 0.5 ) {
|
236 |
+
$class = 'wprm-rating-star-50';
|
237 |
+
} elseif( 0 < $difference && $difference <= 0.66 ) {
|
238 |
+
$class = 'wprm-rating-star-66';
|
239 |
+
} elseif( 0 < $difference && $difference <= 1 ) {
|
240 |
+
$class = 'wprm-rating-star-full';
|
241 |
+
} else {
|
242 |
+
$class = 'wprm-rating-star-empty';
|
243 |
+
}
|
244 |
+
}
|
245 |
+
|
246 |
$output .= '<span class="wprm-rating-star wprm-rating-star-' . $i . ' ' . $class . '" data-rating="' . $i . '" data-color="' . $color . '">';
|
247 |
$output .= apply_filters( 'wprm_recipe_rating_star_icon', WPRM_Icon::get( $icon, $color) );
|
248 |
$output .= '</span>';
|
languages/wp-recipe-maker-fr_FR.mo
CHANGED
Binary file
|
languages/wp-recipe-maker-fr_FR.po
CHANGED
@@ -6,15 +6,16 @@ msgstr ""
|
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
9 |
-
"PO-Revision-Date:
|
10 |
-
"Last-Translator:
|
11 |
-
"Language-Team:
|
12 |
"Language: fr-FR\n"
|
13 |
-
"Plural-Forms: nplurals=2; plural=n > 1
|
14 |
-
"X-Generator: Loco
|
|
|
15 |
|
16 |
-
#: includes/admin/class-wprm-import-manager.php:50
|
17 |
-
#: includes/admin/class-wprm-import-manager.php:51
|
18 |
#: templates/admin/menu/import-overview.php:15
|
19 |
msgid "Import Recipes"
|
20 |
msgstr "Importer des recettes"
|
@@ -43,7 +44,7 @@ msgstr "gramme"
|
|
43 |
msgid "gr"
|
44 |
msgstr "gr"
|
45 |
|
46 |
-
#: includes/admin/class-wprm-recipe-parser.php:154
|
47 |
#: includes/public/class-wprm-metadata.php:164
|
48 |
msgid "g"
|
49 |
msgstr "g"
|
@@ -56,7 +57,7 @@ msgstr "milligrammes"
|
|
56 |
msgid "milligram"
|
57 |
msgstr "milligramme"
|
58 |
|
59 |
-
#: includes/admin/class-wprm-recipe-parser.php:157
|
60 |
#: includes/public/class-wprm-metadata.php:169
|
61 |
msgid "mg"
|
62 |
msgstr "mg"
|
@@ -221,7 +222,7 @@ msgstr "cuillère à soupe"
|
|
221 |
msgid "tbsps"
|
222 |
msgstr "c. à soupe"
|
223 |
|
224 |
-
#: includes/admin/class-wprm-recipe-parser.php:199
|
225 |
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:34
|
226 |
msgid "tbsp"
|
227 |
msgstr "c. à soupe"
|
@@ -382,26 +383,26 @@ msgstr "pincée"
|
|
382 |
msgid "Unknown"
|
383 |
msgstr "Inconnu"
|
384 |
|
385 |
-
#: includes/admin/import/class-wprm-import-wpultimaterecipe.php:349
|
386 |
#: includes/public/class-wprm-template-helper.php:66
|
387 |
msgid "hour"
|
388 |
msgstr "heure"
|
389 |
|
390 |
-
#: includes/admin/import/class-wprm-import-wpultimaterecipe.php:350
|
391 |
#: includes/public/class-wprm-template-helper.php:66
|
392 |
msgid "hours"
|
393 |
msgstr "heures"
|
394 |
|
395 |
-
#: includes/admin/menu/class-wprm-admin-menu-addons.php:47
|
396 |
#: templates/admin/menu/addons.php:15
|
397 |
msgid "Add-Ons"
|
398 |
-
msgstr "
|
399 |
|
400 |
#: includes/admin/menu/class-wprm-admin-menu-faq.php:76
|
401 |
msgid "FAQ & Support"
|
402 |
-
msgstr "Foire
|
403 |
|
404 |
-
#: includes/admin/modal/class-wprm-modal.php:60
|
405 |
#: templates/admin/modal/modal.php:96
|
406 |
msgid "Insert"
|
407 |
msgstr "Insérer"
|
@@ -420,14 +421,14 @@ msgstr "Utiliser la photo"
|
|
420 |
|
421 |
#: includes/admin/modal/class-wprm-modal.php:64
|
422 |
msgid "Are you sure you want to remove this recipe?"
|
423 |
-
msgstr "Etes-vous sûrs de vouloir
|
424 |
|
425 |
#: includes/admin/modal/class-wprm-modal.php:65
|
426 |
msgid "Are you sure you want to start over with importing from text?"
|
427 |
-
msgstr "Etes-vous sûrs de vouloir recommencer l'import texte?"
|
428 |
|
429 |
-
#: includes/admin/modal/class-wprm-modal.php:117
|
430 |
-
#: templates/admin/modal/tabs/recipe-snippets-jump.php:33
|
431 |
#: templates/admin/modal/tabs/recipe-snippets-print.php:33
|
432 |
msgid "Recipe"
|
433 |
msgstr "Recette"
|
@@ -444,44 +445,44 @@ msgstr "Détails de la recette"
|
|
444 |
msgid "Ingredients & Instructions"
|
445 |
msgstr "Ingrédients et Instructions"
|
446 |
|
447 |
-
#: includes/admin/modal/class-wprm-modal.php:141
|
448 |
-
#: templates/recipe/clean-print/clean-print.php:141
|
449 |
-
#: templates/recipe/clean-print-with-image/clean-print-with-image.php:142
|
450 |
-
#: templates/recipe/simple/simple.php:161
|
451 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:165
|
452 |
msgid "Recipe Notes"
|
453 |
msgstr "Notes"
|
454 |
|
455 |
#: includes/admin/modal/class-wprm-modal.php:150
|
456 |
msgid "Recipe Snippets"
|
457 |
-
msgstr "
|
458 |
|
459 |
-
#: includes/admin/modal/class-wprm-modal.php:154
|
460 |
-
#: includes/public/class-wprm-shortcode.php:154
|
461 |
#: templates/admin/modal/tabs/recipe-snippets-jump.php:45
|
462 |
msgid "Jump to Recipe"
|
463 |
msgstr "Aller à la recette"
|
464 |
|
465 |
-
#: includes/admin/modal/class-wprm-modal.php:161
|
466 |
-
#: includes/public/class-wprm-shortcode.php:186
|
467 |
#: templates/admin/modal/tabs/recipe-snippets-print.php:45
|
468 |
msgid "Print Recipe"
|
469 |
msgstr "Imprimer la recette"
|
470 |
|
471 |
#: includes/admin/modal/class-wprm-shortcode-preview.php:46
|
472 |
msgid "remove"
|
473 |
-
msgstr "
|
474 |
|
475 |
-
#: includes/public/class-wprm-comment-rating.php:114
|
476 |
#: templates/public/comment-rating-form.php:14
|
477 |
msgid "Recipe Rating"
|
478 |
msgstr "Evaluation de la recette"
|
479 |
|
480 |
-
#: includes/public/class-wprm-metadata.php:167
|
481 |
-
#: templates/admin/modal/tabs/recipe-details.php:59
|
482 |
-
#: templates/recipe/clean-print/clean-print.php:76
|
483 |
-
#: templates/recipe/clean-print-with-image/clean-print-with-image.php:77
|
484 |
-
#: templates/recipe/simple/simple.php:93
|
485 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:97
|
486 |
msgid "kcal"
|
487 |
msgstr "kcal"
|
@@ -622,9 +623,9 @@ msgstr "min"
|
|
622 |
msgid "min"
|
623 |
msgstr "min"
|
624 |
|
625 |
-
#: includes/public/class-wprm-template-helper.php:83
|
626 |
-
#: templates/admin/modal/tabs/recipe-details.php:64
|
627 |
-
#: templates/admin/modal/tabs/recipe-details.php:67
|
628 |
#: templates/admin/modal/tabs/recipe-details.php:70
|
629 |
msgid "minutes"
|
630 |
msgstr "minutes"
|
@@ -636,12 +637,12 @@ msgstr "de"
|
|
636 |
#: includes/public/class-wprm-template-helper.php:120
|
637 |
msgid "vote"
|
638 |
msgid_plural "votes"
|
639 |
-
msgstr[0] "
|
640 |
-
msgstr[1] "
|
641 |
|
642 |
#: templates/admin/menu/import-overview.php:16
|
643 |
msgid "Considerations Before Importing"
|
644 |
-
msgstr "Mises en garde avant
|
645 |
|
646 |
#: templates/admin/menu/import-overview.php:18
|
647 |
msgid ""
|
@@ -661,9 +662,10 @@ msgid ""
|
|
661 |
"than regular posts you might want to use a redirection plugin to set up 301 "
|
662 |
"redirects. Contact us if you need help!"
|
663 |
msgstr ""
|
664 |
-
"Si
|
665 |
-
"
|
666 |
-
"redirections 301 via un plugin. Contactez-nous si vous avez besoin
|
|
|
667 |
|
668 |
#: templates/admin/menu/import-overview.php:24
|
669 |
msgid ""
|
@@ -674,20 +676,20 @@ msgstr ""
|
|
674 |
"Toutes les recettes traitées avant la survenue de l'erreur seront importées "
|
675 |
"correctement."
|
676 |
|
677 |
-
#: templates/admin/menu/import-overview.php:27
|
678 |
#: templates/admin/menu/import-recipes.php:44
|
679 |
msgid "Recipes to Import"
|
680 |
msgstr "Recettes à importer"
|
681 |
|
682 |
-
#: templates/admin/menu/import-overview.php:42
|
683 |
#: templates/admin/menu/import-overview.php:67
|
684 |
msgid "No recipes found."
|
685 |
-
msgstr "Aucune recette trouvée"
|
686 |
|
687 |
#: templates/admin/menu/import-overview.php:47
|
688 |
msgid "%d recipe found"
|
689 |
msgid_plural "%d recipes found"
|
690 |
-
msgstr[0] "%d recette trouvée"
|
691 |
msgstr[1] "%d recettes trouvées"
|
692 |
|
693 |
#: templates/admin/menu/import-overview.php:48
|
@@ -755,7 +757,7 @@ msgstr "Fermer le module"
|
|
755 |
|
756 |
#: templates/admin/modal/modal.php:38
|
757 |
msgid "You're currently editing a recipe."
|
758 |
-
msgstr "Vous
|
759 |
|
760 |
#: templates/admin/modal/modal.php:38
|
761 |
msgid "Use the \"WP Recipe Maker\" button to access other features."
|
@@ -782,93 +784,93 @@ msgstr ""
|
|
782 |
"Coller le texte de la recette que vous souhaitez importer dans la zone de "
|
783 |
"texte ci-dessous."
|
784 |
|
785 |
-
#: templates/admin/modal/tabs/import-text.php:30
|
786 |
-
#: templates/admin/modal/tabs/import-text.php:35
|
787 |
-
#: templates/admin/modal/tabs/import-text.php:40
|
788 |
-
#: templates/admin/modal/tabs/import-text.php:52
|
789 |
#: templates/admin/modal/tabs/import-text.php:64
|
790 |
msgid "Highlight this part of the recipe:"
|
791 |
-
msgstr "Surlignez
|
792 |
|
793 |
-
#: templates/admin/modal/tabs/import-text.php:30
|
794 |
-
#: templates/admin/modal/tabs/recipe-details.php:30
|
795 |
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:21
|
796 |
msgid "Name"
|
797 |
msgstr "Nom"
|
798 |
|
799 |
-
#: templates/admin/modal/tabs/import-text.php:35
|
800 |
#: templates/admin/modal/tabs/recipe-details.php:34
|
801 |
msgid "Summary"
|
802 |
msgstr "Résumé"
|
803 |
|
804 |
-
#: templates/admin/modal/tabs/import-text.php:40
|
805 |
-
#: templates/recipe/clean-print/clean-print.php:90
|
806 |
-
#: templates/recipe/clean-print-with-image/clean-print-with-image.php:91
|
807 |
-
#: templates/recipe/simple/simple.php:107
|
808 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:111
|
809 |
msgid "Ingredients"
|
810 |
msgstr "Ingrédients"
|
811 |
|
812 |
#: templates/admin/modal/tabs/import-text.php:45
|
813 |
msgid "Check any ingredient groups in this list:"
|
814 |
-
msgstr "Cochez les titres d'
|
815 |
|
816 |
-
#: templates/admin/modal/tabs/import-text.php:52
|
817 |
-
#: templates/recipe/clean-print/clean-print.php:120
|
818 |
-
#: templates/recipe/clean-print-with-image/clean-print-with-image.php:121
|
819 |
-
#: templates/recipe/simple/simple.php:137
|
820 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:141
|
821 |
msgid "Instructions"
|
822 |
msgstr "Instructions"
|
823 |
|
824 |
#: templates/admin/modal/tabs/import-text.php:57
|
825 |
msgid "Check any instruction groups in this list:"
|
826 |
-
msgstr "Cochez les titres d'
|
827 |
|
828 |
-
#: templates/admin/modal/tabs/import-text.php:64
|
829 |
-
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:22
|
830 |
#: templates/admin/modal/tabs/recipe-notes.php:16
|
831 |
msgid "Notes"
|
832 |
msgstr "Notes"
|
833 |
|
834 |
#: templates/admin/modal/tabs/import-text.php:69
|
835 |
msgid "Finished the text import."
|
836 |
-
msgstr "
|
837 |
|
838 |
-
#: templates/admin/modal/tabs/recipe-details.php:23
|
839 |
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:54
|
840 |
msgid "Image"
|
841 |
msgstr "Photo"
|
842 |
|
843 |
-
#: templates/admin/modal/tabs/recipe-details.php:24
|
844 |
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:70
|
845 |
msgid "Add Image"
|
846 |
msgstr "Ajouter une photo"
|
847 |
|
848 |
-
#: templates/admin/modal/tabs/recipe-details.php:25
|
849 |
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:71
|
850 |
msgid "Remove Image"
|
851 |
-
msgstr "
|
852 |
|
853 |
#: templates/admin/modal/tabs/recipe-details.php:31
|
854 |
msgid "Recipe Name"
|
855 |
msgstr "Nom de la recette"
|
856 |
|
857 |
-
#: templates/admin/modal/tabs/recipe-details.php:38
|
858 |
-
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:87
|
859 |
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:91
|
860 |
msgid "Hint"
|
861 |
msgstr "Conseil"
|
862 |
|
863 |
-
#: templates/admin/modal/tabs/recipe-details.php:39
|
864 |
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:92
|
865 |
msgid "Select text to add styling or links."
|
866 |
msgstr "Sélectionner du texte pour ajouter un style ou un lien."
|
867 |
|
868 |
-
#: templates/admin/modal/tabs/recipe-details.php:42
|
869 |
-
#: templates/recipe/clean-print/clean-print.php:81
|
870 |
-
#: templates/recipe/clean-print-with-image/clean-print-with-image.php:82
|
871 |
-
#: templates/recipe/simple/simple.php:98
|
872 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:102
|
873 |
msgid "Author"
|
874 |
msgstr "Auteur"
|
@@ -893,10 +895,10 @@ msgstr "Nom d'auteur personnalisé"
|
|
893 |
msgid "Author Name"
|
894 |
msgstr "Nom de l'auteur"
|
895 |
|
896 |
-
#: templates/admin/modal/tabs/recipe-details.php:53
|
897 |
-
#: templates/recipe/clean-print/clean-print.php:71
|
898 |
-
#: templates/recipe/clean-print-with-image/clean-print-with-image.php:72
|
899 |
-
#: templates/recipe/simple/simple.php:88
|
900 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:92
|
901 |
msgid "Servings"
|
902 |
msgstr "Portions"
|
@@ -905,50 +907,50 @@ msgstr "Portions"
|
|
905 |
msgid "people"
|
906 |
msgstr "personnes"
|
907 |
|
908 |
-
#: templates/admin/modal/tabs/recipe-details.php:58
|
909 |
-
#: templates/recipe/clean-print/clean-print.php:76
|
910 |
-
#: templates/recipe/clean-print-with-image/clean-print-with-image.php:77
|
911 |
-
#: templates/recipe/simple/simple.php:93
|
912 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:97
|
913 |
msgid "Calories"
|
914 |
msgstr "Calories"
|
915 |
|
916 |
-
#: templates/admin/modal/tabs/recipe-details.php:63
|
917 |
-
#: templates/recipe/clean-print/clean-print.php:54
|
918 |
-
#: templates/recipe/clean-print-with-image/clean-print-with-image.php:55
|
919 |
-
#: templates/recipe/simple/simple.php:69
|
920 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:35
|
921 |
msgid "Prep Time"
|
922 |
msgstr "Temps de préparation"
|
923 |
|
924 |
-
#: templates/admin/modal/tabs/recipe-details.php:66
|
925 |
-
#: templates/recipe/clean-print/clean-print.php:59
|
926 |
-
#: templates/recipe/clean-print-with-image/clean-print-with-image.php:60
|
927 |
-
#: templates/recipe/simple/simple.php:75
|
928 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:42
|
929 |
msgid "Cook Time"
|
930 |
msgstr "Temps de cuisson"
|
931 |
|
932 |
-
#: templates/admin/modal/tabs/recipe-details.php:69
|
933 |
-
#: templates/recipe/clean-print/clean-print.php:64
|
934 |
-
#: templates/recipe/clean-print-with-image/clean-print-with-image.php:65
|
935 |
-
#: templates/recipe/simple/simple.php:81
|
936 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:49
|
937 |
msgid "Total Time"
|
938 |
msgstr "Temps total"
|
939 |
|
940 |
-
#: templates/admin/modal/tabs/recipe-details.php:73
|
941 |
-
#: templates/recipe/clean-print/clean-print.php:24
|
942 |
-
#: templates/recipe/clean-print-with-image/clean-print-with-image.php:25
|
943 |
-
#: templates/recipe/simple/simple.php:38
|
944 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:64
|
945 |
msgid "Course"
|
946 |
msgstr "Type de plat"
|
947 |
|
948 |
-
#: templates/admin/modal/tabs/recipe-details.php:87
|
949 |
-
#: templates/recipe/clean-print/clean-print.php:39
|
950 |
-
#: templates/recipe/clean-print-with-image/clean-print-with-image.php:40
|
951 |
-
#: templates/recipe/simple/simple.php:53
|
952 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:79
|
953 |
msgid "Cuisine"
|
954 |
msgstr "Cuisine"
|
@@ -963,7 +965,7 @@ msgstr "Unité"
|
|
963 |
|
964 |
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:28
|
965 |
msgid "Ingredient Group"
|
966 |
-
msgstr "Titre ingrédient"
|
967 |
|
968 |
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:35
|
969 |
msgid "olive oil"
|
@@ -979,11 +981,11 @@ msgstr "Ajouter un ingrédient"
|
|
979 |
|
980 |
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:45
|
981 |
msgid "Add Ingredient Group"
|
982 |
-
msgstr "Ajouter un titre d'
|
983 |
|
984 |
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:53
|
985 |
msgid "Instruction"
|
986 |
-
msgstr "
|
987 |
|
988 |
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:60
|
989 |
msgid "Instruction Group"
|
@@ -1003,7 +1005,7 @@ msgid ""
|
|
1003 |
"ingredients/instructions without having to click the button."
|
1004 |
msgstr ""
|
1005 |
"Utilisez la tabulation pour passer facilement d'un champ à l'autre et "
|
1006 |
-
"ajouter un ingrédient/ une instruction sans avoir à cliquer sur le bouton."
|
1007 |
|
1008 |
#: templates/admin/modal/tabs/recipe-snippets-jump.php:15
|
1009 |
msgid ""
|
@@ -1013,7 +1015,7 @@ msgstr ""
|
|
1013 |
"Le raccourci %s peut être utilisé pour ajouter un lien qui amène directement "
|
1014 |
"le visiteur à la première recette de la page."
|
1015 |
|
1016 |
-
#: templates/admin/modal/tabs/recipe-snippets-jump.php:17
|
1017 |
#: templates/admin/modal/tabs/recipe-snippets-print.php:17
|
1018 |
msgid "Shortcode Examples"
|
1019 |
msgstr "Exemple de raccourci"
|
@@ -1042,25 +1044,25 @@ msgstr ""
|
|
1042 |
"Ajouter un lien amenant à la recette ID 123 avec un lien texte \"Voir la "
|
1043 |
"recette\"."
|
1044 |
|
1045 |
-
#: templates/admin/modal/tabs/recipe-snippets-jump.php:30
|
1046 |
#: templates/admin/modal/tabs/recipe-snippets-print.php:30
|
1047 |
msgid "Shortcode Builder"
|
1048 |
msgstr "Créateur de raccourci"
|
1049 |
|
1050 |
-
#: templates/admin/modal/tabs/recipe-snippets-jump.php:35
|
1051 |
#: templates/admin/modal/tabs/recipe-snippets-print.php:35
|
1052 |
msgid "First recipe on page"
|
1053 |
msgstr "Première recette de la page"
|
1054 |
|
1055 |
-
#: templates/admin/modal/tabs/recipe-snippets-jump.php:44
|
1056 |
#: templates/admin/modal/tabs/recipe-snippets-print.php:44
|
1057 |
msgid "Text"
|
1058 |
msgstr "texte"
|
1059 |
|
1060 |
-
#: templates/admin/modal/tabs/recipe-snippets-jump.php:46
|
1061 |
#: templates/admin/modal/tabs/recipe-snippets-print.php:46
|
1062 |
msgid "Leave blank to use default"
|
1063 |
-
msgstr "Laissez vide pour
|
1064 |
|
1065 |
#: templates/admin/modal/tabs/recipe-snippets-print.php:15
|
1066 |
msgid "The %s shortcode can be used to add a link for printing a recipe."
|
@@ -1094,7 +1096,7 @@ msgstr ""
|
|
1094 |
|
1095 |
#: templates/admin/settings/appearance.php:17
|
1096 |
msgid "Recipe Template"
|
1097 |
-
msgstr "
|
1098 |
|
1099 |
#: templates/admin/settings/appearance.php:19
|
1100 |
msgid "Change the look of recipes on your website."
|
@@ -1102,25 +1104,25 @@ msgstr "Change l'apparence des recettes sur votre site."
|
|
1102 |
|
1103 |
#: templates/admin/settings/appearance.php:28
|
1104 |
msgid "Default Recipe Template"
|
1105 |
-
msgstr "
|
1106 |
|
1107 |
#: templates/admin/settings/appearance.php:41
|
1108 |
msgid "The default template to use for recipes on your website."
|
1109 |
-
msgstr "
|
1110 |
|
1111 |
#: templates/admin/settings/appearance.php:47
|
1112 |
msgid "Default Print Template"
|
1113 |
-
msgstr "
|
1114 |
|
1115 |
#: templates/admin/settings/appearance.php:60
|
1116 |
msgid "The default template to use when printing a recipe."
|
1117 |
-
msgstr "
|
1118 |
|
1119 |
#: templates/admin/settings/appearance.php:86
|
1120 |
msgid "No Screenshot"
|
1121 |
msgstr "Pas d'aperçu"
|
1122 |
|
1123 |
-
#: templates/admin/settings/appearance.php:95
|
1124 |
#: templates/admin/settings/features.php:67
|
1125 |
msgid "Save Changes"
|
1126 |
msgstr "Sauvegarder les modifications"
|
@@ -1136,22 +1138,22 @@ msgstr ""
|
|
1136 |
|
1137 |
#: templates/admin/settings/features.php:25
|
1138 |
msgid "Comment Ratings"
|
1139 |
-
msgstr "Evaluation
|
1140 |
|
1141 |
#: templates/admin/settings/features.php:31
|
1142 |
msgid "Allow visitors to vote on your recipes when commenting"
|
1143 |
msgstr ""
|
1144 |
-
"
|
1145 |
"commentaire"
|
1146 |
|
1147 |
-
#: templates/admin/settings/features.php:34
|
1148 |
#: templates/admin/settings/features.php:61
|
1149 |
msgid "Learn more"
|
1150 |
msgstr "En savoir plus"
|
1151 |
|
1152 |
#: templates/admin/settings/features.php:40
|
1153 |
msgid "Premium Features"
|
1154 |
-
msgstr "Fonctionnalités
|
1155 |
|
1156 |
#: templates/admin/settings/features.php:43
|
1157 |
msgid "These features are only available in"
|
@@ -1160,16 +1162,16 @@ msgstr "Ces fonctionnalités sont uniquement accessibles dans"
|
|
1160 |
#: templates/admin/settings/features.php:45
|
1161 |
msgid "Choose the Premium features you want to use on your website."
|
1162 |
msgstr ""
|
1163 |
-
"Choisissez les fonctionnalités
|
1164 |
"site."
|
1165 |
|
1166 |
#: templates/admin/settings/features.php:52
|
1167 |
msgid "Adjustable Servings"
|
1168 |
-
msgstr "
|
1169 |
|
1170 |
#: templates/admin/settings/features.php:58
|
1171 |
msgid "Visitors can adjust the serving size of your recipes"
|
1172 |
-
msgstr "Les visiteurs peuvent changer
|
1173 |
|
1174 |
#: templates/admin/settings.php:16
|
1175 |
msgid "Appearance"
|
@@ -1179,7 +1181,7 @@ msgstr "Apparence"
|
|
1179 |
msgid "WP Recipe Maker Settings"
|
1180 |
msgstr "Paramétrages WP Recipe Maker"
|
1181 |
|
1182 |
-
#: templates/recipe/simple/simple.php:26
|
1183 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:26
|
1184 |
msgid "Print"
|
1185 |
msgstr "Imprimer"
|
@@ -1207,3 +1209,4 @@ msgstr "Bootstrapped Ventures"
|
|
1207 |
#. Author URI of the plugin/theme
|
1208 |
msgid "http://bootstrapped.ventures/"
|
1209 |
msgstr "http://bootstrapped.ventures/"
|
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
9 |
+
"PO-Revision-Date: 2021-08-01 18:40+0000\n"
|
10 |
+
"Last-Translator: karinkuisin\n"
|
11 |
+
"Language-Team: Français\n"
|
12 |
"Language: fr-FR\n"
|
13 |
+
"Plural-Forms: nplurals=2; plural=n > 1;\n"
|
14 |
+
"X-Generator: Loco https://localise.biz/\n"
|
15 |
+
"X-Loco-Version: 2.5.3; wp-5.8"
|
16 |
|
17 |
+
#: includes/admin/class-wprm-import-manager.php:50
|
18 |
+
#: includes/admin/class-wprm-import-manager.php:51
|
19 |
#: templates/admin/menu/import-overview.php:15
|
20 |
msgid "Import Recipes"
|
21 |
msgstr "Importer des recettes"
|
44 |
msgid "gr"
|
45 |
msgstr "gr"
|
46 |
|
47 |
+
#: includes/admin/class-wprm-recipe-parser.php:154
|
48 |
#: includes/public/class-wprm-metadata.php:164
|
49 |
msgid "g"
|
50 |
msgstr "g"
|
57 |
msgid "milligram"
|
58 |
msgstr "milligramme"
|
59 |
|
60 |
+
#: includes/admin/class-wprm-recipe-parser.php:157
|
61 |
#: includes/public/class-wprm-metadata.php:169
|
62 |
msgid "mg"
|
63 |
msgstr "mg"
|
222 |
msgid "tbsps"
|
223 |
msgstr "c. à soupe"
|
224 |
|
225 |
+
#: includes/admin/class-wprm-recipe-parser.php:199
|
226 |
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:34
|
227 |
msgid "tbsp"
|
228 |
msgstr "c. à soupe"
|
383 |
msgid "Unknown"
|
384 |
msgstr "Inconnu"
|
385 |
|
386 |
+
#: includes/admin/import/class-wprm-import-wpultimaterecipe.php:349
|
387 |
#: includes/public/class-wprm-template-helper.php:66
|
388 |
msgid "hour"
|
389 |
msgstr "heure"
|
390 |
|
391 |
+
#: includes/admin/import/class-wprm-import-wpultimaterecipe.php:350
|
392 |
#: includes/public/class-wprm-template-helper.php:66
|
393 |
msgid "hours"
|
394 |
msgstr "heures"
|
395 |
|
396 |
+
#: includes/admin/menu/class-wprm-admin-menu-addons.php:47
|
397 |
#: templates/admin/menu/addons.php:15
|
398 |
msgid "Add-Ons"
|
399 |
+
msgstr "Modules complémentaires"
|
400 |
|
401 |
#: includes/admin/menu/class-wprm-admin-menu-faq.php:76
|
402 |
msgid "FAQ & Support"
|
403 |
+
msgstr "Foire Aux Questions et Support"
|
404 |
|
405 |
+
#: includes/admin/modal/class-wprm-modal.php:60
|
406 |
#: templates/admin/modal/modal.php:96
|
407 |
msgid "Insert"
|
408 |
msgstr "Insérer"
|
421 |
|
422 |
#: includes/admin/modal/class-wprm-modal.php:64
|
423 |
msgid "Are you sure you want to remove this recipe?"
|
424 |
+
msgstr "Etes-vous sûrs de vouloir supprimer cette recette ?"
|
425 |
|
426 |
#: includes/admin/modal/class-wprm-modal.php:65
|
427 |
msgid "Are you sure you want to start over with importing from text?"
|
428 |
+
msgstr "Etes-vous sûrs de vouloir recommencer l'import texte ?"
|
429 |
|
430 |
+
#: includes/admin/modal/class-wprm-modal.php:117
|
431 |
+
#: templates/admin/modal/tabs/recipe-snippets-jump.php:33
|
432 |
#: templates/admin/modal/tabs/recipe-snippets-print.php:33
|
433 |
msgid "Recipe"
|
434 |
msgstr "Recette"
|
445 |
msgid "Ingredients & Instructions"
|
446 |
msgstr "Ingrédients et Instructions"
|
447 |
|
448 |
+
#: includes/admin/modal/class-wprm-modal.php:141
|
449 |
+
#: templates/recipe/clean-print/clean-print.php:141
|
450 |
+
#: templates/recipe/clean-print-with-image/clean-print-with-image.php:142
|
451 |
+
#: templates/recipe/simple/simple.php:161
|
452 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:165
|
453 |
msgid "Recipe Notes"
|
454 |
msgstr "Notes"
|
455 |
|
456 |
#: includes/admin/modal/class-wprm-modal.php:150
|
457 |
msgid "Recipe Snippets"
|
458 |
+
msgstr "Extraits de la recette"
|
459 |
|
460 |
+
#: includes/admin/modal/class-wprm-modal.php:154
|
461 |
+
#: includes/public/class-wprm-shortcode.php:154
|
462 |
#: templates/admin/modal/tabs/recipe-snippets-jump.php:45
|
463 |
msgid "Jump to Recipe"
|
464 |
msgstr "Aller à la recette"
|
465 |
|
466 |
+
#: includes/admin/modal/class-wprm-modal.php:161
|
467 |
+
#: includes/public/class-wprm-shortcode.php:186
|
468 |
#: templates/admin/modal/tabs/recipe-snippets-print.php:45
|
469 |
msgid "Print Recipe"
|
470 |
msgstr "Imprimer la recette"
|
471 |
|
472 |
#: includes/admin/modal/class-wprm-shortcode-preview.php:46
|
473 |
msgid "remove"
|
474 |
+
msgstr "supprimer"
|
475 |
|
476 |
+
#: includes/public/class-wprm-comment-rating.php:114
|
477 |
#: templates/public/comment-rating-form.php:14
|
478 |
msgid "Recipe Rating"
|
479 |
msgstr "Evaluation de la recette"
|
480 |
|
481 |
+
#: includes/public/class-wprm-metadata.php:167
|
482 |
+
#: templates/admin/modal/tabs/recipe-details.php:59
|
483 |
+
#: templates/recipe/clean-print/clean-print.php:76
|
484 |
+
#: templates/recipe/clean-print-with-image/clean-print-with-image.php:77
|
485 |
+
#: templates/recipe/simple/simple.php:93
|
486 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:97
|
487 |
msgid "kcal"
|
488 |
msgstr "kcal"
|
623 |
msgid "min"
|
624 |
msgstr "min"
|
625 |
|
626 |
+
#: includes/public/class-wprm-template-helper.php:83
|
627 |
+
#: templates/admin/modal/tabs/recipe-details.php:64
|
628 |
+
#: templates/admin/modal/tabs/recipe-details.php:67
|
629 |
#: templates/admin/modal/tabs/recipe-details.php:70
|
630 |
msgid "minutes"
|
631 |
msgstr "minutes"
|
637 |
#: includes/public/class-wprm-template-helper.php:120
|
638 |
msgid "vote"
|
639 |
msgid_plural "votes"
|
640 |
+
msgstr[0] "évaluation"
|
641 |
+
msgstr[1] "évaluations"
|
642 |
|
643 |
#: templates/admin/menu/import-overview.php:16
|
644 |
msgid "Considerations Before Importing"
|
645 |
+
msgstr "Mises en garde avant l'importation"
|
646 |
|
647 |
#: templates/admin/menu/import-overview.php:18
|
648 |
msgid ""
|
662 |
"than regular posts you might want to use a redirection plugin to set up 301 "
|
663 |
"redirects. Contact us if you need help!"
|
664 |
msgstr ""
|
665 |
+
"Si votre plugin actuel utilise des permaliens personnalisés et différents de "
|
666 |
+
"ce de vos articles vous voudrez certainement mettre en place des "
|
667 |
+
"redirections 301 via un plugin tiers. Contactez-nous si vous avez besoin "
|
668 |
+
"d'aide!"
|
669 |
|
670 |
#: templates/admin/menu/import-overview.php:24
|
671 |
msgid ""
|
676 |
"Toutes les recettes traitées avant la survenue de l'erreur seront importées "
|
677 |
"correctement."
|
678 |
|
679 |
+
#: templates/admin/menu/import-overview.php:27
|
680 |
#: templates/admin/menu/import-recipes.php:44
|
681 |
msgid "Recipes to Import"
|
682 |
msgstr "Recettes à importer"
|
683 |
|
684 |
+
#: templates/admin/menu/import-overview.php:42
|
685 |
#: templates/admin/menu/import-overview.php:67
|
686 |
msgid "No recipes found."
|
687 |
+
msgstr "Aucune recette trouvée."
|
688 |
|
689 |
#: templates/admin/menu/import-overview.php:47
|
690 |
msgid "%d recipe found"
|
691 |
msgid_plural "%d recipes found"
|
692 |
+
msgstr[0] "%d recette(s) trouvée(s)"
|
693 |
msgstr[1] "%d recettes trouvées"
|
694 |
|
695 |
#: templates/admin/menu/import-overview.php:48
|
757 |
|
758 |
#: templates/admin/modal/modal.php:38
|
759 |
msgid "You're currently editing a recipe."
|
760 |
+
msgstr "Vous éditez une recette."
|
761 |
|
762 |
#: templates/admin/modal/modal.php:38
|
763 |
msgid "Use the \"WP Recipe Maker\" button to access other features."
|
784 |
"Coller le texte de la recette que vous souhaitez importer dans la zone de "
|
785 |
"texte ci-dessous."
|
786 |
|
787 |
+
#: templates/admin/modal/tabs/import-text.php:30
|
788 |
+
#: templates/admin/modal/tabs/import-text.php:35
|
789 |
+
#: templates/admin/modal/tabs/import-text.php:40
|
790 |
+
#: templates/admin/modal/tabs/import-text.php:52
|
791 |
#: templates/admin/modal/tabs/import-text.php:64
|
792 |
msgid "Highlight this part of the recipe:"
|
793 |
+
msgstr "Surlignez cette partie de la recette:"
|
794 |
|
795 |
+
#: templates/admin/modal/tabs/import-text.php:30
|
796 |
+
#: templates/admin/modal/tabs/recipe-details.php:30
|
797 |
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:21
|
798 |
msgid "Name"
|
799 |
msgstr "Nom"
|
800 |
|
801 |
+
#: templates/admin/modal/tabs/import-text.php:35
|
802 |
#: templates/admin/modal/tabs/recipe-details.php:34
|
803 |
msgid "Summary"
|
804 |
msgstr "Résumé"
|
805 |
|
806 |
+
#: templates/admin/modal/tabs/import-text.php:40
|
807 |
+
#: templates/recipe/clean-print/clean-print.php:90
|
808 |
+
#: templates/recipe/clean-print-with-image/clean-print-with-image.php:91
|
809 |
+
#: templates/recipe/simple/simple.php:107
|
810 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:111
|
811 |
msgid "Ingredients"
|
812 |
msgstr "Ingrédients"
|
813 |
|
814 |
#: templates/admin/modal/tabs/import-text.php:45
|
815 |
msgid "Check any ingredient groups in this list:"
|
816 |
+
msgstr "Cochez les titres d'ingrédient dans cette liste :"
|
817 |
|
818 |
+
#: templates/admin/modal/tabs/import-text.php:52
|
819 |
+
#: templates/recipe/clean-print/clean-print.php:120
|
820 |
+
#: templates/recipe/clean-print-with-image/clean-print-with-image.php:121
|
821 |
+
#: templates/recipe/simple/simple.php:137
|
822 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:141
|
823 |
msgid "Instructions"
|
824 |
msgstr "Instructions"
|
825 |
|
826 |
#: templates/admin/modal/tabs/import-text.php:57
|
827 |
msgid "Check any instruction groups in this list:"
|
828 |
+
msgstr "Cochez les titres d'instruction dans cette liste :"
|
829 |
|
830 |
+
#: templates/admin/modal/tabs/import-text.php:64
|
831 |
+
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:22
|
832 |
#: templates/admin/modal/tabs/recipe-notes.php:16
|
833 |
msgid "Notes"
|
834 |
msgstr "Notes"
|
835 |
|
836 |
#: templates/admin/modal/tabs/import-text.php:69
|
837 |
msgid "Finished the text import."
|
838 |
+
msgstr "Fin de l'import du texte."
|
839 |
|
840 |
+
#: templates/admin/modal/tabs/recipe-details.php:23
|
841 |
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:54
|
842 |
msgid "Image"
|
843 |
msgstr "Photo"
|
844 |
|
845 |
+
#: templates/admin/modal/tabs/recipe-details.php:24
|
846 |
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:70
|
847 |
msgid "Add Image"
|
848 |
msgstr "Ajouter une photo"
|
849 |
|
850 |
+
#: templates/admin/modal/tabs/recipe-details.php:25
|
851 |
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:71
|
852 |
msgid "Remove Image"
|
853 |
+
msgstr "Supprimer la photo"
|
854 |
|
855 |
#: templates/admin/modal/tabs/recipe-details.php:31
|
856 |
msgid "Recipe Name"
|
857 |
msgstr "Nom de la recette"
|
858 |
|
859 |
+
#: templates/admin/modal/tabs/recipe-details.php:38
|
860 |
+
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:87
|
861 |
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:91
|
862 |
msgid "Hint"
|
863 |
msgstr "Conseil"
|
864 |
|
865 |
+
#: templates/admin/modal/tabs/recipe-details.php:39
|
866 |
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:92
|
867 |
msgid "Select text to add styling or links."
|
868 |
msgstr "Sélectionner du texte pour ajouter un style ou un lien."
|
869 |
|
870 |
+
#: templates/admin/modal/tabs/recipe-details.php:42
|
871 |
+
#: templates/recipe/clean-print/clean-print.php:81
|
872 |
+
#: templates/recipe/clean-print-with-image/clean-print-with-image.php:82
|
873 |
+
#: templates/recipe/simple/simple.php:98
|
874 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:102
|
875 |
msgid "Author"
|
876 |
msgstr "Auteur"
|
895 |
msgid "Author Name"
|
896 |
msgstr "Nom de l'auteur"
|
897 |
|
898 |
+
#: templates/admin/modal/tabs/recipe-details.php:53
|
899 |
+
#: templates/recipe/clean-print/clean-print.php:71
|
900 |
+
#: templates/recipe/clean-print-with-image/clean-print-with-image.php:72
|
901 |
+
#: templates/recipe/simple/simple.php:88
|
902 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:92
|
903 |
msgid "Servings"
|
904 |
msgstr "Portions"
|
907 |
msgid "people"
|
908 |
msgstr "personnes"
|
909 |
|
910 |
+
#: templates/admin/modal/tabs/recipe-details.php:58
|
911 |
+
#: templates/recipe/clean-print/clean-print.php:76
|
912 |
+
#: templates/recipe/clean-print-with-image/clean-print-with-image.php:77
|
913 |
+
#: templates/recipe/simple/simple.php:93
|
914 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:97
|
915 |
msgid "Calories"
|
916 |
msgstr "Calories"
|
917 |
|
918 |
+
#: templates/admin/modal/tabs/recipe-details.php:63
|
919 |
+
#: templates/recipe/clean-print/clean-print.php:54
|
920 |
+
#: templates/recipe/clean-print-with-image/clean-print-with-image.php:55
|
921 |
+
#: templates/recipe/simple/simple.php:69
|
922 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:35
|
923 |
msgid "Prep Time"
|
924 |
msgstr "Temps de préparation"
|
925 |
|
926 |
+
#: templates/admin/modal/tabs/recipe-details.php:66
|
927 |
+
#: templates/recipe/clean-print/clean-print.php:59
|
928 |
+
#: templates/recipe/clean-print-with-image/clean-print-with-image.php:60
|
929 |
+
#: templates/recipe/simple/simple.php:75
|
930 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:42
|
931 |
msgid "Cook Time"
|
932 |
msgstr "Temps de cuisson"
|
933 |
|
934 |
+
#: templates/admin/modal/tabs/recipe-details.php:69
|
935 |
+
#: templates/recipe/clean-print/clean-print.php:64
|
936 |
+
#: templates/recipe/clean-print-with-image/clean-print-with-image.php:65
|
937 |
+
#: templates/recipe/simple/simple.php:81
|
938 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:49
|
939 |
msgid "Total Time"
|
940 |
msgstr "Temps total"
|
941 |
|
942 |
+
#: templates/admin/modal/tabs/recipe-details.php:73
|
943 |
+
#: templates/recipe/clean-print/clean-print.php:24
|
944 |
+
#: templates/recipe/clean-print-with-image/clean-print-with-image.php:25
|
945 |
+
#: templates/recipe/simple/simple.php:38
|
946 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:64
|
947 |
msgid "Course"
|
948 |
msgstr "Type de plat"
|
949 |
|
950 |
+
#: templates/admin/modal/tabs/recipe-details.php:87
|
951 |
+
#: templates/recipe/clean-print/clean-print.php:39
|
952 |
+
#: templates/recipe/clean-print-with-image/clean-print-with-image.php:40
|
953 |
+
#: templates/recipe/simple/simple.php:53
|
954 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:79
|
955 |
msgid "Cuisine"
|
956 |
msgstr "Cuisine"
|
965 |
|
966 |
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:28
|
967 |
msgid "Ingredient Group"
|
968 |
+
msgstr "Titre d'ingrédient"
|
969 |
|
970 |
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:35
|
971 |
msgid "olive oil"
|
981 |
|
982 |
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:45
|
983 |
msgid "Add Ingredient Group"
|
984 |
+
msgstr "Ajouter un titre d'ingrédient"
|
985 |
|
986 |
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:53
|
987 |
msgid "Instruction"
|
988 |
+
msgstr "Instruction"
|
989 |
|
990 |
#: templates/admin/modal/tabs/recipe-ingredients-instructions.php:60
|
991 |
msgid "Instruction Group"
|
1005 |
"ingredients/instructions without having to click the button."
|
1006 |
msgstr ""
|
1007 |
"Utilisez la tabulation pour passer facilement d'un champ à l'autre et "
|
1008 |
+
"ajouter un ingrédient / une instruction sans avoir à cliquer sur le bouton."
|
1009 |
|
1010 |
#: templates/admin/modal/tabs/recipe-snippets-jump.php:15
|
1011 |
msgid ""
|
1015 |
"Le raccourci %s peut être utilisé pour ajouter un lien qui amène directement "
|
1016 |
"le visiteur à la première recette de la page."
|
1017 |
|
1018 |
+
#: templates/admin/modal/tabs/recipe-snippets-jump.php:17
|
1019 |
#: templates/admin/modal/tabs/recipe-snippets-print.php:17
|
1020 |
msgid "Shortcode Examples"
|
1021 |
msgstr "Exemple de raccourci"
|
1044 |
"Ajouter un lien amenant à la recette ID 123 avec un lien texte \"Voir la "
|
1045 |
"recette\"."
|
1046 |
|
1047 |
+
#: templates/admin/modal/tabs/recipe-snippets-jump.php:30
|
1048 |
#: templates/admin/modal/tabs/recipe-snippets-print.php:30
|
1049 |
msgid "Shortcode Builder"
|
1050 |
msgstr "Créateur de raccourci"
|
1051 |
|
1052 |
+
#: templates/admin/modal/tabs/recipe-snippets-jump.php:35
|
1053 |
#: templates/admin/modal/tabs/recipe-snippets-print.php:35
|
1054 |
msgid "First recipe on page"
|
1055 |
msgstr "Première recette de la page"
|
1056 |
|
1057 |
+
#: templates/admin/modal/tabs/recipe-snippets-jump.php:44
|
1058 |
#: templates/admin/modal/tabs/recipe-snippets-print.php:44
|
1059 |
msgid "Text"
|
1060 |
msgstr "texte"
|
1061 |
|
1062 |
+
#: templates/admin/modal/tabs/recipe-snippets-jump.php:46
|
1063 |
#: templates/admin/modal/tabs/recipe-snippets-print.php:46
|
1064 |
msgid "Leave blank to use default"
|
1065 |
+
msgstr "Laissez vide pour utiliser les réglages par défaut"
|
1066 |
|
1067 |
#: templates/admin/modal/tabs/recipe-snippets-print.php:15
|
1068 |
msgid "The %s shortcode can be used to add a link for printing a recipe."
|
1096 |
|
1097 |
#: templates/admin/settings/appearance.php:17
|
1098 |
msgid "Recipe Template"
|
1099 |
+
msgstr "Modèle de recette"
|
1100 |
|
1101 |
#: templates/admin/settings/appearance.php:19
|
1102 |
msgid "Change the look of recipes on your website."
|
1104 |
|
1105 |
#: templates/admin/settings/appearance.php:28
|
1106 |
msgid "Default Recipe Template"
|
1107 |
+
msgstr "Modèle des recettes par défaut"
|
1108 |
|
1109 |
#: templates/admin/settings/appearance.php:41
|
1110 |
msgid "The default template to use for recipes on your website."
|
1111 |
+
msgstr "Le modèle utilisé par défaut pour les recettes sur votre site."
|
1112 |
|
1113 |
#: templates/admin/settings/appearance.php:47
|
1114 |
msgid "Default Print Template"
|
1115 |
+
msgstr "Modèle d'impression par défaut"
|
1116 |
|
1117 |
#: templates/admin/settings/appearance.php:60
|
1118 |
msgid "The default template to use when printing a recipe."
|
1119 |
+
msgstr "Le modèle utilisé par défaut pour l'impression des recettes."
|
1120 |
|
1121 |
#: templates/admin/settings/appearance.php:86
|
1122 |
msgid "No Screenshot"
|
1123 |
msgstr "Pas d'aperçu"
|
1124 |
|
1125 |
+
#: templates/admin/settings/appearance.php:95
|
1126 |
#: templates/admin/settings/features.php:67
|
1127 |
msgid "Save Changes"
|
1128 |
msgstr "Sauvegarder les modifications"
|
1138 |
|
1139 |
#: templates/admin/settings/features.php:25
|
1140 |
msgid "Comment Ratings"
|
1141 |
+
msgstr "Evaluation des commentaires"
|
1142 |
|
1143 |
#: templates/admin/settings/features.php:31
|
1144 |
msgid "Allow visitors to vote on your recipes when commenting"
|
1145 |
msgstr ""
|
1146 |
+
"Autoriser les visiteurs à évaluer vos recettes lorsqu'ils déposent un "
|
1147 |
"commentaire"
|
1148 |
|
1149 |
+
#: templates/admin/settings/features.php:34
|
1150 |
#: templates/admin/settings/features.php:61
|
1151 |
msgid "Learn more"
|
1152 |
msgstr "En savoir plus"
|
1153 |
|
1154 |
#: templates/admin/settings/features.php:40
|
1155 |
msgid "Premium Features"
|
1156 |
+
msgstr "Fonctionnalités Premium"
|
1157 |
|
1158 |
#: templates/admin/settings/features.php:43
|
1159 |
msgid "These features are only available in"
|
1162 |
#: templates/admin/settings/features.php:45
|
1163 |
msgid "Choose the Premium features you want to use on your website."
|
1164 |
msgstr ""
|
1165 |
+
"Choisissez les fonctionnalités Premium que vous souhaitez utiliser sur votre "
|
1166 |
"site."
|
1167 |
|
1168 |
#: templates/admin/settings/features.php:52
|
1169 |
msgid "Adjustable Servings"
|
1170 |
+
msgstr "Proportions ajustables"
|
1171 |
|
1172 |
#: templates/admin/settings/features.php:58
|
1173 |
msgid "Visitors can adjust the serving size of your recipes"
|
1174 |
+
msgstr "Les visiteurs peuvent changer les proportions sur les recettes"
|
1175 |
|
1176 |
#: templates/admin/settings.php:16
|
1177 |
msgid "Appearance"
|
1181 |
msgid "WP Recipe Maker Settings"
|
1182 |
msgstr "Paramétrages WP Recipe Maker"
|
1183 |
|
1184 |
+
#: templates/recipe/simple/simple.php:26
|
1185 |
#: templates/recipe/tastefully-simple/tastefully-simple.php:26
|
1186 |
msgid "Print"
|
1187 |
msgstr "Imprimer"
|
1209 |
#. Author URI of the plugin/theme
|
1210 |
msgid "http://bootstrapped.ventures/"
|
1211 |
msgstr "http://bootstrapped.ventures/"
|
1212 |
+
|
languages/wp-recipe-maker.pot
CHANGED
@@ -5,7 +5,7 @@ msgid ""
|
|
5 |
msgstr ""
|
6 |
"Project-Id-Version: WP Recipe Maker 1.10.1\n"
|
7 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-recipe-maker\n"
|
8 |
-
"POT-Creation-Date: 2021-
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -313,6 +313,7 @@ msgstr ""
|
|
313 |
msgid "Adjustable Servings"
|
314 |
msgstr ""
|
315 |
|
|
|
316 |
#: templates/settings/group-metadata.php:84
|
317 |
#: templates/settings/group-recipe-print.php:165
|
318 |
#: templates/settings/structure.php:91
|
@@ -440,7 +441,7 @@ msgstr ""
|
|
440 |
msgid "Allow your visitors to submit their own recipes to your website."
|
441 |
msgstr ""
|
442 |
|
443 |
-
#: templates/settings/group-recipe-ratings.php:
|
444 |
msgid "Always redirect to the comment form"
|
445 |
msgstr ""
|
446 |
|
@@ -506,11 +507,11 @@ msgstr ""
|
|
506 |
msgid "Archive Page Links"
|
507 |
msgstr ""
|
508 |
|
509 |
-
#: templates/settings/group-post-type.php:
|
510 |
msgid "Archive Pages"
|
511 |
msgstr ""
|
512 |
|
513 |
-
#: templates/settings/group-post-type.php:
|
514 |
msgid "Archive Pages Template"
|
515 |
msgstr ""
|
516 |
|
@@ -914,6 +915,10 @@ msgstr ""
|
|
914 |
msgid "Comment Ratings"
|
915 |
msgstr ""
|
916 |
|
|
|
|
|
|
|
|
|
917 |
#: templates/admin/translations.php:399
|
918 |
msgid "comments"
|
919 |
msgstr ""
|
@@ -926,10 +931,25 @@ msgstr ""
|
|
926 |
msgid "Convert decimal numbers to fractions after adjusting."
|
927 |
msgstr ""
|
928 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
929 |
#: templates/admin/translations.php:406
|
930 |
msgid "Converted Ingredients"
|
931 |
msgstr ""
|
932 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
933 |
#: templates/admin/translations.php:116
|
934 |
#: includes/public/deprecated/class-wprm-template-helper.php:49
|
935 |
#: includes/public/shortcodes/recipe/class-wprm-sc-meta-container.php:345
|
@@ -1029,7 +1049,8 @@ msgstr ""
|
|
1029 |
msgid "Custom Fields"
|
1030 |
msgstr ""
|
1031 |
|
1032 |
-
#: templates/settings/group-recipe-snippets.php:168
|
|
|
1033 |
msgid "Custom Hash"
|
1034 |
msgstr ""
|
1035 |
|
@@ -1145,6 +1166,14 @@ msgstr ""
|
|
1145 |
msgid "Decimal"
|
1146 |
msgstr ""
|
1147 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1148 |
#: templates/settings/group-template-legacy.php:108
|
1149 |
#: templates/settings/group-template-legacy.php:134
|
1150 |
msgid "Decimal with leading zero"
|
@@ -1585,6 +1614,10 @@ msgstr ""
|
|
1585 |
msgid "Enable Analytics"
|
1586 |
msgstr ""
|
1587 |
|
|
|
|
|
|
|
|
|
1588 |
#: templates/settings/group-links.php:46
|
1589 |
msgid "Enable for Equipment"
|
1590 |
msgstr ""
|
@@ -1641,11 +1674,17 @@ msgid ""
|
|
1641 |
"#recipe instead of something like #wprm-recipe-container-46783"
|
1642 |
msgstr ""
|
1643 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1644 |
#: templates/settings/group-recipe-print.php:170
|
1645 |
msgid "Enable to open links to the print page in a new tab."
|
1646 |
msgstr ""
|
1647 |
|
1648 |
-
#: templates/settings/group-post-type.php:
|
1649 |
msgid ""
|
1650 |
"Enable to show the default WordPress UI for any taxonomies that have their "
|
1651 |
"archive pages enabled on the WP Recipe Maker > Manage > Your Custom Fields "
|
@@ -1794,6 +1833,7 @@ msgstr ""
|
|
1794 |
msgid "Finding Ratings"
|
1795 |
msgstr ""
|
1796 |
|
|
|
1797 |
#: templates/admin/menu/tools/finding-parents.php:20
|
1798 |
#: templates/admin/menu/tools/refresh-video-metadata.php:19
|
1799 |
#: templates/admin/menu/tools/wpurp-ingredients.php:31
|
@@ -1894,7 +1934,7 @@ msgid ""
|
|
1894 |
"on the print page."
|
1895 |
msgstr ""
|
1896 |
|
1897 |
-
#: templates/settings/group-recipe-ratings.php:
|
1898 |
msgid "Force people to leave a comment"
|
1899 |
msgstr ""
|
1900 |
|
@@ -1906,7 +1946,7 @@ msgstr ""
|
|
1906 |
msgid "Force video ratio"
|
1907 |
msgstr ""
|
1908 |
|
1909 |
-
#: templates/settings/group-recipe-ratings.php:
|
1910 |
msgid "Force visitors to leave a comment"
|
1911 |
msgstr ""
|
1912 |
|
@@ -2061,7 +2101,7 @@ msgstr ""
|
|
2061 |
msgid "Halal"
|
2062 |
msgstr ""
|
2063 |
|
2064 |
-
#: templates/settings/group-post-type.php:
|
2065 |
msgid "Handle Archive Pages Output"
|
2066 |
msgstr ""
|
2067 |
|
@@ -2103,6 +2143,12 @@ msgid ""
|
|
2103 |
"URL after clicking the \"Jump to Recipe\" button."
|
2104 |
msgstr ""
|
2105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
2106 |
#: templates/settings/group-template-legacy.php:186
|
2107 |
msgid "Header Color"
|
2108 |
msgstr ""
|
@@ -2202,7 +2248,7 @@ msgstr ""
|
|
2202 |
msgid "hrs"
|
2203 |
msgstr ""
|
2204 |
|
2205 |
-
#: templates/settings/group-recipe-ratings.php:
|
2206 |
msgid "HTML Element to scroll to"
|
2207 |
msgstr ""
|
2208 |
|
@@ -2234,19 +2280,19 @@ msgstr ""
|
|
2234 |
msgid "If there is a parent post for the recipe, link to that parent"
|
2235 |
msgstr ""
|
2236 |
|
2237 |
-
#: templates/settings/group-recipe-ratings.php:
|
2238 |
msgid "If they want to give 1 star"
|
2239 |
msgstr ""
|
2240 |
|
2241 |
-
#: templates/settings/group-recipe-ratings.php:
|
2242 |
msgid "If they want to give 2 stars or less"
|
2243 |
msgstr ""
|
2244 |
|
2245 |
-
#: templates/settings/group-recipe-ratings.php:
|
2246 |
msgid "If they want to give 3 stars or less"
|
2247 |
msgstr ""
|
2248 |
|
2249 |
-
#: templates/settings/group-recipe-ratings.php:
|
2250 |
msgid "If they want to give 4 stars or less"
|
2251 |
msgstr ""
|
2252 |
|
@@ -2348,6 +2394,10 @@ msgstr ""
|
|
2348 |
msgid "Import recipes from other plugins"
|
2349 |
msgstr ""
|
2350 |
|
|
|
|
|
|
|
|
|
2351 |
#: templates/admin/menu/import/import-recipes.php:85
|
2352 |
msgid "Import Selected Recipes"
|
2353 |
msgstr ""
|
@@ -2399,6 +2449,10 @@ msgid ""
|
|
2399 |
"everything converts properly."
|
2400 |
msgstr ""
|
2401 |
|
|
|
|
|
|
|
|
|
2402 |
#: templates/admin/menu/tools/wpurp-ingredients.php:26
|
2403 |
#: templates/admin/menu/tools/wpurp-nutrition.php:14
|
2404 |
msgid "Importing WP Ultimate Recipe Ingredients"
|
@@ -2866,6 +2920,10 @@ msgstr ""
|
|
2866 |
msgid "Media"
|
2867 |
msgstr ""
|
2868 |
|
|
|
|
|
|
|
|
|
2869 |
#: includes/public/class-wprm-taxonomies.php:216
|
2870 |
msgid "Mediterranean"
|
2871 |
msgstr ""
|
@@ -2998,7 +3056,7 @@ msgstr ""
|
|
2998 |
msgid "Name of post author"
|
2999 |
msgstr ""
|
3000 |
|
3001 |
-
#: templates/settings/group-recipe-ratings.php:
|
3002 |
msgid "Never, allow any user rating"
|
3003 |
msgstr ""
|
3004 |
|
@@ -3033,7 +3091,7 @@ msgstr ""
|
|
3033 |
msgid "no parent post found"
|
3034 |
msgstr ""
|
3035 |
|
3036 |
-
#: includes/public/class-wprm-comment-rating.php:
|
3037 |
msgid "No rating was given in this comment."
|
3038 |
msgstr ""
|
3039 |
|
@@ -3220,7 +3278,7 @@ msgid ""
|
|
3220 |
"the following placeholders:"
|
3221 |
msgstr ""
|
3222 |
|
3223 |
-
#: templates/settings/group-recipe-ratings.php:
|
3224 |
msgid ""
|
3225 |
"Optionally set a custom HTML element to scroll to. Can be useful when using "
|
3226 |
"lazy loading your comments, for example."
|
@@ -3435,12 +3493,12 @@ msgstr ""
|
|
3435 |
msgid "Post Type & Taxonomies"
|
3436 |
msgstr ""
|
3437 |
|
3438 |
-
#: includes/public/class-wprm-post-type.php:
|
3439 |
msgctxt "post type general name"
|
3440 |
msgid "Recipes"
|
3441 |
msgstr ""
|
3442 |
|
3443 |
-
#: includes/public/class-wprm-post-type.php:
|
3444 |
msgctxt "post type singular name"
|
3445 |
msgid "Recipe"
|
3446 |
msgstr ""
|
@@ -3681,7 +3739,7 @@ msgstr ""
|
|
3681 |
msgid "Recipe Print CSS"
|
3682 |
msgstr ""
|
3683 |
|
3684 |
-
#: includes/public/class-wprm-comment-rating.php:
|
3685 |
#: templates/settings/group-recipe-ratings.php:135
|
3686 |
#: includes/public/deprecated/class-wprm-template-helper.php:58
|
3687 |
msgid "Recipe Rating"
|
@@ -3775,7 +3833,7 @@ msgstr ""
|
|
3775 |
msgid "Redirect to parent post"
|
3776 |
msgstr ""
|
3777 |
|
3778 |
-
#: templates/settings/group-recipe-ratings.php:
|
3779 |
msgid ""
|
3780 |
"Redirect visitors to the comment form instead of allowing them to vote by "
|
3781 |
"just clicking."
|
@@ -4006,6 +4064,7 @@ msgid_plural "Searching %d ratings"
|
|
4006 |
msgstr[0] ""
|
4007 |
msgstr[1] ""
|
4008 |
|
|
|
4009 |
#: templates/admin/menu/tools/refresh-video-metadata.php:15
|
4010 |
#: templates/admin/menu/tools/finding-ratings.php:18
|
4011 |
#, php-format
|
@@ -4142,7 +4201,7 @@ msgstr ""
|
|
4142 |
msgid "Show All"
|
4143 |
msgstr ""
|
4144 |
|
4145 |
-
#: templates/settings/group-post-type.php:
|
4146 |
msgid "Show default WordPress UI"
|
4147 |
msgstr ""
|
4148 |
|
@@ -4352,13 +4411,13 @@ msgstr ""
|
|
4352 |
msgid "tablespoons"
|
4353 |
msgstr ""
|
4354 |
|
4355 |
-
#: templates/settings/group-post-type.php:
|
4356 |
msgid ""
|
4357 |
"Take control of the output for recipe archive pages. Disable to let your "
|
4358 |
"theme handle things."
|
4359 |
msgstr ""
|
4360 |
|
4361 |
-
#: templates/settings/group-post-type.php:
|
4362 |
#: includes/admin/menu/class-wprm-admin-menu.php:74
|
4363 |
#: includes/admin/menu/class-wprm-admin-menu.php:74
|
4364 |
msgid "Taxonomies"
|
@@ -4482,7 +4541,7 @@ msgstr ""
|
|
4482 |
msgid "Template Options"
|
4483 |
msgstr ""
|
4484 |
|
4485 |
-
#: templates/settings/group-post-type.php:
|
4486 |
msgid "Template to output on recipe archive pages."
|
4487 |
msgstr ""
|
4488 |
|
@@ -4521,6 +4580,20 @@ msgstr ""
|
|
4521 |
msgid "Text to output"
|
4522 |
msgstr ""
|
4523 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4524 |
#: templates/settings/group-template-mode.php:23
|
4525 |
#: templates/settings/group-legacy.php:21
|
4526 |
msgid ""
|
@@ -4863,10 +4936,22 @@ msgstr ""
|
|
4863 |
msgid "Use Custom Hash for First Recipe on Page"
|
4864 |
msgstr ""
|
4865 |
|
|
|
|
|
|
|
|
|
4866 |
#: templates/settings/group-custom-style.php:19
|
4867 |
msgid "Use Custom Styling"
|
4868 |
msgstr ""
|
4869 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4870 |
#: includes/admin/class-wprm-modal.php:236
|
4871 |
#: includes/admin/class-wprm-modal.php:268
|
4872 |
#: includes/admin/class-wprm-modal.php:300
|
@@ -4966,6 +5051,10 @@ msgstr ""
|
|
4966 |
msgid "Use Symbols"
|
4967 |
msgstr ""
|
4968 |
|
|
|
|
|
|
|
|
|
4969 |
#: templates/settings/group-recipe-snippets.php:18
|
4970 |
#: templates/settings/group-recipe-snippets.php:91
|
4971 |
msgid ""
|
@@ -5362,7 +5451,7 @@ msgid ""
|
|
5362 |
"You don't have the servings field set for your recipe under \"General\"."
|
5363 |
msgstr ""
|
5364 |
|
5365 |
-
#: templates/settings/group-recipe-ratings.php:
|
5366 |
msgid "You need to enable the Comment Ratings feature to use this option."
|
5367 |
msgstr ""
|
5368 |
|
5 |
msgstr ""
|
6 |
"Project-Id-Version: WP Recipe Maker 1.10.1\n"
|
7 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-recipe-maker\n"
|
8 |
+
"POT-Creation-Date: 2021-08-17 09:44+0000\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
313 |
msgid "Adjustable Servings"
|
314 |
msgstr ""
|
315 |
|
316 |
+
#: templates/settings/group-adjustable-servings.php:106
|
317 |
#: templates/settings/group-metadata.php:84
|
318 |
#: templates/settings/group-recipe-print.php:165
|
319 |
#: templates/settings/structure.php:91
|
441 |
msgid "Allow your visitors to submit their own recipes to your website."
|
442 |
msgstr ""
|
443 |
|
444 |
+
#: templates/settings/group-recipe-ratings.php:181
|
445 |
msgid "Always redirect to the comment form"
|
446 |
msgstr ""
|
447 |
|
507 |
msgid "Archive Page Links"
|
508 |
msgstr ""
|
509 |
|
510 |
+
#: templates/settings/group-post-type.php:102
|
511 |
msgid "Archive Pages"
|
512 |
msgstr ""
|
513 |
|
514 |
+
#: templates/settings/group-post-type.php:113
|
515 |
msgid "Archive Pages Template"
|
516 |
msgstr ""
|
517 |
|
915 |
msgid "Comment Ratings"
|
916 |
msgstr ""
|
917 |
|
918 |
+
#: templates/settings/group-post-type.php:78
|
919 |
+
msgid "Comments"
|
920 |
+
msgstr ""
|
921 |
+
|
922 |
#: templates/admin/translations.php:399
|
923 |
msgid "comments"
|
924 |
msgstr ""
|
931 |
msgid "Convert decimal numbers to fractions after adjusting."
|
932 |
msgstr ""
|
933 |
|
934 |
+
#: templates/admin/tools.php:140
|
935 |
+
msgid "Convert Reviews"
|
936 |
+
msgstr ""
|
937 |
+
|
938 |
+
#: templates/admin/tools.php:143
|
939 |
+
msgid "Convert Reviews to Comments"
|
940 |
+
msgstr ""
|
941 |
+
|
942 |
#: templates/admin/translations.php:406
|
943 |
msgid "Converted Ingredients"
|
944 |
msgstr ""
|
945 |
|
946 |
+
#: templates/admin/tools.php:145
|
947 |
+
msgid ""
|
948 |
+
"Converts MV Create reviews to regular comments with a comment rating. Will "
|
949 |
+
"only do this after recipes have been imported to WPRM. Comments will be "
|
950 |
+
"created for the parent post of the WPRM recipe."
|
951 |
+
msgstr ""
|
952 |
+
|
953 |
#: templates/admin/translations.php:116
|
954 |
#: includes/public/deprecated/class-wprm-template-helper.php:49
|
955 |
#: includes/public/shortcodes/recipe/class-wprm-sc-meta-container.php:345
|
1049 |
msgid "Custom Fields"
|
1050 |
msgstr ""
|
1051 |
|
1052 |
+
#: templates/settings/group-recipe-snippets.php:168
|
1053 |
+
#: templates/settings/group-recipe-snippets.php:189
|
1054 |
msgid "Custom Hash"
|
1055 |
msgstr ""
|
1056 |
|
1166 |
msgid "Decimal"
|
1167 |
msgstr ""
|
1168 |
|
1169 |
+
#: templates/settings/group-adjustable-servings.php:110
|
1170 |
+
msgid "Decimal Separator"
|
1171 |
+
msgstr ""
|
1172 |
+
|
1173 |
+
#: templates/settings/group-adjustable-servings.php:111
|
1174 |
+
msgid "Decimal separator to use after adjusting values."
|
1175 |
+
msgstr ""
|
1176 |
+
|
1177 |
#: templates/settings/group-template-legacy.php:108
|
1178 |
#: templates/settings/group-template-legacy.php:134
|
1179 |
msgid "Decimal with leading zero"
|
1614 |
msgid "Enable Analytics"
|
1615 |
msgstr ""
|
1616 |
|
1617 |
+
#: templates/settings/group-post-type.php:79
|
1618 |
+
msgid "Enable comments for the recipe post type."
|
1619 |
+
msgstr ""
|
1620 |
+
|
1621 |
#: templates/settings/group-links.php:46
|
1622 |
msgid "Enable for Equipment"
|
1623 |
msgstr ""
|
1674 |
"#recipe instead of something like #wprm-recipe-container-46783"
|
1675 |
msgstr ""
|
1676 |
|
1677 |
+
#: templates/settings/group-recipe-snippets.php:183
|
1678 |
+
msgid ""
|
1679 |
+
"Enable to have the \"Jump to Video\" button in the snippet template jump to "
|
1680 |
+
"#recipe-video instead of something like #wprm-recipe-video-container-46783"
|
1681 |
+
msgstr ""
|
1682 |
+
|
1683 |
#: templates/settings/group-recipe-print.php:170
|
1684 |
msgid "Enable to open links to the print page in a new tab."
|
1685 |
msgstr ""
|
1686 |
|
1687 |
+
#: templates/settings/group-post-type.php:95
|
1688 |
msgid ""
|
1689 |
"Enable to show the default WordPress UI for any taxonomies that have their "
|
1690 |
"archive pages enabled on the WP Recipe Maker > Manage > Your Custom Fields "
|
1833 |
msgid "Finding Ratings"
|
1834 |
msgstr ""
|
1835 |
|
1836 |
+
#: templates/admin/menu/tools/create-reviews.php:20
|
1837 |
#: templates/admin/menu/tools/finding-parents.php:20
|
1838 |
#: templates/admin/menu/tools/refresh-video-metadata.php:19
|
1839 |
#: templates/admin/menu/tools/wpurp-ingredients.php:31
|
1934 |
"on the print page."
|
1935 |
msgstr ""
|
1936 |
|
1937 |
+
#: templates/settings/group-recipe-ratings.php:161
|
1938 |
msgid "Force people to leave a comment"
|
1939 |
msgstr ""
|
1940 |
|
1946 |
msgid "Force video ratio"
|
1947 |
msgstr ""
|
1948 |
|
1949 |
+
#: templates/settings/group-recipe-ratings.php:172
|
1950 |
msgid "Force visitors to leave a comment"
|
1951 |
msgstr ""
|
1952 |
|
2101 |
msgid "Halal"
|
2102 |
msgstr ""
|
2103 |
|
2104 |
+
#: templates/settings/group-post-type.php:106
|
2105 |
msgid "Handle Archive Pages Output"
|
2106 |
msgstr ""
|
2107 |
|
2143 |
"URL after clicking the \"Jump to Recipe\" button."
|
2144 |
msgstr ""
|
2145 |
|
2146 |
+
#: templates/settings/group-recipe-snippets.php:190
|
2147 |
+
msgid ""
|
2148 |
+
"Hash to use for the first video on the page. This will become part of the "
|
2149 |
+
"URL after clicking the \"Jump to Recipe\" button."
|
2150 |
+
msgstr ""
|
2151 |
+
|
2152 |
#: templates/settings/group-template-legacy.php:186
|
2153 |
msgid "Header Color"
|
2154 |
msgstr ""
|
2248 |
msgid "hrs"
|
2249 |
msgstr ""
|
2250 |
|
2251 |
+
#: templates/settings/group-recipe-ratings.php:191
|
2252 |
msgid "HTML Element to scroll to"
|
2253 |
msgstr ""
|
2254 |
|
2280 |
msgid "If there is a parent post for the recipe, link to that parent"
|
2281 |
msgstr ""
|
2282 |
|
2283 |
+
#: templates/settings/group-recipe-ratings.php:177
|
2284 |
msgid "If they want to give 1 star"
|
2285 |
msgstr ""
|
2286 |
|
2287 |
+
#: templates/settings/group-recipe-ratings.php:178
|
2288 |
msgid "If they want to give 2 stars or less"
|
2289 |
msgstr ""
|
2290 |
|
2291 |
+
#: templates/settings/group-recipe-ratings.php:179
|
2292 |
msgid "If they want to give 3 stars or less"
|
2293 |
msgstr ""
|
2294 |
|
2295 |
+
#: templates/settings/group-recipe-ratings.php:180
|
2296 |
msgid "If they want to give 4 stars or less"
|
2297 |
msgstr ""
|
2298 |
|
2394 |
msgid "Import recipes from other plugins"
|
2395 |
msgstr ""
|
2396 |
|
2397 |
+
#: templates/admin/menu/tools/create-reviews.php:15
|
2398 |
+
msgid "Import Reviews"
|
2399 |
+
msgstr ""
|
2400 |
+
|
2401 |
#: templates/admin/menu/import/import-recipes.php:85
|
2402 |
msgid "Import Selected Recipes"
|
2403 |
msgstr ""
|
2449 |
"everything converts properly."
|
2450 |
msgstr ""
|
2451 |
|
2452 |
+
#: includes/admin/tools/class-wprm-tools-create-reviews.php:38
|
2453 |
+
msgid "Importing Reviews"
|
2454 |
+
msgstr ""
|
2455 |
+
|
2456 |
#: templates/admin/menu/tools/wpurp-ingredients.php:26
|
2457 |
#: templates/admin/menu/tools/wpurp-nutrition.php:14
|
2458 |
msgid "Importing WP Ultimate Recipe Ingredients"
|
2920 |
msgid "Media"
|
2921 |
msgstr ""
|
2922 |
|
2923 |
+
#: templates/admin/tools.php:135
|
2924 |
+
msgid "Mediavine Create Migration"
|
2925 |
+
msgstr ""
|
2926 |
+
|
2927 |
#: includes/public/class-wprm-taxonomies.php:216
|
2928 |
msgid "Mediterranean"
|
2929 |
msgstr ""
|
3056 |
msgid "Name of post author"
|
3057 |
msgstr ""
|
3058 |
|
3059 |
+
#: templates/settings/group-recipe-ratings.php:176
|
3060 |
msgid "Never, allow any user rating"
|
3061 |
msgstr ""
|
3062 |
|
3091 |
msgid "no parent post found"
|
3092 |
msgstr ""
|
3093 |
|
3094 |
+
#: includes/public/class-wprm-comment-rating.php:309
|
3095 |
msgid "No rating was given in this comment."
|
3096 |
msgstr ""
|
3097 |
|
3278 |
"the following placeholders:"
|
3279 |
msgstr ""
|
3280 |
|
3281 |
+
#: templates/settings/group-recipe-ratings.php:192
|
3282 |
msgid ""
|
3283 |
"Optionally set a custom HTML element to scroll to. Can be useful when using "
|
3284 |
"lazy loading your comments, for example."
|
3493 |
msgid "Post Type & Taxonomies"
|
3494 |
msgstr ""
|
3495 |
|
3496 |
+
#: includes/public/class-wprm-post-type.php:41
|
3497 |
msgctxt "post type general name"
|
3498 |
msgid "Recipes"
|
3499 |
msgstr ""
|
3500 |
|
3501 |
+
#: includes/public/class-wprm-post-type.php:42
|
3502 |
msgctxt "post type singular name"
|
3503 |
msgid "Recipe"
|
3504 |
msgstr ""
|
3739 |
msgid "Recipe Print CSS"
|
3740 |
msgstr ""
|
3741 |
|
3742 |
+
#: includes/public/class-wprm-comment-rating.php:296
|
3743 |
#: templates/settings/group-recipe-ratings.php:135
|
3744 |
#: includes/public/deprecated/class-wprm-template-helper.php:58
|
3745 |
msgid "Recipe Rating"
|
3833 |
msgid "Redirect to parent post"
|
3834 |
msgstr ""
|
3835 |
|
3836 |
+
#: templates/settings/group-recipe-ratings.php:173
|
3837 |
msgid ""
|
3838 |
"Redirect visitors to the comment form instead of allowing them to vote by "
|
3839 |
"just clicking."
|
4064 |
msgstr[0] ""
|
4065 |
msgstr[1] ""
|
4066 |
|
4067 |
+
#: templates/admin/menu/tools/create-reviews.php:16
|
4068 |
#: templates/admin/menu/tools/refresh-video-metadata.php:15
|
4069 |
#: templates/admin/menu/tools/finding-ratings.php:18
|
4070 |
#, php-format
|
4201 |
msgid "Show All"
|
4202 |
msgstr ""
|
4203 |
|
4204 |
+
#: templates/settings/group-post-type.php:94
|
4205 |
msgid "Show default WordPress UI"
|
4206 |
msgstr ""
|
4207 |
|
4411 |
msgid "tablespoons"
|
4412 |
msgstr ""
|
4413 |
|
4414 |
+
#: templates/settings/group-post-type.php:107
|
4415 |
msgid ""
|
4416 |
"Take control of the output for recipe archive pages. Disable to let your "
|
4417 |
"theme handle things."
|
4418 |
msgstr ""
|
4419 |
|
4420 |
+
#: templates/settings/group-post-type.php:90
|
4421 |
#: includes/admin/menu/class-wprm-admin-menu.php:74
|
4422 |
#: includes/admin/menu/class-wprm-admin-menu.php:74
|
4423 |
msgid "Taxonomies"
|
4541 |
msgid "Template Options"
|
4542 |
msgstr ""
|
4543 |
|
4544 |
+
#: templates/settings/group-post-type.php:114
|
4545 |
msgid "Template to output on recipe archive pages."
|
4546 |
msgstr ""
|
4547 |
|
4580 |
msgid "Text to output"
|
4581 |
msgstr ""
|
4582 |
|
4583 |
+
#: templates/settings/group-recipe-ratings.php:157
|
4584 |
+
msgid "Thank you for voting!"
|
4585 |
+
msgstr ""
|
4586 |
+
|
4587 |
+
#: templates/settings/group-recipe-ratings.php:153
|
4588 |
+
msgid "Thank You Message"
|
4589 |
+
msgstr ""
|
4590 |
+
|
4591 |
+
#: templates/settings/group-recipe-ratings.php:154
|
4592 |
+
msgid ""
|
4593 |
+
"Thank you message to show after clicking on the stars. Make empty to not "
|
4594 |
+
"show anything."
|
4595 |
+
msgstr ""
|
4596 |
+
|
4597 |
#: templates/settings/group-template-mode.php:23
|
4598 |
#: templates/settings/group-legacy.php:21
|
4599 |
msgid ""
|
4936 |
msgid "Use Custom Hash for First Recipe on Page"
|
4937 |
msgstr ""
|
4938 |
|
4939 |
+
#: templates/settings/group-recipe-snippets.php:182
|
4940 |
+
msgid "Use Custom Hash for First Video on Page"
|
4941 |
+
msgstr ""
|
4942 |
+
|
4943 |
#: templates/settings/group-custom-style.php:19
|
4944 |
msgid "Use Custom Styling"
|
4945 |
msgstr ""
|
4946 |
|
4947 |
+
#: templates/settings/group-adjustable-servings.php:115
|
4948 |
+
msgid "Use decimal comma - 0,5"
|
4949 |
+
msgstr ""
|
4950 |
+
|
4951 |
+
#: templates/settings/group-adjustable-servings.php:114
|
4952 |
+
msgid "Use decimal point - 0.5"
|
4953 |
+
msgstr ""
|
4954 |
+
|
4955 |
#: includes/admin/class-wprm-modal.php:236
|
4956 |
#: includes/admin/class-wprm-modal.php:268
|
4957 |
#: includes/admin/class-wprm-modal.php:300
|
5051 |
msgid "Use Symbols"
|
5052 |
msgstr ""
|
5053 |
|
5054 |
+
#: includes/public/shortcodes/general/class-wprm-sc-jump-to-comments.php:45
|
5055 |
+
msgid "Use the %comments% placeholder to show the number of comments."
|
5056 |
+
msgstr ""
|
5057 |
+
|
5058 |
#: templates/settings/group-recipe-snippets.php:18
|
5059 |
#: templates/settings/group-recipe-snippets.php:91
|
5060 |
msgid ""
|
5451 |
"You don't have the servings field set for your recipe under \"General\"."
|
5452 |
msgstr ""
|
5453 |
|
5454 |
+
#: templates/settings/group-recipe-ratings.php:162
|
5455 |
msgid "You need to enable the Comment Ratings feature to use this option."
|
5456 |
msgstr ""
|
5457 |
|
news.json
CHANGED
@@ -1,5 +1,17 @@
|
|
1 |
{
|
2 |
"news": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
{
|
4 |
"date": "2021-07-14",
|
5 |
"label": "Release",
|
1 |
{
|
2 |
"news": [
|
3 |
+
{
|
4 |
+
"date": "2021-08-17",
|
5 |
+
"label": "Release",
|
6 |
+
"title": "WP Recipe Maker 7.5.0",
|
7 |
+
"url": "https://bootstrapped.ventures/wp-recipe-maker-7-5-0/"
|
8 |
+
},
|
9 |
+
{
|
10 |
+
"date": "2021-07-26",
|
11 |
+
"label": "Blog",
|
12 |
+
"title": "Affiliate Marketing for Food Bloggers: What You Need to Know, Plus Do’s and Don’ts",
|
13 |
+
"url": "https://bootstrapped.ventures/affiliate-marketing-for-food-bloggers/"
|
14 |
+
},
|
15 |
{
|
16 |
"date": "2021-07-14",
|
17 |
"label": "Release",
|
readme.txt
CHANGED
@@ -36,6 +36,7 @@ An overview of WP Recipe Maker features:
|
|
36 |
* Option to **disable metadata per recipe** if you want to publish non-food or DIY recipes
|
37 |
* Compatible with **Pinterest Rich Pins** and a setting to easily opt out
|
38 |
* Outputs ItemList metadata for **Recipe Roundup** posts
|
|
|
39 |
* **Keyboard accessible and AMP compatible ratings** for comments
|
40 |
* Interactive **print recipe** page with room for ads and optional credit to your website
|
41 |
* **Fallback recipe** shows up when the plugin is disabled
|
@@ -131,6 +132,19 @@ Yes! We pride ourselves on offering awesome support and almost always answer sup
|
|
131 |
6. Fully compatible with the Classic Editor.
|
132 |
|
133 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
= 7.4.0 =
|
135 |
* Feature: Associate ingredients with specific instruction steps
|
136 |
* Feature: Dashboard page with latest news
|
@@ -1241,6 +1255,12 @@ Yes! We pride ourselves on offering awesome support and almost always answer sup
|
|
1241 |
* Feature: Fallback recipe when the plugin is disabled
|
1242 |
|
1243 |
== Upgrade notice ==
|
|
|
|
|
|
|
|
|
|
|
|
|
1244 |
= 7.4.0 =
|
1245 |
Some great new features and improvements
|
1246 |
|
36 |
* Option to **disable metadata per recipe** if you want to publish non-food or DIY recipes
|
37 |
* Compatible with **Pinterest Rich Pins** and a setting to easily opt out
|
38 |
* Outputs ItemList metadata for **Recipe Roundup** posts
|
39 |
+
* **Associate ingredients with instructions** to have them show up exactly where needed
|
40 |
* **Keyboard accessible and AMP compatible ratings** for comments
|
41 |
* Interactive **print recipe** page with room for ads and optional credit to your website
|
42 |
* **Fallback recipe** shows up when the plugin is disabled
|
132 |
6. Fully compatible with the Classic Editor.
|
133 |
|
134 |
== Changelog ==
|
135 |
+
= 7.5.0 =
|
136 |
+
* Feature: Third and half filled stars to better represent the rating
|
137 |
+
* Feature: Custom hash for the jump to video button
|
138 |
+
* Feature: Import MV Create Reviews to comments with ratings
|
139 |
+
* Feature: Enable link for counter block in the template editor
|
140 |
+
* Feature: Show number of comments in jump to comments block
|
141 |
+
* Improvement: Allow comments for public recipe post type
|
142 |
+
* Fix: Prevent HTML from showing up in associated ingredients
|
143 |
+
|
144 |
+
= 7.4.1 =
|
145 |
+
* Fix: Prevent ingredient or instruction dragging issues in some edge cases
|
146 |
+
* Fix: Allow different star rating colors on the same page
|
147 |
+
|
148 |
= 7.4.0 =
|
149 |
* Feature: Associate ingredients with specific instruction steps
|
150 |
* Feature: Dashboard page with latest news
|
1255 |
* Feature: Fallback recipe when the plugin is disabled
|
1256 |
|
1257 |
== Upgrade notice ==
|
1258 |
+
= 7.5.0 =
|
1259 |
+
A few smaller features and improvements
|
1260 |
+
|
1261 |
+
= 7.4.1 =
|
1262 |
+
Two small fixes
|
1263 |
+
|
1264 |
= 7.4.0 =
|
1265 |
Some great new features and improvements
|
1266 |
|
templates/admin/menu/tools/create-reviews.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Template for import MV Create reviews page.
|
4 |
+
*
|
5 |
+
* @link http://bootstrapped.ventures
|
6 |
+
* @since 7.5.0
|
7 |
+
*
|
8 |
+
* @package WP_Recipe_Maker
|
9 |
+
* @subpackage WP_Recipe_Maker/templates/admin/menu/tools
|
10 |
+
*/
|
11 |
+
|
12 |
+
?>
|
13 |
+
|
14 |
+
<div class="wrap wprm-tools">
|
15 |
+
<h2><?php esc_html_e( 'Import Reviews', 'wp-recipe-maker' ); ?></h2>
|
16 |
+
<?php printf( esc_html( _n( 'Searching %d recipe', 'Searching %d recipes', count( $posts ), 'wp-recipe-maker' ) ), count( $posts ) ); ?>.
|
17 |
+
<div id="wprm-tools-progress-container">
|
18 |
+
<div id="wprm-tools-progress-bar"></div>
|
19 |
+
</div>
|
20 |
+
<a href="<?php echo esc_url( admin_url( 'admin.php?page=wprm_manage' ) ); ?>" id="wprm-tools-finished"><?php esc_html_e( 'Finished succesfully. Click here to continue.', 'wp-recipe-maker' ); ?></a>
|
21 |
+
</div>
|
templates/admin/tools.php
CHANGED
@@ -126,4 +126,27 @@
|
|
126 |
</tbody>
|
127 |
</table>
|
128 |
<?php endif; // WP Ultimate Recipe is active. ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
</div>
|
126 |
</tbody>
|
127 |
</table>
|
128 |
<?php endif; // WP Ultimate Recipe is active. ?>
|
129 |
+
<?php
|
130 |
+
global $wpdb;
|
131 |
+
$table = $wpdb->prefix . 'mv_creations';
|
132 |
+
|
133 |
+
if ( $table === $wpdb->get_var( "SHOW TABLES LIKE '$table'" ) ) :
|
134 |
+
?>
|
135 |
+
<h2><?php esc_html_e( 'Mediavine Create Migration', 'wp-recipe-maker' ); ?></h2>
|
136 |
+
<table class="form-table">
|
137 |
+
<tbody>
|
138 |
+
<tr>
|
139 |
+
<th scope="row">
|
140 |
+
<?php esc_html_e( 'Convert Reviews', 'wp-recipe-maker' ); ?>
|
141 |
+
</th>
|
142 |
+
<td>
|
143 |
+
<a href="<?php echo esc_url( admin_url( 'admin.php?page=wprm_create_reviews' ) ); ?>" class="button"><?php esc_html_e( 'Convert Reviews to Comments', 'wp-recipe-maker' ); ?></a>
|
144 |
+
<p class="description">
|
145 |
+
<?php esc_html_e( 'Converts MV Create reviews to regular comments with a comment rating. Will only do this after recipes have been imported to WPRM. Comments will be created for the parent post of the WPRM recipe.', 'wp-recipe-maker' ); ?>
|
146 |
+
</p>
|
147 |
+
</td>
|
148 |
+
</tr>
|
149 |
+
</tbody>
|
150 |
+
</table>
|
151 |
+
<?php endif; // MV Create Reviews exist. ?>
|
152 |
</div>
|
templates/settings/group-adjustable-servings.php
CHANGED
@@ -102,5 +102,21 @@ $adjustable_servings = array(
|
|
102 |
),
|
103 |
),
|
104 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
),
|
106 |
);
|
102 |
),
|
103 |
),
|
104 |
),
|
105 |
+
array(
|
106 |
+
'name' => __( 'Advanced', 'wp-recipe-maker' ),
|
107 |
+
'settings' => array(
|
108 |
+
array(
|
109 |
+
'id' => 'decimal_separator',
|
110 |
+
'name' => __( 'Decimal Separator', 'wp-recipe-maker' ),
|
111 |
+
'description' => __( 'Decimal separator to use after adjusting values.', 'wp-recipe-maker' ),
|
112 |
+
'type' => 'dropdown',
|
113 |
+
'options' => array(
|
114 |
+
'point' => __( 'Use decimal point - 0.5', 'wp-recipe-maker' ),
|
115 |
+
'comma' => __( 'Use decimal comma - 0,5', 'wp-recipe-maker' ),
|
116 |
+
),
|
117 |
+
'default' => 'point',
|
118 |
+
),
|
119 |
+
),
|
120 |
+
),
|
121 |
),
|
122 |
);
|
templates/settings/group-post-type.php
CHANGED
@@ -73,6 +73,17 @@ $post_type = array(
|
|
73 |
'value' => 'public',
|
74 |
),
|
75 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
),
|
77 |
),
|
78 |
array(
|
73 |
'value' => 'public',
|
74 |
),
|
75 |
),
|
76 |
+
array(
|
77 |
+
'id' => 'post_type_comments',
|
78 |
+
'name' => __( 'Comments', 'wp-recipe-maker' ),
|
79 |
+
'description' => __( 'Enable comments for the recipe post type.', 'wp-recipe-maker' ),
|
80 |
+
'type' => 'toggle',
|
81 |
+
'default' => false,
|
82 |
+
'dependency' => array(
|
83 |
+
'id' => 'post_type_structure',
|
84 |
+
'value' => 'public',
|
85 |
+
),
|
86 |
+
),
|
87 |
),
|
88 |
),
|
89 |
array(
|
templates/settings/group-recipe-ratings.php
CHANGED
@@ -148,6 +148,14 @@ $recipe_ratings = array(
|
|
148 |
array(
|
149 |
'name' => __( 'User Ratings', 'wp-recipe-maker' ),
|
150 |
'settings' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
array(
|
152 |
'id' => 'features_comment_ratings',
|
153 |
'name' => __( 'Force people to leave a comment', 'wp-recipe-maker' ),
|
148 |
array(
|
149 |
'name' => __( 'User Ratings', 'wp-recipe-maker' ),
|
150 |
'settings' => array(
|
151 |
+
array(
|
152 |
+
'id' => 'user_ratings_thank_you_message',
|
153 |
+
'name' => __( 'Thank You Message', 'wp-recipe-maker' ),
|
154 |
+
'description' => __( 'Thank you message to show after clicking on the stars. Make empty to not show anything.', 'wp-recipe-maker' ),
|
155 |
+
'type' => 'toggle',
|
156 |
+
'type' => 'text',
|
157 |
+
'default' => __( 'Thank you for voting!', 'wp-recipe-maker' ),
|
158 |
+
),
|
159 |
array(
|
160 |
'id' => 'features_comment_ratings',
|
161 |
'name' => __( 'Force people to leave a comment', 'wp-recipe-maker' ),
|
templates/settings/group-recipe-snippets.php
CHANGED
@@ -177,6 +177,27 @@ $recipe_snippets = array(
|
|
177 |
'value' => true,
|
178 |
),
|
179 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
),
|
181 |
),
|
182 |
),
|
177 |
'value' => true,
|
178 |
),
|
179 |
),
|
180 |
+
array(
|
181 |
+
'id' => 'jump_to_video_use_custom_hash',
|
182 |
+
'name' => __( 'Use Custom Hash for First Video on Page', 'wp-recipe-maker' ),
|
183 |
+
'description' => __( 'Enable to have the "Jump to Video" button in the snippet template jump to #recipe-video instead of something like #wprm-recipe-video-container-46783', 'wp-recipe-maker' ),
|
184 |
+
'type' => 'toggle',
|
185 |
+
'default' => true,
|
186 |
+
),
|
187 |
+
array(
|
188 |
+
'id' => 'jump_to_video_custom_hash',
|
189 |
+
'name' => __( 'Custom Hash', 'wp-recipe-maker' ),
|
190 |
+
'description' => __( 'Hash to use for the first video on the page. This will become part of the URL after clicking the "Jump to Recipe" button.', 'wp-recipe-maker' ),
|
191 |
+
'type' => 'text',
|
192 |
+
'default' => 'recipe-video',
|
193 |
+
'sanitize' => function( $value ) {
|
194 |
+
return preg_replace( '/[^\w\-]/', '', $value );
|
195 |
+
},
|
196 |
+
'dependency' => array(
|
197 |
+
'id' => 'jump_to_video_use_custom_hash',
|
198 |
+
'value' => true,
|
199 |
+
),
|
200 |
+
),
|
201 |
),
|
202 |
),
|
203 |
),
|
wp-recipe-maker.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* Plugin Name: WP Recipe Maker
|
16 |
* Plugin URI: http://bootstrapped.ventures/wp-recipe-maker/
|
17 |
* Description: The easy and user-friendly recipe plugin for everyone. Automatic JSON-LD metadata for better SEO will get you more visitors!
|
18 |
-
* Version: 7.
|
19 |
* Author: Bootstrapped Ventures
|
20 |
* Author URI: http://bootstrapped.ventures/
|
21 |
* License: GPL-2.0+
|
15 |
* Plugin Name: WP Recipe Maker
|
16 |
* Plugin URI: http://bootstrapped.ventures/wp-recipe-maker/
|
17 |
* Description: The easy and user-friendly recipe plugin for everyone. Automatic JSON-LD metadata for better SEO will get you more visitors!
|
18 |
+
* Version: 7.5.0
|
19 |
* Author: Bootstrapped Ventures
|
20 |
* Author URI: http://bootstrapped.ventures/
|
21 |
* License: GPL-2.0+
|