Version Description
- Feature: Change image sizes in settings
- Feature: Recipe placeholders for print credit
- Feature: Change position of the comment rating stars
- Improvement: Easier access to next recipes on import page
- Improvement: change comment rating label
- Improvement: Support unicode units when parsing ingredients
- Improvement: Ability to save empty ingredient and instruction groups
- Improvement: Print shortcode works without JS as well (AMP pages)
- Improvement: Click on SEO indicator to edit recipe
- Fix: Search filter in WP Ultimate Post Grid
- Fix: Saving links for new ingredients in Premium plugin
Download this release
Release Info
Developer | BrechtVds |
Plugin | WP Recipe Maker |
Version | 1.16.0 |
Comparing to | |
See all releases |
Code changes from version 1.15.0 to 1.16.0
- assets/css/admin/modal.min.css +1 -1
- assets/css/admin/modal/_import-text.scss +5 -0
- assets/js/admin/import-text.js +10 -0
- assets/js/admin/import.js +36 -0
- assets/js/admin/manage.js +8 -0
- assets/js/admin/recipe-form.js +7 -13
- includes/admin/class-wprm-recipe-parser.php +1 -1
- includes/admin/class-wprm-recipe-sanitizer.php +7 -7
- includes/admin/manage/class-wprm-manage-recipes.php +1 -1
- includes/class-wp-recipe-maker.php +1 -1
- includes/public/class-wprm-comment-rating.php +1 -1
- includes/public/class-wprm-post-type.php +5 -0
- includes/public/class-wprm-print.php +1 -1
- includes/public/class-wprm-recipe.php +10 -0
- includes/public/class-wprm-settings.php +13 -2
- includes/public/class-wprm-shortcode.php +2 -1
- includes/public/class-wprm-template-helper.php +59 -0
- readme.txt +16 -0
- templates/admin/menu/faq/whats_new.php +15 -0
- templates/admin/menu/import/import-recipes.php +4 -1
- templates/admin/modal/tabs/import-text.php +10 -4
- templates/admin/settings/appearance.php +73 -9
- templates/admin/settings/labels.php +1 -1
- templates/public/comment-rating-form.php +1 -1
- templates/public/comment-rating.php +2 -4
- templates/recipe/clean-print-with-image/clean-print-with-image.php +1 -1
- templates/recipe/simple/simple.php +2 -2
- templates/recipe/tastefully-simple/tastefully-simple.php +2 -2
- wp-recipe-maker.php +1 -1
assets/css/admin/modal.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wprm-frame-title .dashicons,.wprm-frame.hide-router .wprm-frame-router,.wprm-modal-container{display:none}.wprm-giveaway-notice{border:1px solid #006400;background-color:rgba(0,255,0,.15);padding:10px;margin-bottom:10px}.wprm-easyrecipe-warning{display:none;border:1px solid #8b0000;background-color:rgba(255,0,0,.15);padding:10px 10px 0;margin-bottom:10px}.select2_wprm-container{z-index:100075}.select2_wprm-container.select2_wprm-container--focus .select2_wprm-selection{border-color:#5b9dd9}.select2_wprm-container li{margin:0}.select2_wprm-container .select2_wprm-selection{border-color:#ddd}.medium-editor-anchor-preview,.medium-editor-toolbar{z-index:100080}.medium-editor-anchor-preview{font-size:12px}.medium-editor-element{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);min-height:68px;padding:3px 5px}.medium-editor-element:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.medium-editor-element:after{font-style:normal;color:#999;opacity:.5;font-size:14px;line-height:28px}.medium-editor-element p:first-child{margin-top:0}.medium-editor-element p:last-child{margin-bottom:0}.wprm-modal-hint{max-width:400px;margin-bottom:20px}.wprm-modal-hint .wprm-modal-hint-header{font-weight:700;font-variant:small-caps}.wprm-modal-hint .wprm-modal-hint-text{font-style:italic}.wprm-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:100000}.wprm-modal{position:fixed;top:30px;left:30px;right:30px;bottom:30px;z-index:100050}.wprm-modal *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wprm-modal-close{position:absolute;top:0;right:0;width:50px;height:50px;padding:0;z-index:1000;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}.wprm-modal-close .wprm-modal-icon:before{content:"\f158";font:400 20px/1 dashicons;speak:none;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#666}.wprm-modal-content{position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto;min-height:300px;-webkit-box-shadow:0 5px 15px rgba(0,0,0,.7);box-shadow:0 5px 15px rgba(0,0,0,.7);background:#fcfcfc;-webkit-font-smoothing:subpixel-antialiased}.wprm-modal-content ::-webkit-input-placeholder{color:#999;opacity:.5}.wprm-modal-content :-moz-placeholder{color:#999;opacity:.5}.wprm-modal-content ::-moz-placeholder{color:#999;opacity:.5}.wprm-modal-content :-ms-input-placeholder{color:#999;opacity:.5}.wprm-frame{overflow:hidden;right:0}.wprm-frame,.wprm-frame-menu{position:absolute;left:0;bottom:0;top:0}.wprm-frame-menu{width:200px;z-index:150}.wprm-frame-title{top:0;height:50px}.wprm-frame-router,.wprm-frame-title{z-index:200;left:200px;position:absolute;right:0}.wprm-menu-item{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.wprm-menu{position:absolute;left:0;margin:0;padding:10px 0;border-right-width:1px;border-right-style:solid;border-right-color:#ccc;user-select:none}.wprm-menu-hidden{padding:5px 5px 0 10px;font-style:italic}.wprm-menu,.wprm-sidebar{top:0;bottom:0;background:#f3f3f3;right:0}.wprm-menu .active,.wprm-menu .active:hover{color:#23282d;font-weight:700}.wprm-menu>a{display:block;position:relative;padding:8px 20px;margin:0;color:#0073aa}.wprm-frame .hidden,.wprm-frame-content-tab:not(.active),.wprm-router:not(.active){display:none}.wprm-menu>a,.wprm-router>a{line-height:18px;font-size:14px;text-decoration:none}.wprm-frame a{border-bottom:none;color:#0073aa}.wprm-menu .separator{height:0;margin:12px 20px;padding:0;border-top:1px solid #ddd}.wprm-frame-title h1{padding:0 16px;font-size:22px;line-height:50px;margin:0}.wprm-frame-router{top:50px;height:36px}.wprm-router{position:relative;padding:0 6px;margin:0;clear:both;user-select:none}.wprm-router>a{position:relative;float:left;padding:8px 10px 9px;margin:0;height:18px}.wprm-router a{-webkit-transition:none;transition:none}.wprm-router>a:last-child{border-right:0}.wprm-router .active,.wprm-router>a.active:last-child{margin:-1px -1px 0;background:#fff;border:1px solid #ddd;border-bottom:none}.wprm-router .active,.wprm-router .active:hover{color:#32373c}.wprm-frame-content{position:absolute;top:84px;left:200px;right:0;bottom:61px;height:auto;width:auto;margin:0;overflow:auto;background:#fff;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.wprm-frame-toolbar,.wprm-toolbar{position:absolute;right:0;z-index:100;height:60px}.wprm-frame-content-tab{margin:20px}.wprm-frame-toolbar{left:200px;bottom:0}.wprm-toolbar{top:0;left:0;padding:0 16px;border:0 solid #ddd;overflow:hidden}.wprm-modal-content .wprm-toolbar-primary.search-form{width:33%}.wprm-toolbar-primary{float:right;height:100%}.wprm-modal-content .wprm-toolbar-primary .wprm-button{float:right}.wprm-toolbar-primary>.wprm-button,.wprm-toolbar-primary>.wprm-button-group{margin-left:10px;float:left;margin-top:15px}@media only screen and (max-width:900px){.wprm-frame:not(.hide-menu) .wprm-frame-title .dashicons{display:inline-block;line-height:50px}.wprm-frame:not(.hide-menu) .wprm-frame-menu{position:static;width:0}.wprm-frame:not(.hide-menu) .wprm-frame-content,.wprm-frame:not(.hide-menu) .wprm-frame-router,.wprm-frame:not(.hide-menu) .wprm-frame-title,.wprm-frame:not(.hide-menu) .wprm-frame-toolbar,.wprm-frame:not(.hide-menu) .wprm-menu.visible{left:0}.wprm-frame:not(.hide-menu) .wprm-menu{width:auto;max-width:80%;overflow:auto;z-index:2000;top:50px;left:-300px;right:auto;bottom:auto;padding:5px 0;border:1px solid #ccc}.wprm-frame:not(.hide-menu) .wprm-menu>a.active{display:none}.wprm-frame:not(.hide-menu) .wprm-menu>a{padding:12px 16px;font-size:16px}.wprm-frame:not(.hide-menu) .wprm-menu .separator{margin:5px 10px}.wprm-frame:not(.hide-menu) .wprm-frame-title h1{color:#0073aa;line-height:3;font-size:18px;float:left;cursor:pointer}}@media only screen and (max-width:640px),screen and (max-height:400px){.wprm-modal{position:fixed;top:0;left:0;right:0;bottom:0}.wprm-modal .wprm-frame-title{height:40px}}@media only screen and (max-width:480px){.wprm-frame:not(.hide-menu) .wprm-frame-title .dashicons{line-height:40px}.wprm-frame-router,.wprm-frame:not(.hide-menu) .wprm-menu{top:40px}.wprm-frame:not(.hide-menu) .wprm-frame-title h1,.wprm-modal .wprm-frame-title h1{font-size:18px;line-height:40px}.wprm-frame-content{top:74px}}.wprm-recipe-form{max-width:600px}.wprm-recipe-form .wprm-recipe-form-container{margin-bottom:15px;vertical-align:top}.wprm-recipe-form .wprm-recipe-form-container-halfs{display:inline-block;width:50%}.wprm-recipe-form .wprm-recipe-form-container-thirds{display:inline-block;width:33.3%}.wprm-recipe-form label{display:block;font-weight:700;margin-bottom:5px}.wprm-recipe-form input[type=text],.wprm-recipe-form input[type=number]{margin:0;width:100%;max-width:120px;height:34px;line-height:34px}.wprm-recipe-form input[type=text][type=number],.wprm-recipe-form input[type=number][type=number]{max-width:50px}.wprm-recipe-form input[type=text].select2_wprm-search__field,.wprm-recipe-form input[type=number].select2_wprm-search__field{height:18px;line-height:18px}.wprm-recipe-form select{width:100%}.wprm-recipe-form textarea{width:100%;resize:vertical}@media only screen and (max-width:480px){.wprm-recipe-form .wprm-recipe-form-container-halfs,.wprm-recipe-form .wprm-recipe-form-container-thirds{display:block;width:100%}}.wprm-recipe-import-text-form .import-text-buttons{margin-bottom:10px}.wprm-recipe-import-text-form .import-text-step{display:none}.wprm-recipe-import-text-form .import-text-step#import-text-step-input{display:block}.wprm-recipe-import-text-form #import-text-highlight-sandbox,.wprm-recipe-import-text-form .import-text-input{margin-top:10px}.wprm-recipe-import-text-form #import-text-ingredient-groups label,.wprm-recipe-import-text-form #import-text-instruction-groups label{display:inline;font-weight:400}.wprm-loader,.wprm-recipe-ingredients-form table .wprm-recipe-ingredients-placeholder,.wprm-recipe-ingredients-form table .wprm-recipe-instructions-placeholder,.wprm-recipe-instructions-form table .wprm-recipe-ingredients-placeholder,.wprm-recipe-instructions-form table .wprm-recipe-instructions-placeholder{display:none}.wprm-recipe-import-text-form #import-text-highlight-sandbox{display:none;max-height:400px;overflow:scroll;padding:10px;border:1px dashed #999}.wprm-loader,.wprm-loader:after,.wprm-loader:before{border-radius:50%;width:1.5em;height:1.5em;-webkit-animation:load7 1.8s infinite ease-in-out;animation:load7 1.8s infinite ease-in-out}.wprm-loader{color:#444;font-size:10px;margin:20px auto;position:relative;text-indent:-9999em;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation-delay:-.16s;animation-delay:-.16s}.wprm-loader:after,.wprm-loader:before{content:'';position:absolute;top:0}.wprm-loader:before{left:-2.5em;-webkit-animation-delay:-.32s;animation-delay:-.32s}.wprm-loader:after{left:2.5em}@-webkit-keyframes load7{0%,100%,80%{box-shadow:0 2.5em 0 -1.3em}40%{box-shadow:0 2.5em 0 0}}@keyframes load7{0%,100%,80%{box-shadow:0 2.5em 0 -1.3em}40%{box-shadow:0 2.5em 0 0}}.wprm-recipe-details-form input#wprm-recipe-name{max-width:450px}.wprm-recipe-details-form input#wprm-recipe-author-name{max-width:none}.wprm-recipe-details-form input#wprm-recipe-calories{max-width:70px}.wprm-recipe-details-form .wprm-recipe-image-preview{float:right;max-width:100px}.wprm-recipe-details-form .wprm-recipe-image-preview img{max-width:100%;height:auto}.wprm-recipe-details-form .wprm-recipe-summary-container{clear:both}@media only screen and (max-width:480px){.wprm-recipe-details-form .wprm-recipe-image-preview{float:none;margin:10px auto}}.wprm-recipe-ingredients-form,.wprm-recipe-instructions-form{max-width:750px;margin-bottom:15px}.wprm-recipe-ingredients-form input,.wprm-recipe-instructions-form input{margin:0;width:100%;height:34px;line-height:34px}.wprm-recipe-ingredients-form textarea,.wprm-recipe-instructions-form textarea{width:100%;resize:vertical}.wprm-recipe-ingredients-form ::-webkit-input-placeholder,.wprm-recipe-instructions-form ::-webkit-input-placeholder{color:#999;opacity:.5}.wprm-recipe-ingredients-form :-moz-placeholder,.wprm-recipe-instructions-form :-moz-placeholder{color:#999;opacity:.5}.wprm-recipe-ingredients-form ::-moz-placeholder,.wprm-recipe-instructions-form ::-moz-placeholder{color:#999;opacity:.5}.wprm-recipe-ingredients-form :-ms-input-placeholder,.wprm-recipe-instructions-form :-ms-input-placeholder{color:#999;opacity:.5}.wprm-recipe-ingredients-form table,.wprm-recipe-instructions-form table{width:100%}.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th,.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th{text-align:left}.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th:nth-child(1),.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th:nth-child(6),.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th:nth-child(1),.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th:nth-child(6){width:5%;text-align:center}.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th:nth-child(2),.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th:nth-child(2){width:10%}.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th:nth-child(3),.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th:nth-child(3){width:15%}.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th:nth-child(4),.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th:nth-child(4){width:40%}.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th:nth-child(5),.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th:nth-child(5){width:25%}.wprm-recipe-ingredients-form table.wprm-recipe-instructions-container th,.wprm-recipe-instructions-form table.wprm-recipe-instructions-container th{text-align:left}.wprm-recipe-ingredients-form table.wprm-recipe-instructions-container th:nth-child(1),.wprm-recipe-ingredients-form table.wprm-recipe-instructions-container th:nth-child(4),.wprm-recipe-instructions-form table.wprm-recipe-instructions-container th:nth-child(1),.wprm-recipe-instructions-form table.wprm-recipe-instructions-container th:nth-child(4){width:5%;text-align:center}.wprm-recipe-ingredients-form table.wprm-recipe-instructions-container th:nth-child(2),.wprm-recipe-instructions-form table.wprm-recipe-instructions-container th:nth-child(2){width:65%}.wprm-recipe-ingredients-form table.wprm-recipe-instructions-container th:nth-child(3),.wprm-recipe-instructions-form table.wprm-recipe-instructions-container th:nth-child(3){width:25%}.wprm-recipe-ingredients-form table td,.wprm-recipe-instructions-form table td{text-align:left;vertical-align:top}.wprm-recipe-ingredients-form table td:first-child,.wprm-recipe-ingredients-form table td:last-child,.wprm-recipe-instructions-form table td:first-child,.wprm-recipe-instructions-form table td:last-child{text-align:center;vertical-align:middle}.wprm-recipe-ingredients-form .ui-sortable-helper,.wprm-recipe-instructions-form .ui-sortable-helper{display:table}.wprm-recipe-ingredients-form .ui-sortable-helper .wprm-recipe-instruction-text,.wprm-recipe-instructions-form .ui-sortable-helper .wprm-recipe-instruction-text{min-width:200px}.wprm-recipe-ingredients-form .wprm-recipe-ingredients-instructions-sort,.wprm-recipe-instructions-form .wprm-recipe-ingredients-instructions-sort{cursor:move}.wprm-recipe-ingredients-form .wprm-recipe-ingredients-instructions-delete,.wprm-recipe-instructions-form .wprm-recipe-ingredients-instructions-delete{cursor:pointer}.wprm-recipe-ingredients-form .wprm-recipe-ingredients-instructions-delete,.wprm-recipe-ingredients-form .wprm-recipe-ingredients-instructions-sort,.wprm-recipe-instructions-form .wprm-recipe-ingredients-instructions-delete,.wprm-recipe-instructions-form .wprm-recipe-ingredients-instructions-sort{color:#999;opacity:.5}.wprm-recipe-ingredients-form .wprm-recipe-ingredients-instructions-delete:hover,.wprm-recipe-ingredients-form .wprm-recipe-ingredients-instructions-sort:hover,.wprm-recipe-instructions-form .wprm-recipe-ingredients-instructions-delete:hover,.wprm-recipe-instructions-form .wprm-recipe-ingredients-instructions-sort:hover{color:#444;opacity:1}.wprm-recipe-ingredients-form .wprm-recipe-ingredients-actions,.wprm-recipe-ingredients-form .wprm-recipe-instructions-actions,.wprm-recipe-instructions-form .wprm-recipe-ingredients-actions,.wprm-recipe-instructions-form .wprm-recipe-instructions-actions{margin:10px}.wprm-recipe-ingredients-form .wprm-recipe-image-preview,.wprm-recipe-instructions-form .wprm-recipe-image-preview{max-width:75px}.wprm-recipe-ingredients-form .wprm-recipe-image-preview img,.wprm-recipe-instructions-form .wprm-recipe-image-preview img{max-width:100%;height:auto}.wprm-shortcode-builder .wprm-shortcode-builder-container{margin-bottom:15px;vertical-align:top}.wprm-shortcode-builder .wprm-shortcode-builder-container-halfs{display:inline-block;width:50%}.wprm-shortcode-builder .wprm-shortcode-builder-container-thirds{display:inline-block;width:33.3%}.wprm-shortcode-builder label{display:block;font-weight:700;margin-bottom:5px}.wprm-shortcode-builder .wprm-shortcode-builder-helper{margin-left:5px;font-size:.8em;font-style:italic}.wprm-shortcode-builder input{margin:0;width:100%;max-width:250px;height:34px;line-height:34px}.wprm-shortcode-builder input.select2_wprm-search__field{height:18px;line-height:18px}.wprm-shortcode-builder select{width:250px}
|
1 |
+
.wprm-frame-title .dashicons,.wprm-frame.hide-router .wprm-frame-router,.wprm-modal-container{display:none}.wprm-giveaway-notice{border:1px solid #006400;background-color:rgba(0,255,0,.15);padding:10px;margin-bottom:10px}.wprm-easyrecipe-warning{display:none;border:1px solid #8b0000;background-color:rgba(255,0,0,.15);padding:10px 10px 0;margin-bottom:10px}.select2_wprm-container{z-index:100075}.select2_wprm-container.select2_wprm-container--focus .select2_wprm-selection{border-color:#5b9dd9}.select2_wprm-container li{margin:0}.select2_wprm-container .select2_wprm-selection{border-color:#ddd}.medium-editor-anchor-preview,.medium-editor-toolbar{z-index:100080}.medium-editor-anchor-preview{font-size:12px}.medium-editor-element{border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07);min-height:68px;padding:3px 5px}.medium-editor-element:focus{border-color:#5b9dd9;-webkit-box-shadow:0 0 2px rgba(30,140,190,.8);box-shadow:0 0 2px rgba(30,140,190,.8)}.medium-editor-element:after{font-style:normal;color:#999;opacity:.5;font-size:14px;line-height:28px}.medium-editor-element p:first-child{margin-top:0}.medium-editor-element p:last-child{margin-bottom:0}.wprm-modal-hint{max-width:400px;margin-bottom:20px}.wprm-modal-hint .wprm-modal-hint-header{font-weight:700;font-variant:small-caps}.wprm-modal-hint .wprm-modal-hint-text{font-style:italic}.wprm-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:100000}.wprm-modal{position:fixed;top:30px;left:30px;right:30px;bottom:30px;z-index:100050}.wprm-modal *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.wprm-modal-close{position:absolute;top:0;right:0;width:50px;height:50px;padding:0;z-index:1000;-webkit-transition:color .1s ease-in-out,background .1s ease-in-out;transition:color .1s ease-in-out,background .1s ease-in-out}.wprm-modal-close .wprm-modal-icon:before{content:"\f158";font:400 20px/1 dashicons;speak:none;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#666}.wprm-modal-content{position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto;min-height:300px;-webkit-box-shadow:0 5px 15px rgba(0,0,0,.7);box-shadow:0 5px 15px rgba(0,0,0,.7);background:#fcfcfc;-webkit-font-smoothing:subpixel-antialiased}.wprm-modal-content ::-webkit-input-placeholder{color:#999;opacity:.5}.wprm-modal-content :-moz-placeholder{color:#999;opacity:.5}.wprm-modal-content ::-moz-placeholder{color:#999;opacity:.5}.wprm-modal-content :-ms-input-placeholder{color:#999;opacity:.5}.wprm-frame{overflow:hidden;right:0}.wprm-frame,.wprm-frame-menu{position:absolute;left:0;bottom:0;top:0}.wprm-frame-menu{width:200px;z-index:150}.wprm-frame-title{top:0;height:50px}.wprm-frame-router,.wprm-frame-title{z-index:200;left:200px;position:absolute;right:0}.wprm-menu-item{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.wprm-menu{position:absolute;left:0;margin:0;padding:10px 0;border-right-width:1px;border-right-style:solid;border-right-color:#ccc;user-select:none}.wprm-menu-hidden{padding:5px 5px 0 10px;font-style:italic}.wprm-menu,.wprm-sidebar{top:0;bottom:0;background:#f3f3f3;right:0}.wprm-menu .active,.wprm-menu .active:hover{color:#23282d;font-weight:700}.wprm-menu>a{display:block;position:relative;padding:8px 20px;margin:0;color:#0073aa}.wprm-frame .hidden,.wprm-frame-content-tab:not(.active),.wprm-router:not(.active){display:none}.wprm-menu>a,.wprm-router>a{line-height:18px;font-size:14px;text-decoration:none}.wprm-frame a{border-bottom:none;color:#0073aa}.wprm-menu .separator{height:0;margin:12px 20px;padding:0;border-top:1px solid #ddd}.wprm-frame-title h1{padding:0 16px;font-size:22px;line-height:50px;margin:0}.wprm-frame-router{top:50px;height:36px}.wprm-router{position:relative;padding:0 6px;margin:0;clear:both;user-select:none}.wprm-router>a{position:relative;float:left;padding:8px 10px 9px;margin:0;height:18px}.wprm-router a{-webkit-transition:none;transition:none}.wprm-router>a:last-child{border-right:0}.wprm-router .active,.wprm-router>a.active:last-child{margin:-1px -1px 0;background:#fff;border:1px solid #ddd;border-bottom:none}.wprm-router .active,.wprm-router .active:hover{color:#32373c}.wprm-frame-content{position:absolute;top:84px;left:200px;right:0;bottom:61px;height:auto;width:auto;margin:0;overflow:auto;background:#fff;border-top:1px solid #ddd;border-bottom:1px solid #ddd}.wprm-frame-toolbar,.wprm-toolbar{position:absolute;right:0;z-index:100;height:60px}.wprm-frame-content-tab{margin:20px}.wprm-frame-toolbar{left:200px;bottom:0}.wprm-toolbar{top:0;left:0;padding:0 16px;border:0 solid #ddd;overflow:hidden}.wprm-modal-content .wprm-toolbar-primary.search-form{width:33%}.wprm-toolbar-primary{float:right;height:100%}.wprm-modal-content .wprm-toolbar-primary .wprm-button{float:right}.wprm-toolbar-primary>.wprm-button,.wprm-toolbar-primary>.wprm-button-group{margin-left:10px;float:left;margin-top:15px}@media only screen and (max-width:900px){.wprm-frame:not(.hide-menu) .wprm-frame-title .dashicons{display:inline-block;line-height:50px}.wprm-frame:not(.hide-menu) .wprm-frame-menu{position:static;width:0}.wprm-frame:not(.hide-menu) .wprm-frame-content,.wprm-frame:not(.hide-menu) .wprm-frame-router,.wprm-frame:not(.hide-menu) .wprm-frame-title,.wprm-frame:not(.hide-menu) .wprm-frame-toolbar,.wprm-frame:not(.hide-menu) .wprm-menu.visible{left:0}.wprm-frame:not(.hide-menu) .wprm-menu{width:auto;max-width:80%;overflow:auto;z-index:2000;top:50px;left:-300px;right:auto;bottom:auto;padding:5px 0;border:1px solid #ccc}.wprm-frame:not(.hide-menu) .wprm-menu>a.active{display:none}.wprm-frame:not(.hide-menu) .wprm-menu>a{padding:12px 16px;font-size:16px}.wprm-frame:not(.hide-menu) .wprm-menu .separator{margin:5px 10px}.wprm-frame:not(.hide-menu) .wprm-frame-title h1{color:#0073aa;line-height:3;font-size:18px;float:left;cursor:pointer}}@media only screen and (max-width:640px),screen and (max-height:400px){.wprm-modal{position:fixed;top:0;left:0;right:0;bottom:0}.wprm-modal .wprm-frame-title{height:40px}}@media only screen and (max-width:480px){.wprm-frame:not(.hide-menu) .wprm-frame-title .dashicons{line-height:40px}.wprm-frame-router,.wprm-frame:not(.hide-menu) .wprm-menu{top:40px}.wprm-frame:not(.hide-menu) .wprm-frame-title h1,.wprm-modal .wprm-frame-title h1{font-size:18px;line-height:40px}.wprm-frame-content{top:74px}}.wprm-recipe-form{max-width:600px}.wprm-recipe-form .wprm-recipe-form-container{margin-bottom:15px;vertical-align:top}.wprm-recipe-form .wprm-recipe-form-container-halfs{display:inline-block;width:50%}.wprm-recipe-form .wprm-recipe-form-container-thirds{display:inline-block;width:33.3%}.wprm-recipe-form label{display:block;font-weight:700;margin-bottom:5px}.wprm-recipe-form input[type=text],.wprm-recipe-form input[type=number]{margin:0;width:100%;max-width:120px;height:34px;line-height:34px}.wprm-recipe-form input[type=text][type=number],.wprm-recipe-form input[type=number][type=number]{max-width:50px}.wprm-recipe-form input[type=text].select2_wprm-search__field,.wprm-recipe-form input[type=number].select2_wprm-search__field{height:18px;line-height:18px}.wprm-recipe-form select{width:100%}.wprm-recipe-form textarea{width:100%;resize:vertical}@media only screen and (max-width:480px){.wprm-recipe-form .wprm-recipe-form-container-halfs,.wprm-recipe-form .wprm-recipe-form-container-thirds{display:block;width:100%}}.wprm-recipe-import-text-form .import-text-buttons{margin-bottom:10px}.wprm-recipe-import-text-form .import-text-step{display:none}.wprm-recipe-import-text-form .import-text-step#import-text-step-input{display:block}.wprm-recipe-import-text-form #import-text-highlight-sandbox,.wprm-recipe-import-text-form .import-text-input{margin-top:10px}.wprm-recipe-import-text-form #import-text-ingredient-groups label,.wprm-recipe-import-text-form #import-text-instruction-groups label{display:inline;font-weight:400}.wprm-recipe-import-text-form .import-text-group-warning{margin-top:10px;display:none}.wprm-recipe-import-text-form #import-text-highlight-sandbox{display:none;max-height:400px;overflow:scroll;padding:10px;border:1px dashed #999}.wprm-loader,.wprm-loader:after,.wprm-loader:before{border-radius:50%;width:1.5em;height:1.5em;-webkit-animation:load7 1.8s infinite ease-in-out;animation:load7 1.8s infinite ease-in-out}.wprm-loader{display:none;color:#444;font-size:10px;margin:20px auto;position:relative;text-indent:-9999em;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation-delay:-.16s;animation-delay:-.16s}.wprm-loader:after,.wprm-loader:before{content:'';position:absolute;top:0}.wprm-loader:before{left:-2.5em;-webkit-animation-delay:-.32s;animation-delay:-.32s}.wprm-loader:after{left:2.5em}@-webkit-keyframes load7{0%,100%,80%{box-shadow:0 2.5em 0 -1.3em}40%{box-shadow:0 2.5em 0 0}}@keyframes load7{0%,100%,80%{box-shadow:0 2.5em 0 -1.3em}40%{box-shadow:0 2.5em 0 0}}.wprm-recipe-details-form input#wprm-recipe-name{max-width:450px}.wprm-recipe-details-form input#wprm-recipe-author-name{max-width:none}.wprm-recipe-details-form input#wprm-recipe-calories{max-width:70px}.wprm-recipe-details-form .wprm-recipe-image-preview{float:right;max-width:100px}.wprm-recipe-details-form .wprm-recipe-image-preview img{max-width:100%;height:auto}.wprm-recipe-details-form .wprm-recipe-summary-container{clear:both}@media only screen and (max-width:480px){.wprm-recipe-details-form .wprm-recipe-image-preview{float:none;margin:10px auto}}.wprm-recipe-ingredients-form,.wprm-recipe-instructions-form{max-width:750px;margin-bottom:15px}.wprm-recipe-ingredients-form input,.wprm-recipe-instructions-form input{margin:0;width:100%;height:34px;line-height:34px}.wprm-recipe-ingredients-form textarea,.wprm-recipe-instructions-form textarea{width:100%;resize:vertical}.wprm-recipe-ingredients-form ::-webkit-input-placeholder,.wprm-recipe-instructions-form ::-webkit-input-placeholder{color:#999;opacity:.5}.wprm-recipe-ingredients-form :-moz-placeholder,.wprm-recipe-instructions-form :-moz-placeholder{color:#999;opacity:.5}.wprm-recipe-ingredients-form ::-moz-placeholder,.wprm-recipe-instructions-form ::-moz-placeholder{color:#999;opacity:.5}.wprm-recipe-ingredients-form :-ms-input-placeholder,.wprm-recipe-instructions-form :-ms-input-placeholder{color:#999;opacity:.5}.wprm-recipe-ingredients-form table,.wprm-recipe-instructions-form table{width:100%}.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th,.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th{text-align:left}.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th:nth-child(1),.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th:nth-child(6),.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th:nth-child(1),.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th:nth-child(6){width:5%;text-align:center}.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th:nth-child(2),.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th:nth-child(2){width:10%}.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th:nth-child(3),.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th:nth-child(3){width:15%}.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th:nth-child(4),.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th:nth-child(4){width:40%}.wprm-recipe-ingredients-form table.wprm-recipe-ingredients-container th:nth-child(5),.wprm-recipe-instructions-form table.wprm-recipe-ingredients-container th:nth-child(5){width:25%}.wprm-recipe-ingredients-form table.wprm-recipe-instructions-container th,.wprm-recipe-instructions-form table.wprm-recipe-instructions-container th{text-align:left}.wprm-recipe-ingredients-form table.wprm-recipe-instructions-container th:nth-child(1),.wprm-recipe-ingredients-form table.wprm-recipe-instructions-container th:nth-child(4),.wprm-recipe-instructions-form table.wprm-recipe-instructions-container th:nth-child(1),.wprm-recipe-instructions-form table.wprm-recipe-instructions-container th:nth-child(4){width:5%;text-align:center}.wprm-recipe-ingredients-form table.wprm-recipe-instructions-container th:nth-child(2),.wprm-recipe-instructions-form table.wprm-recipe-instructions-container th:nth-child(2){width:65%}.wprm-recipe-ingredients-form table.wprm-recipe-instructions-container th:nth-child(3),.wprm-recipe-instructions-form table.wprm-recipe-instructions-container th:nth-child(3){width:25%}.wprm-recipe-ingredients-form table .wprm-recipe-ingredients-placeholder,.wprm-recipe-ingredients-form table .wprm-recipe-instructions-placeholder,.wprm-recipe-instructions-form table .wprm-recipe-ingredients-placeholder,.wprm-recipe-instructions-form table .wprm-recipe-instructions-placeholder{display:none}.wprm-recipe-ingredients-form table td,.wprm-recipe-instructions-form table td{text-align:left;vertical-align:top}.wprm-recipe-ingredients-form table td:first-child,.wprm-recipe-ingredients-form table td:last-child,.wprm-recipe-instructions-form table td:first-child,.wprm-recipe-instructions-form table td:last-child{text-align:center;vertical-align:middle}.wprm-recipe-ingredients-form .ui-sortable-helper,.wprm-recipe-instructions-form .ui-sortable-helper{display:table}.wprm-recipe-ingredients-form .ui-sortable-helper .wprm-recipe-instruction-text,.wprm-recipe-instructions-form .ui-sortable-helper .wprm-recipe-instruction-text{min-width:200px}.wprm-recipe-ingredients-form .wprm-recipe-ingredients-instructions-sort,.wprm-recipe-instructions-form .wprm-recipe-ingredients-instructions-sort{cursor:move}.wprm-recipe-ingredients-form .wprm-recipe-ingredients-instructions-delete,.wprm-recipe-instructions-form .wprm-recipe-ingredients-instructions-delete{cursor:pointer}.wprm-recipe-ingredients-form .wprm-recipe-ingredients-instructions-delete,.wprm-recipe-ingredients-form .wprm-recipe-ingredients-instructions-sort,.wprm-recipe-instructions-form .wprm-recipe-ingredients-instructions-delete,.wprm-recipe-instructions-form .wprm-recipe-ingredients-instructions-sort{color:#999;opacity:.5}.wprm-recipe-ingredients-form .wprm-recipe-ingredients-instructions-delete:hover,.wprm-recipe-ingredients-form .wprm-recipe-ingredients-instructions-sort:hover,.wprm-recipe-instructions-form .wprm-recipe-ingredients-instructions-delete:hover,.wprm-recipe-instructions-form .wprm-recipe-ingredients-instructions-sort:hover{color:#444;opacity:1}.wprm-recipe-ingredients-form .wprm-recipe-ingredients-actions,.wprm-recipe-ingredients-form .wprm-recipe-instructions-actions,.wprm-recipe-instructions-form .wprm-recipe-ingredients-actions,.wprm-recipe-instructions-form .wprm-recipe-instructions-actions{margin:10px}.wprm-recipe-ingredients-form .wprm-recipe-image-preview,.wprm-recipe-instructions-form .wprm-recipe-image-preview{max-width:75px}.wprm-recipe-ingredients-form .wprm-recipe-image-preview img,.wprm-recipe-instructions-form .wprm-recipe-image-preview img{max-width:100%;height:auto}.wprm-shortcode-builder .wprm-shortcode-builder-container{margin-bottom:15px;vertical-align:top}.wprm-shortcode-builder .wprm-shortcode-builder-container-halfs{display:inline-block;width:50%}.wprm-shortcode-builder .wprm-shortcode-builder-container-thirds{display:inline-block;width:33.3%}.wprm-shortcode-builder label{display:block;font-weight:700;margin-bottom:5px}.wprm-shortcode-builder .wprm-shortcode-builder-helper{margin-left:5px;font-size:.8em;font-style:italic}.wprm-shortcode-builder input{margin:0;width:100%;max-width:250px;height:34px;line-height:34px}.wprm-shortcode-builder input.select2_wprm-search__field{height:18px;line-height:18px}.wprm-shortcode-builder select{width:250px}
|
assets/css/admin/modal/_import-text.scss
CHANGED
@@ -26,6 +26,11 @@
|
|
26 |
}
|
27 |
}
|
28 |
|
|
|
|
|
|
|
|
|
|
|
29 |
#import-text-highlight-sandbox {
|
30 |
display: none;
|
31 |
max-height: 400px;
|
26 |
}
|
27 |
}
|
28 |
|
29 |
+
.import-text-group-warning {
|
30 |
+
margin-top: 10px;
|
31 |
+
display: none;
|
32 |
+
}
|
33 |
+
|
34 |
#import-text-highlight-sandbox {
|
35 |
display: none;
|
36 |
max-height: 400px;
|
assets/js/admin/import-text.js
CHANGED
@@ -71,6 +71,7 @@ wprm_admin.btn_text_import_next = function() {
|
|
71 |
var ingredient = '<div class="import-text-ingredient"><input type="checkbox" id="ingredient-' + i + '"> ' + '<label for="ingredient-' + i + '">' + text + '</label></div>';
|
72 |
jQuery('#import-text-ingredient-groups').append(ingredient);
|
73 |
}
|
|
|
74 |
|
75 |
if(ingredients.length == 0) {
|
76 |
jQuery('#import-text-highlight-sandbox').show();
|
@@ -133,6 +134,7 @@ wprm_admin.btn_text_import_next = function() {
|
|
133 |
var instruction = '<div class="import-text-instruction"><input type="checkbox" id="instruction-' + i + '"> ' + '<label for="instruction-' + i + '">' + text + '</label></div>';
|
134 |
jQuery('#import-text-instruction-groups').append(instruction);
|
135 |
}
|
|
|
136 |
|
137 |
if(instructions.length == 0) {
|
138 |
jQuery('#import-text-highlight-sandbox').show();
|
@@ -246,4 +248,12 @@ jQuery(document).ready(function($) {
|
|
246 |
jQuery('.wprm-button-import-text-next').on('click', function() {
|
247 |
wprm_admin.btn_text_import_next();
|
248 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
249 |
});
|
71 |
var ingredient = '<div class="import-text-ingredient"><input type="checkbox" id="ingredient-' + i + '"> ' + '<label for="ingredient-' + i + '">' + text + '</label></div>';
|
72 |
jQuery('#import-text-ingredient-groups').append(ingredient);
|
73 |
}
|
74 |
+
jQuery('.import-text-group-warning').hide();
|
75 |
|
76 |
if(ingredients.length == 0) {
|
77 |
jQuery('#import-text-highlight-sandbox').show();
|
134 |
var instruction = '<div class="import-text-instruction"><input type="checkbox" id="instruction-' + i + '"> ' + '<label for="instruction-' + i + '">' + text + '</label></div>';
|
135 |
jQuery('#import-text-instruction-groups').append(instruction);
|
136 |
}
|
137 |
+
jQuery('.import-text-group-warning').hide();
|
138 |
|
139 |
if(instructions.length == 0) {
|
140 |
jQuery('#import-text-highlight-sandbox').show();
|
248 |
jQuery('.wprm-button-import-text-next').on('click', function() {
|
249 |
wprm_admin.btn_text_import_next();
|
250 |
});
|
251 |
+
|
252 |
+
jQuery('.import-text-input-groups').on('change', 'input', function() {
|
253 |
+
var groups = jQuery(this).parents('.import-text-input-groups');
|
254 |
+
|
255 |
+
if(groups.find('input').length == groups.find('input:checked').length) {
|
256 |
+
jQuery('.import-text-group-warning').show();
|
257 |
+
}
|
258 |
+
});
|
259 |
});
|
assets/js/admin/import.js
CHANGED
@@ -29,4 +29,40 @@ jQuery(document).ready(function($) {
|
|
29 |
|
30 |
wprm_admin.import_last_checked = this;
|
31 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
});
|
29 |
|
30 |
wprm_admin.import_last_checked = this;
|
31 |
});
|
32 |
+
|
33 |
+
// Go to next import page
|
34 |
+
jQuery('.wprm-import-next-page').on('click', function() {
|
35 |
+
var url = window.location.href,
|
36 |
+
regex = /(&|\?)p=(\d+)/,
|
37 |
+
match = regex.exec(url);
|
38 |
+
|
39 |
+
if(match) {
|
40 |
+
var page = parseInt(match[2]),
|
41 |
+
search = 'p=' + page,
|
42 |
+
replace = 'p=' + (page+1);
|
43 |
+
|
44 |
+
url = url.replace('?' + search, '?' + replace);
|
45 |
+
url = url.replace('&' + search, '&' + replace);
|
46 |
+
}
|
47 |
+
|
48 |
+
window.location = url;
|
49 |
+
});
|
50 |
+
|
51 |
+
// Go back to the first import page
|
52 |
+
jQuery('.wprm-import-reset-page').on('click', function() {
|
53 |
+
var url = window.location.href,
|
54 |
+
regex = /(&|\?)p=(\d+)/,
|
55 |
+
match = regex.exec(url);
|
56 |
+
|
57 |
+
if(match) {
|
58 |
+
var page = parseInt(match[2]),
|
59 |
+
search = 'p=' + page,
|
60 |
+
replace = 'p=0';
|
61 |
+
|
62 |
+
url = url.replace('?' + search, '?' + replace);
|
63 |
+
url = url.replace('&' + search, '&' + replace);
|
64 |
+
}
|
65 |
+
|
66 |
+
window.location = url;
|
67 |
+
});
|
68 |
});
|
assets/js/admin/manage.js
CHANGED
@@ -215,6 +215,14 @@ jQuery(document).ready(function($) {
|
|
215 |
}
|
216 |
} );
|
217 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
jQuery(document).on('change', '.wprm-manage-ingredients-link-nofollow', function() {
|
219 |
var id = jQuery(this).data('id'),
|
220 |
nofollow = jQuery(this).val();
|
215 |
}
|
216 |
} );
|
217 |
|
218 |
+
jQuery(document).on('click', '.wprm-manage-recipes-seo', function() {
|
219 |
+
var id = jQuery(this).data('id');
|
220 |
+
|
221 |
+
wprm_admin.open_modal(false, {
|
222 |
+
recipe_id: id
|
223 |
+
});
|
224 |
+
});
|
225 |
+
|
226 |
jQuery(document).on('change', '.wprm-manage-ingredients-link-nofollow', function() {
|
227 |
var id = jQuery(this).data('id'),
|
228 |
nofollow = jQuery(this).val();
|
assets/js/admin/recipe-form.js
CHANGED
@@ -379,9 +379,7 @@ wprm_admin.insert_update_recipe = function(button) {
|
|
379 |
var row = jQuery(this);
|
380 |
if (row.hasClass('wprm-recipe-instruction-group')) {
|
381 |
// Add current instruction group to instructions
|
382 |
-
|
383 |
-
instructions.push(instruction_group);
|
384 |
-
}
|
385 |
|
386 |
instruction_group = {
|
387 |
name: row.find('.wprm-recipe-instruction-group-name').val(),
|
@@ -394,10 +392,9 @@ wprm_admin.insert_update_recipe = function(button) {
|
|
394 |
});
|
395 |
}
|
396 |
});
|
397 |
-
// Add remaining
|
398 |
-
|
399 |
-
|
400 |
-
}
|
401 |
recipe.instructions = instructions;
|
402 |
|
403 |
// Recipe Notes
|
@@ -455,9 +452,7 @@ wprm_admin.get_ingredients = function() {
|
|
455 |
var row = jQuery(this);
|
456 |
if (row.hasClass('wprm-recipe-ingredient-group')) {
|
457 |
// Add current ingredient group to ingredients
|
458 |
-
|
459 |
-
ingredients.push(ingredient_group);
|
460 |
-
}
|
461 |
|
462 |
ingredient_group = {
|
463 |
name: row.find('.wprm-recipe-ingredient-group-name').val(),
|
@@ -474,9 +469,8 @@ wprm_admin.get_ingredients = function() {
|
|
474 |
});
|
475 |
|
476 |
// Add remaining ingredient group
|
477 |
-
|
478 |
-
|
479 |
-
}
|
480 |
return ingredients;
|
481 |
};
|
482 |
|
379 |
var row = jQuery(this);
|
380 |
if (row.hasClass('wprm-recipe-instruction-group')) {
|
381 |
// Add current instruction group to instructions
|
382 |
+
instructions.push(instruction_group);
|
|
|
|
|
383 |
|
384 |
instruction_group = {
|
385 |
name: row.find('.wprm-recipe-instruction-group-name').val(),
|
392 |
});
|
393 |
}
|
394 |
});
|
395 |
+
// Add remaining instruction group
|
396 |
+
instructions.push(instruction_group);
|
397 |
+
|
|
|
398 |
recipe.instructions = instructions;
|
399 |
|
400 |
// Recipe Notes
|
452 |
var row = jQuery(this);
|
453 |
if (row.hasClass('wprm-recipe-ingredient-group')) {
|
454 |
// Add current ingredient group to ingredients
|
455 |
+
ingredients.push(ingredient_group);
|
|
|
|
|
456 |
|
457 |
ingredient_group = {
|
458 |
name: row.find('.wprm-recipe-ingredient-group-name').val(),
|
469 |
});
|
470 |
|
471 |
// Add remaining ingredient group
|
472 |
+
ingredients.push(ingredient_group);
|
473 |
+
|
|
|
474 |
return ingredients;
|
475 |
};
|
476 |
|
includes/admin/class-wprm-recipe-parser.php
CHANGED
@@ -106,7 +106,7 @@ class WPRM_Recipe_Parser {
|
|
106 |
$possible_units[ $index ] = preg_quote( $value, '/' );
|
107 |
}
|
108 |
|
109 |
-
$pattern = '/^(\b' . implode( '\b|\b', $possible_units ) . '\b)/
|
110 |
preg_match( $pattern, $raw, $match );
|
111 |
if ( isset( $match[0] ) ) {
|
112 |
$unit = $match[0];
|
106 |
$possible_units[ $index ] = preg_quote( $value, '/' );
|
107 |
}
|
108 |
|
109 |
+
$pattern = '/^(\b' . implode( '\b|\b', $possible_units ) . '\b)/ui';
|
110 |
preg_match( $pattern, $raw, $match );
|
111 |
if ( isset( $match[0] ) ) {
|
112 |
$unit = $match[0];
|
includes/admin/class-wprm-recipe-sanitizer.php
CHANGED
@@ -49,11 +49,6 @@ class WPRM_Recipe_Sanitizer {
|
|
49 |
$options = array( 'global', 'custom' );
|
50 |
$sanitized_recipe['ingredient_links_type'] = isset( $recipe['ingredient_links_type'] ) && in_array( $recipe['ingredient_links_type'], $options, true ) ? sanitize_key( $recipe['ingredient_links_type'] ) : $options[0];
|
51 |
|
52 |
-
// Global ingredient links.
|
53 |
-
if ( WPRM_Addons::is_active( 'premium' ) && isset( $recipe['global_ingredient_links'] ) ) {
|
54 |
-
WPRMP_Ingredient_Links::update_ingredient_links( $recipe['global_ingredient_links'] );
|
55 |
-
}
|
56 |
-
|
57 |
// Recipe Tags.
|
58 |
$sanitized_recipe['tags'] = array();
|
59 |
$taxonomies = WPRM_Taxonomies::get_taxonomies();
|
@@ -118,7 +113,7 @@ class WPRM_Recipe_Sanitizer {
|
|
118 |
}
|
119 |
}
|
120 |
|
121 |
-
if ( count( $sanitized_group['ingredients'] ) > 0 ) {
|
122 |
$sanitized_recipe['ingredients'][] = $sanitized_group;
|
123 |
}
|
124 |
}
|
@@ -147,12 +142,17 @@ class WPRM_Recipe_Sanitizer {
|
|
147 |
}
|
148 |
}
|
149 |
|
150 |
-
if ( count( $sanitized_group['instructions'] ) > 0 ) {
|
151 |
$sanitized_recipe['instructions'][] = $sanitized_group;
|
152 |
}
|
153 |
}
|
154 |
}
|
155 |
|
|
|
|
|
|
|
|
|
|
|
156 |
// Recipe Nutrition.
|
157 |
$sanitized_recipe['nutrition'] = array();
|
158 |
|
49 |
$options = array( 'global', 'custom' );
|
50 |
$sanitized_recipe['ingredient_links_type'] = isset( $recipe['ingredient_links_type'] ) && in_array( $recipe['ingredient_links_type'], $options, true ) ? sanitize_key( $recipe['ingredient_links_type'] ) : $options[0];
|
51 |
|
|
|
|
|
|
|
|
|
|
|
52 |
// Recipe Tags.
|
53 |
$sanitized_recipe['tags'] = array();
|
54 |
$taxonomies = WPRM_Taxonomies::get_taxonomies();
|
113 |
}
|
114 |
}
|
115 |
|
116 |
+
if ( $sanitized_group['name'] || count( $sanitized_group['ingredients'] ) > 0 ) {
|
117 |
$sanitized_recipe['ingredients'][] = $sanitized_group;
|
118 |
}
|
119 |
}
|
142 |
}
|
143 |
}
|
144 |
|
145 |
+
if ( $sanitized_group['name'] || count( $sanitized_group['instructions'] ) > 0 ) {
|
146 |
$sanitized_recipe['instructions'][] = $sanitized_group;
|
147 |
}
|
148 |
}
|
149 |
}
|
150 |
|
151 |
+
// Global ingredient links.
|
152 |
+
if ( WPRM_Addons::is_active( 'premium' ) && isset( $recipe['global_ingredient_links'] ) ) {
|
153 |
+
WPRMP_Ingredient_Links::update_ingredient_links( $recipe['global_ingredient_links'] );
|
154 |
+
}
|
155 |
+
|
156 |
// Recipe Nutrition.
|
157 |
$sanitized_recipe['nutrition'] = array();
|
158 |
|
includes/admin/manage/class-wprm-manage-recipes.php
CHANGED
@@ -97,7 +97,7 @@ class WPRM_Manage_Recipes {
|
|
97 |
get_the_date( 'Y/m/d', $recipe->id() ),
|
98 |
'<span id="wprm-manage-recipes-name-' . esc_attr( $recipe->id() ) . '">' . $recipe->name() . '</span>',
|
99 |
$parent_post_link,
|
100 |
-
'<div class="wprm-manage-recipes-seo wprm-manage-recipes-seo-' . esc_attr( $seo['type'] ) . '" data-tooltip-content="#wprm-manage-recipes-seo-' . esc_attr( $recipe->id() ) . '"></div><span class="wprm-manage-recipes-seo-tooltip" id="wprm-manage-recipes-seo-' . esc_attr( $recipe->id() ) . '">' . $seo['message'] . '</span>',
|
101 |
'<span class="dashicons dashicons-admin-tools wprm-icon wprm-manage-recipes-actions" data-id="' . esc_attr( $recipe->id() ) . '"></span>',
|
102 |
);
|
103 |
}
|
97 |
get_the_date( 'Y/m/d', $recipe->id() ),
|
98 |
'<span id="wprm-manage-recipes-name-' . esc_attr( $recipe->id() ) . '">' . $recipe->name() . '</span>',
|
99 |
$parent_post_link,
|
100 |
+
'<div class="wprm-manage-recipes-seo wprm-manage-recipes-seo-' . esc_attr( $seo['type'] ) . '" data-tooltip-content="#wprm-manage-recipes-seo-' . esc_attr( $recipe->id() ) . '" data-id="' . esc_attr( $recipe->id() ) . '"></div><span class="wprm-manage-recipes-seo-tooltip" id="wprm-manage-recipes-seo-' . esc_attr( $recipe->id() ) . '">' . $seo['message'] . '</span>',
|
101 |
'<span class="dashicons dashicons-admin-tools wprm-icon wprm-manage-recipes-actions" data-id="' . esc_attr( $recipe->id() ) . '"></span>',
|
102 |
);
|
103 |
}
|
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', '1.
|
35 |
define( 'WPRM_PREMIUM_VERSION_REQUIRED', '1.3.0' );
|
36 |
define( 'WPRM_POST_TYPE', 'wprm_recipe' );
|
37 |
define( 'WPRM_DIR', plugin_dir_path( dirname( __FILE__ ) ) );
|
31 |
* @since 1.0.0
|
32 |
*/
|
33 |
private function define_constants() {
|
34 |
+
define( 'WPRM_VERSION', '1.16.0' );
|
35 |
define( 'WPRM_PREMIUM_VERSION_REQUIRED', '1.3.0' );
|
36 |
define( 'WPRM_POST_TYPE', 'wprm_recipe' );
|
37 |
define( 'WPRM_DIR', plugin_dir_path( dirname( __FILE__ ) ) );
|
includes/public/class-wprm-comment-rating.php
CHANGED
@@ -78,7 +78,7 @@ class WPRM_Comment_Rating {
|
|
78 |
ob_end_clean();
|
79 |
}
|
80 |
|
81 |
-
$text = $rating_html . $text;
|
82 |
}
|
83 |
|
84 |
return $text;
|
78 |
ob_end_clean();
|
79 |
}
|
80 |
|
81 |
+
$text = 'below' === WPRM_Settings::get( 'comment_rating_position' ) ? $text . $rating_html : $rating_html . $text;
|
82 |
}
|
83 |
|
84 |
return $text;
|
includes/public/class-wprm-post-type.php
CHANGED
@@ -49,6 +49,11 @@ class WPRM_Post_Type {
|
|
49 |
'has_archive' => false,
|
50 |
));
|
51 |
|
|
|
|
|
|
|
|
|
|
|
52 |
register_post_type( WPRM_POST_TYPE, $args );
|
53 |
}
|
54 |
|
49 |
'has_archive' => false,
|
50 |
));
|
51 |
|
52 |
+
// WP Ultimate Post Grid text search compatibility.
|
53 |
+
if ( check_ajax_referer( 'wpupg_grid', 'security', false ) && isset( $_POST['search'] ) ) { // Input var okay.
|
54 |
+
$args['exclude_from_search'] = false;
|
55 |
+
}
|
56 |
+
|
57 |
register_post_type( WPRM_POST_TYPE, $args );
|
58 |
}
|
59 |
|
includes/public/class-wprm-print.php
CHANGED
@@ -129,7 +129,7 @@ class WPRM_Print {
|
|
129 |
$credit = WPRM_Settings::get( 'print_credit' );
|
130 |
|
131 |
if ( $credit ) {
|
132 |
-
$template .= '<div id="wprm-print-footer">' . $credit . '</div>';
|
133 |
}
|
134 |
}
|
135 |
|
129 |
$credit = WPRM_Settings::get( 'print_credit' );
|
130 |
|
131 |
if ( $credit ) {
|
132 |
+
$template .= '<div id="wprm-print-footer">' . WPRM_Template_Helper::recipe_placeholders( $recipe, $credit ) . '</div>';
|
133 |
}
|
134 |
}
|
135 |
|
includes/public/class-wprm-recipe.php
CHANGED
@@ -518,4 +518,14 @@ class WPRM_Recipe {
|
|
518 |
public function parent_post_id() {
|
519 |
return $this->meta( 'wprm_parent_post_id', 0 );
|
520 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
521 |
}
|
518 |
public function parent_post_id() {
|
519 |
return $this->meta( 'wprm_parent_post_id', 0 );
|
520 |
}
|
521 |
+
|
522 |
+
/**
|
523 |
+
* Get the parent post URL.
|
524 |
+
*
|
525 |
+
* @since 1.16.0
|
526 |
+
*/
|
527 |
+
public function parent_url() {
|
528 |
+
$parent_post_id = $this->parent_post_id();
|
529 |
+
return $parent_post_id ? get_permalink( $parent_post_id ) : '';
|
530 |
+
}
|
531 |
}
|
includes/public/class-wprm-settings.php
CHANGED
@@ -42,6 +42,8 @@ class WPRM_Settings {
|
|
42 |
'template_font_size' => '',
|
43 |
'template_font_header' => '',
|
44 |
'template_font_regular' => '',
|
|
|
|
|
45 |
'template_color_border' => '#aaaaaa',
|
46 |
'template_color_background' => '#ffffff',
|
47 |
'template_color_text' => '#333333',
|
@@ -53,6 +55,7 @@ class WPRM_Settings {
|
|
53 |
'template_color_accent_text' => '#ffffff',
|
54 |
'template_color_accent2' => '#3498db',
|
55 |
'template_color_accent2_text' => '#ffffff',
|
|
|
56 |
'default_recipe_template' => 'simple',
|
57 |
'default_print_template' => 'clean-print',
|
58 |
'print_credit' => '',
|
@@ -219,6 +222,8 @@ class WPRM_Settings {
|
|
219 |
$template_font_size = isset( $_POST['template_font_size'] ) ? sanitize_text_field( wp_unslash( $_POST['template_font_size'] ) ) : ''; // Input var okay.
|
220 |
$template_font_header = isset( $_POST['template_font_header'] ) ? sanitize_text_field( wp_unslash( $_POST['template_font_header'] ) ) : ''; // Input var okay.
|
221 |
$template_font_regular = isset( $_POST['template_font_regular'] ) ? sanitize_text_field( wp_unslash( $_POST['template_font_regular'] ) ) : ''; // Input var okay.
|
|
|
|
|
222 |
|
223 |
$template_color_border = isset( $_POST['template_color_border'] ) ? sanitize_text_field( wp_unslash( $_POST['template_color_border'] ) ) : ''; // Input var okay.
|
224 |
$template_color_background = isset( $_POST['template_color_background'] ) ? sanitize_text_field( wp_unslash( $_POST['template_color_background'] ) ) : ''; // Input var okay.
|
@@ -226,12 +231,14 @@ class WPRM_Settings {
|
|
226 |
$template_color_link = isset( $_POST['template_color_link'] ) ? sanitize_text_field( wp_unslash( $_POST['template_color_link'] ) ) : ''; // Input var okay.
|
227 |
$template_color_header = isset( $_POST['template_color_header'] ) ? sanitize_text_field( wp_unslash( $_POST['template_color_header'] ) ) : ''; // Input var okay.
|
228 |
$template_color_icon = isset( $_POST['template_color_icon'] ) ? sanitize_text_field( wp_unslash( $_POST['template_color_icon'] ) ) : ''; // Input var okay.
|
229 |
-
$template_color_comment_rating = isset( $_POST['template_color_comment_rating'] ) ? sanitize_text_field( wp_unslash( $_POST['template_color_comment_rating'] ) ) : ''; // Input var okay.
|
230 |
$template_color_accent = isset( $_POST['template_color_accent'] ) ? sanitize_text_field( wp_unslash( $_POST['template_color_accent'] ) ) : ''; // Input var okay.
|
231 |
$template_color_accent_text = isset( $_POST['template_color_accent_text'] ) ? sanitize_text_field( wp_unslash( $_POST['template_color_accent_text'] ) ) : ''; // Input var okay.
|
232 |
$template_color_accent2 = isset( $_POST['template_color_accent2'] ) ? sanitize_text_field( wp_unslash( $_POST['template_color_accent2'] ) ) : ''; // Input var okay.
|
233 |
$template_color_accent2_text = isset( $_POST['template_color_accent2_text'] ) ? sanitize_text_field( wp_unslash( $_POST['template_color_accent2_text'] ) ) : ''; // Input var okay.
|
234 |
|
|
|
|
|
|
|
235 |
$default_recipe_template = isset( $_POST['default_recipe_template'] ) ? sanitize_text_field( wp_unslash( $_POST['default_recipe_template'] ) ) : ''; // Input var okay.
|
236 |
$default_print_template = isset( $_POST['default_print_template'] ) ? sanitize_text_field( wp_unslash( $_POST['default_print_template'] ) ) : ''; // Input var okay.
|
237 |
$print_credit = isset( $_POST['print_credit'] ) ? wp_kses_post( wp_unslash( $_POST['print_credit'] ) ) : ''; // Input var okay.
|
@@ -248,6 +255,8 @@ class WPRM_Settings {
|
|
248 |
$settings['template_font_size'] = $template_font_size;
|
249 |
$settings['template_font_header'] = $template_font_header;
|
250 |
$settings['template_font_regular'] = $template_font_regular;
|
|
|
|
|
251 |
|
252 |
if ( $template_color_border ) { $settings['template_color_border'] = $template_color_border; }
|
253 |
if ( $template_color_background ) { $settings['template_color_background'] = $template_color_background; }
|
@@ -255,12 +264,14 @@ class WPRM_Settings {
|
|
255 |
if ( $template_color_link ) { $settings['template_color_link'] = $template_color_link; }
|
256 |
if ( $template_color_header ) { $settings['template_color_header'] = $template_color_header; }
|
257 |
if ( $template_color_icon ) { $settings['template_color_icon'] = $template_color_icon; }
|
258 |
-
if ( $template_color_comment_rating ) { $settings['template_color_comment_rating'] = $template_color_comment_rating; }
|
259 |
if ( $template_color_accent ) { $settings['template_color_accent'] = $template_color_accent; }
|
260 |
if ( $template_color_accent_text ) { $settings['template_color_accent_text'] = $template_color_accent_text; }
|
261 |
if ( $template_color_accent2 ) { $settings['template_color_accent2'] = $template_color_accent2; }
|
262 |
if ( $template_color_accent2_text ) { $settings['template_color_accent2_text'] = $template_color_accent2_text; }
|
263 |
|
|
|
|
|
|
|
264 |
if ( $default_recipe_template ) { $settings['default_recipe_template'] = $default_recipe_template; }
|
265 |
if ( $default_print_template ) { $settings['default_print_template'] = $default_print_template; }
|
266 |
$settings['print_credit'] = $print_credit;
|
42 |
'template_font_size' => '',
|
43 |
'template_font_header' => '',
|
44 |
'template_font_regular' => '',
|
45 |
+
'template_recipe_image' => '',
|
46 |
+
'template_instruction_image' => '',
|
47 |
'template_color_border' => '#aaaaaa',
|
48 |
'template_color_background' => '#ffffff',
|
49 |
'template_color_text' => '#333333',
|
55 |
'template_color_accent_text' => '#ffffff',
|
56 |
'template_color_accent2' => '#3498db',
|
57 |
'template_color_accent2_text' => '#ffffff',
|
58 |
+
'comment_rating_position' => 'above',
|
59 |
'default_recipe_template' => 'simple',
|
60 |
'default_print_template' => 'clean-print',
|
61 |
'print_credit' => '',
|
222 |
$template_font_size = isset( $_POST['template_font_size'] ) ? sanitize_text_field( wp_unslash( $_POST['template_font_size'] ) ) : ''; // Input var okay.
|
223 |
$template_font_header = isset( $_POST['template_font_header'] ) ? sanitize_text_field( wp_unslash( $_POST['template_font_header'] ) ) : ''; // Input var okay.
|
224 |
$template_font_regular = isset( $_POST['template_font_regular'] ) ? sanitize_text_field( wp_unslash( $_POST['template_font_regular'] ) ) : ''; // Input var okay.
|
225 |
+
$template_recipe_image = isset( $_POST['template_recipe_image'] ) ? sanitize_text_field( wp_unslash( $_POST['template_recipe_image'] ) ) : ''; // Input var okay.
|
226 |
+
$template_instruction_image = isset( $_POST['template_instruction_image'] ) ? sanitize_text_field( wp_unslash( $_POST['template_instruction_image'] ) ) : ''; // Input var okay.
|
227 |
|
228 |
$template_color_border = isset( $_POST['template_color_border'] ) ? sanitize_text_field( wp_unslash( $_POST['template_color_border'] ) ) : ''; // Input var okay.
|
229 |
$template_color_background = isset( $_POST['template_color_background'] ) ? sanitize_text_field( wp_unslash( $_POST['template_color_background'] ) ) : ''; // Input var okay.
|
231 |
$template_color_link = isset( $_POST['template_color_link'] ) ? sanitize_text_field( wp_unslash( $_POST['template_color_link'] ) ) : ''; // Input var okay.
|
232 |
$template_color_header = isset( $_POST['template_color_header'] ) ? sanitize_text_field( wp_unslash( $_POST['template_color_header'] ) ) : ''; // Input var okay.
|
233 |
$template_color_icon = isset( $_POST['template_color_icon'] ) ? sanitize_text_field( wp_unslash( $_POST['template_color_icon'] ) ) : ''; // Input var okay.
|
|
|
234 |
$template_color_accent = isset( $_POST['template_color_accent'] ) ? sanitize_text_field( wp_unslash( $_POST['template_color_accent'] ) ) : ''; // Input var okay.
|
235 |
$template_color_accent_text = isset( $_POST['template_color_accent_text'] ) ? sanitize_text_field( wp_unslash( $_POST['template_color_accent_text'] ) ) : ''; // Input var okay.
|
236 |
$template_color_accent2 = isset( $_POST['template_color_accent2'] ) ? sanitize_text_field( wp_unslash( $_POST['template_color_accent2'] ) ) : ''; // Input var okay.
|
237 |
$template_color_accent2_text = isset( $_POST['template_color_accent2_text'] ) ? sanitize_text_field( wp_unslash( $_POST['template_color_accent2_text'] ) ) : ''; // Input var okay.
|
238 |
|
239 |
+
$template_color_comment_rating = isset( $_POST['template_color_comment_rating'] ) ? sanitize_text_field( wp_unslash( $_POST['template_color_comment_rating'] ) ) : ''; // Input var okay.
|
240 |
+
$comment_rating_position = isset( $_POST['comment_rating_position'] ) ? sanitize_key( $_POST['comment_rating_position'] ) : ''; // Input var okay.
|
241 |
+
|
242 |
$default_recipe_template = isset( $_POST['default_recipe_template'] ) ? sanitize_text_field( wp_unslash( $_POST['default_recipe_template'] ) ) : ''; // Input var okay.
|
243 |
$default_print_template = isset( $_POST['default_print_template'] ) ? sanitize_text_field( wp_unslash( $_POST['default_print_template'] ) ) : ''; // Input var okay.
|
244 |
$print_credit = isset( $_POST['print_credit'] ) ? wp_kses_post( wp_unslash( $_POST['print_credit'] ) ) : ''; // Input var okay.
|
255 |
$settings['template_font_size'] = $template_font_size;
|
256 |
$settings['template_font_header'] = $template_font_header;
|
257 |
$settings['template_font_regular'] = $template_font_regular;
|
258 |
+
$settings['template_recipe_image'] = $template_recipe_image;
|
259 |
+
$settings['template_instruction_image'] = $template_instruction_image;
|
260 |
|
261 |
if ( $template_color_border ) { $settings['template_color_border'] = $template_color_border; }
|
262 |
if ( $template_color_background ) { $settings['template_color_background'] = $template_color_background; }
|
264 |
if ( $template_color_link ) { $settings['template_color_link'] = $template_color_link; }
|
265 |
if ( $template_color_header ) { $settings['template_color_header'] = $template_color_header; }
|
266 |
if ( $template_color_icon ) { $settings['template_color_icon'] = $template_color_icon; }
|
|
|
267 |
if ( $template_color_accent ) { $settings['template_color_accent'] = $template_color_accent; }
|
268 |
if ( $template_color_accent_text ) { $settings['template_color_accent_text'] = $template_color_accent_text; }
|
269 |
if ( $template_color_accent2 ) { $settings['template_color_accent2'] = $template_color_accent2; }
|
270 |
if ( $template_color_accent2_text ) { $settings['template_color_accent2_text'] = $template_color_accent2_text; }
|
271 |
|
272 |
+
if ( $template_color_comment_rating ) { $settings['template_color_comment_rating'] = $template_color_comment_rating; }
|
273 |
+
if ( $comment_rating_position ) { $settings['comment_rating_position'] = $comment_rating_position; }
|
274 |
+
|
275 |
if ( $default_recipe_template ) { $settings['default_recipe_template'] = $default_recipe_template; }
|
276 |
if ( $default_print_template ) { $settings['default_print_template'] = $default_print_template; }
|
277 |
$settings['print_credit'] = $print_credit;
|
includes/public/class-wprm-shortcode.php
CHANGED
@@ -224,7 +224,8 @@ class WPRM_Shortcode {
|
|
224 |
}
|
225 |
|
226 |
if ( $recipe_id ) {
|
227 |
-
|
|
|
228 |
} else {
|
229 |
return '';
|
230 |
}
|
224 |
}
|
225 |
|
226 |
if ( $recipe_id ) {
|
227 |
+
$url = home_url( '/wprm_print/' . $recipe_id );
|
228 |
+
return '<a href="' . $url . '" class="wprm-print-recipe-shortcode" data-recipe-id="' . esc_attr( $recipe_id ) . '" rel="nofollow">' . esc_html( $text ) . '</a>';
|
229 |
} else {
|
230 |
return '';
|
231 |
}
|
includes/public/class-wprm-template-helper.php
CHANGED
@@ -83,6 +83,7 @@ class WPRM_Template_Helper {
|
|
83 |
'ingredients' => __( 'Ingredients', 'wp-recipe-maker' ),
|
84 |
'instructions' => __( 'Instructions', 'wp-recipe-maker' ),
|
85 |
'notes' => __( 'Recipe Notes', 'wp-recipe-maker' ),
|
|
|
86 |
);
|
87 |
|
88 |
return apply_filters( 'wprm_label_defaults', $defaults );
|
@@ -280,4 +281,62 @@ class WPRM_Template_Helper {
|
|
280 |
|
281 |
return $meta;
|
282 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
283 |
}
|
83 |
'ingredients' => __( 'Ingredients', 'wp-recipe-maker' ),
|
84 |
'instructions' => __( 'Instructions', 'wp-recipe-maker' ),
|
85 |
'notes' => __( 'Recipe Notes', 'wp-recipe-maker' ),
|
86 |
+
'comment_rating' => __( 'Recipe Rating', 'wp-recipe-maker' ),
|
87 |
);
|
88 |
|
89 |
return apply_filters( 'wprm_label_defaults', $defaults );
|
281 |
|
282 |
return $meta;
|
283 |
}
|
284 |
+
|
285 |
+
/**
|
286 |
+
* Replace placeholders in text with recipe values.
|
287 |
+
*
|
288 |
+
* @since 1.16.0
|
289 |
+
* @param mixed $recipe Recipe to replace the placeholders for.
|
290 |
+
* @param mixed $text Text to replace the placeholders in.
|
291 |
+
*/
|
292 |
+
public static function recipe_placeholders( $recipe, $text ) {
|
293 |
+
$text = str_ireplace( '%recipe_url%', $recipe->parent_url(), $text );
|
294 |
+
$text = str_ireplace( '%recipe_name%', $recipe->name(), $text );
|
295 |
+
|
296 |
+
return $text;
|
297 |
+
}
|
298 |
+
|
299 |
+
/**
|
300 |
+
* Output the recipe image.
|
301 |
+
*
|
302 |
+
* @since 1.16.0
|
303 |
+
* @param mixed $recipe Recipe to output the image for.
|
304 |
+
* @param mixed $size Default size to output.
|
305 |
+
*/
|
306 |
+
public static function recipe_image( $recipe, $size ) {
|
307 |
+
$settings_size = WPRM_Settings::get( 'template_recipe_image' );
|
308 |
+
|
309 |
+
if ( $settings_size ) {
|
310 |
+
preg_match( '/^(\d+)x(\d+)$/i', $settings_size, $match );
|
311 |
+
if ( ! empty( $match ) ) {
|
312 |
+
$size = array( intval( $match[1] ), intval( $match[2] ) );
|
313 |
+
} else {
|
314 |
+
$size = $settings_size;
|
315 |
+
}
|
316 |
+
}
|
317 |
+
|
318 |
+
return $recipe->image( $size );
|
319 |
+
}
|
320 |
+
|
321 |
+
/**
|
322 |
+
* Output an instruction image.
|
323 |
+
*
|
324 |
+
* @since 1.16.0
|
325 |
+
* @param mixed $instruction Instruction to output the image for.
|
326 |
+
* @param mixed $size Default size to output.
|
327 |
+
*/
|
328 |
+
public static function instruction_image( $instruction, $size ) {
|
329 |
+
$settings_size = WPRM_Settings::get( 'template_instruction_image' );
|
330 |
+
|
331 |
+
if ( $settings_size ) {
|
332 |
+
preg_match( '/^(\d+)x(\d+)$/i', $settings_size, $match );
|
333 |
+
if ( ! empty( $match ) ) {
|
334 |
+
$size = array( intval( $match[1] ), intval( $match[2] ) );
|
335 |
+
} else {
|
336 |
+
$size = $settings_size;
|
337 |
+
}
|
338 |
+
}
|
339 |
+
|
340 |
+
return wp_get_attachment_image( $instruction['image'], $size );
|
341 |
+
}
|
342 |
}
|
readme.txt
CHANGED
@@ -97,6 +97,19 @@ Yes! We pride ourselves on offering awesome support and almost always answer sup
|
|
97 |
|
98 |
== Changelog ==
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
= 1.15.0 =
|
101 |
* Feature: SEO check on manage page
|
102 |
* Feature: Change recipe template fonts from settings
|
@@ -263,6 +276,9 @@ Yes! We pride ourselves on offering awesome support and almost always answer sup
|
|
263 |
|
264 |
== Upgrade notice ==
|
265 |
|
|
|
|
|
|
|
266 |
= 1.15.0 =
|
267 |
Some fun new features and improvements
|
268 |
|
97 |
|
98 |
== Changelog ==
|
99 |
|
100 |
+
= 1.16.0 =
|
101 |
+
* Feature: Change image sizes in settings
|
102 |
+
* Feature: Recipe placeholders for print credit
|
103 |
+
* Feature: Change position of the comment rating stars
|
104 |
+
* Improvement: Easier access to next recipes on import page
|
105 |
+
* Improvement: change comment rating label
|
106 |
+
* Improvement: Support unicode units when parsing ingredients
|
107 |
+
* Improvement: Ability to save empty ingredient and instruction groups
|
108 |
+
* Improvement: Print shortcode works without JS as well (AMP pages)
|
109 |
+
* Improvement: Click on SEO indicator to edit recipe
|
110 |
+
* Fix: Search filter in WP Ultimate Post Grid
|
111 |
+
* Fix: Saving links for new ingredients in Premium plugin
|
112 |
+
|
113 |
= 1.15.0 =
|
114 |
* Feature: SEO check on manage page
|
115 |
* Feature: Change recipe template fonts from settings
|
276 |
|
277 |
== Upgrade notice ==
|
278 |
|
279 |
+
= 1.16.0 =
|
280 |
+
Update for even more easy recipe template customization options
|
281 |
+
|
282 |
= 1.15.0 =
|
283 |
Some fun new features and improvements
|
284 |
|
templates/admin/menu/faq/whats_new.php
CHANGED
@@ -11,6 +11,21 @@
|
|
11 |
|
12 |
?>
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
<h3>2017-03-07 | WP Recipe Maker 1.15.0</h3>
|
15 |
<ul>
|
16 |
<li>Feature: SEO check on manage page</li>
|
11 |
|
12 |
?>
|
13 |
|
14 |
+
<h3>2017-03-28 | WP Recipe Maker 1.16.0</h3>
|
15 |
+
<ul>
|
16 |
+
<li>Feature: Change image sizes in settings</li>
|
17 |
+
<li>Feature: Recipe placeholders for print credit</li>
|
18 |
+
<li>Feature: Change position of the comment rating stars</li>
|
19 |
+
<li>Improvement: Easier access to next recipes on import page</li>
|
20 |
+
<li>Improvement: change comment rating label</li>
|
21 |
+
<li>Improvement: Support unicode units when parsing ingredients</li>
|
22 |
+
<li>Improvement: Ability to save empty ingredient and instruction groups</li>
|
23 |
+
<li>Improvement: Print shortcode works without JS as well (AMP pages)</li>
|
24 |
+
<li>Improvement: Click on SEO indicator to edit recipe</li>
|
25 |
+
<li>Fix: Search filter in WP Ultimate Post Grid</li>
|
26 |
+
<li>Fix: Saving links for new ingredients in Premium plugin</li>
|
27 |
+
</ul>
|
28 |
+
|
29 |
<h3>2017-03-07 | WP Recipe Maker 1.15.0</h3>
|
30 |
<ul>
|
31 |
<li>Feature: SEO check on manage page</li>
|
templates/admin/menu/import/import-recipes.php
CHANGED
@@ -74,7 +74,10 @@
|
|
74 |
|
75 |
if ( 0 === count( $recipes ) ) {
|
76 |
echo '<br/>';
|
77 |
-
|
|
|
|
|
|
|
78 |
}
|
79 |
echo '</em>';
|
80 |
}
|
74 |
|
75 |
if ( 0 === count( $recipes ) ) {
|
76 |
echo '<br/>';
|
77 |
+
echo '<a href="#" class="wprm-import-reset-page">' . esc_html__( 'Back to start.', 'wp-recipe-maker' ) . '</a>';
|
78 |
+
} else {
|
79 |
+
echo '<br/>';
|
80 |
+
echo '<a href="#" class="wprm-import-next-page">' . esc_html__( 'Go to the next page.', 'wp-recipe-maker' ) . '</a>';
|
81 |
}
|
82 |
echo '</em>';
|
83 |
}
|
templates/admin/modal/tabs/import-text.php
CHANGED
@@ -42,9 +42,12 @@
|
|
42 |
</div>
|
43 |
<div id="import-text-step-ingredient-groups" class="import-text-step">
|
44 |
<div class="import-text-description">
|
45 |
-
<?php esc_html_e( 'Check any ingredient
|
46 |
</div>
|
47 |
-
<div id="import-text-ingredient-groups" class="import-text-input">
|
|
|
|
|
|
|
48 |
</div>
|
49 |
</div>
|
50 |
<div id="import-text-step-instructions" class="import-text-step">
|
@@ -54,9 +57,12 @@
|
|
54 |
</div>
|
55 |
<div id="import-text-step-instruction-groups" class="import-text-step">
|
56 |
<div class="import-text-description">
|
57 |
-
<?php esc_html_e( 'Check any instruction
|
|
|
|
|
58 |
</div>
|
59 |
-
<div
|
|
|
60 |
</div>
|
61 |
</div>
|
62 |
<div id="import-text-step-notes" class="import-text-step">
|
42 |
</div>
|
43 |
<div id="import-text-step-ingredient-groups" class="import-text-step">
|
44 |
<div class="import-text-description">
|
45 |
+
<?php esc_html_e( 'Check any ingredient group headers in this list:', 'wp-recipe-maker' ); ?>
|
46 |
</div>
|
47 |
+
<div id="import-text-ingredient-groups" class="import-text-input import-text-input-groups">
|
48 |
+
</div>
|
49 |
+
<div class="import-text-group-warning">
|
50 |
+
<strong><?php esc_html_e( 'Warning', 'wp-recipe-maker' ); ?></strong>: <?php esc_html_e( 'Make sure to only select the ingredient group headers indicating a new ingredient group, not all ingredients.', 'wp-recipe-maker' ); ?>
|
51 |
</div>
|
52 |
</div>
|
53 |
<div id="import-text-step-instructions" class="import-text-step">
|
57 |
</div>
|
58 |
<div id="import-text-step-instruction-groups" class="import-text-step">
|
59 |
<div class="import-text-description">
|
60 |
+
<?php esc_html_e( 'Check any instruction group headers in this list:', 'wp-recipe-maker' ); ?>
|
61 |
+
</div>
|
62 |
+
<div id="import-text-instruction-groups" class="import-text-input import-text-input-groups">
|
63 |
</div>
|
64 |
+
<div class="import-text-group-warning">
|
65 |
+
<strong><?php esc_html_e( 'Warning', 'wp-recipe-maker' ); ?></strong>: <?php esc_html_e( 'Make sure to only select the instruction group headers indicating a new instruction group, not all instructions.', 'wp-recipe-maker' ); ?>
|
66 |
</div>
|
67 |
</div>
|
68 |
<div id="import-text-step-notes" class="import-text-step">
|
templates/admin/settings/appearance.php
CHANGED
@@ -111,6 +111,38 @@
|
|
111 |
</p>
|
112 |
</td>
|
113 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
<tr>
|
115 |
<th scope="row">
|
116 |
<label for="template_color_background"><?php esc_html_e( 'Background Color', 'wp-recipe-maker' ); ?></label>
|
@@ -159,14 +191,6 @@
|
|
159 |
<input name="template_color_icon" type="text" id="template_color_icon" value="<?php echo esc_attr( WPRM_Settings::get( 'template_color_icon' ) ); ?>" data-default-color="<?php echo esc_attr( WPRM_Settings::get_default( 'template_color_icon' ) ); ?>" class="wprm-color">
|
160 |
</td>
|
161 |
</tr>
|
162 |
-
<tr>
|
163 |
-
<th scope="row">
|
164 |
-
<label for="template_color_comment_rating"><?php esc_html_e( 'Comment Rating Color', 'wp-recipe-maker' ); ?></label>
|
165 |
-
</th>
|
166 |
-
<td>
|
167 |
-
<input name="template_color_comment_rating" type="text" id="template_color_comment_rating" value="<?php echo esc_attr( WPRM_Settings::get( 'template_color_comment_rating' ) ); ?>" data-default-color="<?php echo esc_attr( WPRM_Settings::get_default( 'template_color_comment_rating' ) ); ?>" class="wprm-color">
|
168 |
-
</td>
|
169 |
-
</tr>
|
170 |
<tr>
|
171 |
<th scope="row">
|
172 |
<label for="template_color_accent"><?php esc_html_e( 'Accent Color', 'wp-recipe-maker' ); ?></label>
|
@@ -201,6 +225,45 @@
|
|
201 |
</tr>
|
202 |
</tbody>
|
203 |
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
<h2 class="title"><?php esc_html_e( 'Recipe Template', 'wp-recipe-maker' ); ?></h2>
|
205 |
<p>
|
206 |
<?php esc_html_e( 'Change the look of recipes on your website.', 'wp-recipe-maker' ); ?>
|
@@ -255,7 +318,8 @@
|
|
255 |
<td>
|
256 |
<textarea name="print_credit" rows="2" cols="50" id="print_credit" class="large-text code"><?php echo esc_html( WPRM_Settings::get( 'print_credit' ) ); ?></textarea>
|
257 |
<p class="description" id="tagline-print_credit">
|
258 |
-
<?php esc_html_e( 'Optional text to show at the bottom of the print page.', 'wp-recipe-maker' ); ?>
|
|
|
259 |
</p>
|
260 |
</td>
|
261 |
</tr>
|
111 |
</p>
|
112 |
</td>
|
113 |
</tr>
|
114 |
+
<tr>
|
115 |
+
<th scope="row">
|
116 |
+
<label for="template_recipe_image"><?php esc_html_e( 'Recipe Image Size', 'wp-recipe-maker' ); ?></label>
|
117 |
+
</th>
|
118 |
+
<td>
|
119 |
+
<input name="template_recipe_image" type="text" id="template_recipe_image" value="<?php echo esc_attr( WPRM_Settings::get( 'template_recipe_image' ) ); ?>" class="regular-text">
|
120 |
+
<p class="description" id="tagline-template_recipe_image">
|
121 |
+
<?php esc_html_e( 'Leave blank to use the template default.', 'wp-recipe-maker-premium' ); ?> <?php esc_html_e( 'Type the name of a thumbnail size or the exact size you want.', 'wp-recipe-maker-premium' ); ?><br/>
|
122 |
+
<?php esc_html_e( 'For example', 'wp-recipe-maker-premium' ); ?>: thumbnail or 200x200
|
123 |
+
</p>
|
124 |
+
</td>
|
125 |
+
</tr>
|
126 |
+
<tr>
|
127 |
+
<th scope="row">
|
128 |
+
<label for="template_instruction_image"><?php esc_html_e( 'Instruction Image Size', 'wp-recipe-maker' ); ?></label>
|
129 |
+
</th>
|
130 |
+
<td>
|
131 |
+
<input name="template_instruction_image" type="text" id="template_instruction_image" value="<?php echo esc_attr( WPRM_Settings::get( 'template_instruction_image' ) ); ?>" class="regular-text">
|
132 |
+
<p class="description" id="tagline-template_instruction_image">
|
133 |
+
<?php esc_html_e( 'Leave blank to use the template default.', 'wp-recipe-maker-premium' ); ?> <?php esc_html_e( 'Type the name of a thumbnail size or the exact size you want.', 'wp-recipe-maker-premium' ); ?><br/>
|
134 |
+
<?php esc_html_e( 'For example', 'wp-recipe-maker-premium' ); ?>: thumbnail or 200x200
|
135 |
+
</p>
|
136 |
+
</td>
|
137 |
+
</tr>
|
138 |
+
</tbody>
|
139 |
+
</table>
|
140 |
+
<h2 class="title"><?php esc_html_e( 'Recipe Template Colors', 'wp-recipe-maker' ); ?></h2>
|
141 |
+
<p>
|
142 |
+
<?php esc_html_e( 'Note: not all options will affect every recipe template.', 'wp-recipe-maker' ); ?>
|
143 |
+
</p>
|
144 |
+
<table class="form-table">
|
145 |
+
<tbody>
|
146 |
<tr>
|
147 |
<th scope="row">
|
148 |
<label for="template_color_background"><?php esc_html_e( 'Background Color', 'wp-recipe-maker' ); ?></label>
|
191 |
<input name="template_color_icon" type="text" id="template_color_icon" value="<?php echo esc_attr( WPRM_Settings::get( 'template_color_icon' ) ); ?>" data-default-color="<?php echo esc_attr( WPRM_Settings::get_default( 'template_color_icon' ) ); ?>" class="wprm-color">
|
192 |
</td>
|
193 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
<tr>
|
195 |
<th scope="row">
|
196 |
<label for="template_color_accent"><?php esc_html_e( 'Accent Color', 'wp-recipe-maker' ); ?></label>
|
225 |
</tr>
|
226 |
</tbody>
|
227 |
</table>
|
228 |
+
<?php if ( WPRM_Settings::get( 'features_comment_ratings' ) ) : ?>
|
229 |
+
<h2 class="title"><?php esc_html_e( 'Comment Rating Appearance', 'wp-recipe-maker' ); ?></h2>
|
230 |
+
<p>
|
231 |
+
<?php esc_html_e( 'Change the look of the ratings feature in the comments section.', 'wp-recipe-maker' ); ?>
|
232 |
+
</p>
|
233 |
+
<table class="form-table">
|
234 |
+
<tbody>
|
235 |
+
<tr>
|
236 |
+
<th scope="row">
|
237 |
+
<label for="template_color_comment_rating"><?php esc_html_e( 'Stars Color', 'wp-recipe-maker' ); ?></label>
|
238 |
+
</th>
|
239 |
+
<td>
|
240 |
+
<input name="template_color_comment_rating" type="text" id="template_color_comment_rating" value="<?php echo esc_attr( WPRM_Settings::get( 'template_color_comment_rating' ) ); ?>" data-default-color="<?php echo esc_attr( WPRM_Settings::get_default( 'template_color_comment_rating' ) ); ?>" class="wprm-color">
|
241 |
+
</td>
|
242 |
+
</tr>
|
243 |
+
<tr>
|
244 |
+
<th scope="row">
|
245 |
+
<label for="comment_rating_position"><?php esc_html_e( 'Stars Position', 'wp-recipe-maker' ); ?></label>
|
246 |
+
</th>
|
247 |
+
<td>
|
248 |
+
<select id="comment_rating_position" name="comment_rating_position">
|
249 |
+
<?php
|
250 |
+
$options = array(
|
251 |
+
'above' => __( 'Above the comment', 'wp-recipe-maker' ),
|
252 |
+
'below' => __( 'Below the comment', 'wp-recipe-maker' ),
|
253 |
+
);
|
254 |
+
|
255 |
+
$setting = WPRM_Settings::get( 'comment_rating_position' );
|
256 |
+
foreach ( $options as $option => $label ) {
|
257 |
+
$selected = $setting === $option ? ' selected="selected"' : '';
|
258 |
+
echo '<option value="' . esc_attr( $option ) . '"' . esc_attr( $selected ) . '>' . esc_html( $label ) . '</option>';
|
259 |
+
}
|
260 |
+
?>
|
261 |
+
</select>
|
262 |
+
</td>
|
263 |
+
</tr>
|
264 |
+
</tbody>
|
265 |
+
</table>
|
266 |
+
<?php endif; ?>
|
267 |
<h2 class="title"><?php esc_html_e( 'Recipe Template', 'wp-recipe-maker' ); ?></h2>
|
268 |
<p>
|
269 |
<?php esc_html_e( 'Change the look of recipes on your website.', 'wp-recipe-maker' ); ?>
|
318 |
<td>
|
319 |
<textarea name="print_credit" rows="2" cols="50" id="print_credit" class="large-text code"><?php echo esc_html( WPRM_Settings::get( 'print_credit' ) ); ?></textarea>
|
320 |
<p class="description" id="tagline-print_credit">
|
321 |
+
<?php esc_html_e( 'Optional text to show at the bottom of the print page.', 'wp-recipe-maker' ); ?> <?php esc_html_e( 'You can use HTML and the following placeholders:', 'wp-recipe-maker' ); ?><br/>
|
322 |
+
%recipe_name% %recipe_url%
|
323 |
</p>
|
324 |
</td>
|
325 |
</tr>
|
templates/admin/settings/labels.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
<?php wp_nonce_field( 'wprm_settings', 'wprm_settings', false ); ?>
|
17 |
<h2 class="title"><?php esc_html_e( 'Labels', 'wp-recipe-maker' ); ?></h2>
|
18 |
<p>
|
19 |
-
<?php esc_html_e( '
|
20 |
</p>
|
21 |
<table class="form-table">
|
22 |
<tbody>
|
16 |
<?php wp_nonce_field( 'wprm_settings', 'wprm_settings', false ); ?>
|
17 |
<h2 class="title"><?php esc_html_e( 'Labels', 'wp-recipe-maker' ); ?></h2>
|
18 |
<p>
|
19 |
+
<?php esc_html_e( 'Change the labels in the recipe template.', 'wp-recipe-maker' ); ?>
|
20 |
</p>
|
21 |
<table class="form-table">
|
22 |
<tbody>
|
templates/public/comment-rating-form.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
|
12 |
?>
|
13 |
<p class="comment-form-wprm-rating" data-color="<?php echo esc_attr( WPRM_Settings::get( 'template_color_comment_rating' ) ); ?>">
|
14 |
-
<label for="wprm-rating"><?php
|
15 |
<span class="wprm-rating-stars">
|
16 |
<?php
|
17 |
for ( $i = 1; $i <= 5; $i++ ) {
|
11 |
|
12 |
?>
|
13 |
<p class="comment-form-wprm-rating" data-color="<?php echo esc_attr( WPRM_Settings::get( 'template_color_comment_rating' ) ); ?>">
|
14 |
+
<label for="wprm-rating"><?php echo WPRM_Template_Helper::label( 'comment_rating' ); ?></label>
|
15 |
<span class="wprm-rating-stars">
|
16 |
<?php
|
17 |
for ( $i = 1; $i <= 5; $i++ ) {
|
templates/public/comment-rating.php
CHANGED
@@ -11,8 +11,7 @@
|
|
11 |
|
12 |
?>
|
13 |
<div class="wprm-comment-rating">
|
14 |
-
<span class="wprm-rating-stars"
|
15 |
-
<?php
|
16 |
for ( $i = 1; $i <= 5; $i++ ) {
|
17 |
echo '<span class="wprm-rating-star">';
|
18 |
if ( $i <= $rating ) {
|
@@ -22,6 +21,5 @@
|
|
22 |
}
|
23 |
echo '</span>';
|
24 |
}
|
25 |
-
|
26 |
-
</span>
|
27 |
</div>
|
11 |
|
12 |
?>
|
13 |
<div class="wprm-comment-rating">
|
14 |
+
<span class="wprm-rating-stars"><?php
|
|
|
15 |
for ( $i = 1; $i <= 5; $i++ ) {
|
16 |
echo '<span class="wprm-rating-star">';
|
17 |
if ( $i <= $rating ) {
|
21 |
}
|
22 |
echo '</span>';
|
23 |
}
|
24 |
+
?></span>
|
|
|
25 |
</div>
|
templates/recipe/clean-print-with-image/clean-print-with-image.php
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
// @codingStandardsIgnoreStart
|
13 |
?>
|
14 |
<div class="wprm-recipe wprm-recipe-clean-print-with-image">
|
15 |
-
<div class="wprm-recipe-image"><?php echo $recipe
|
16 |
<h2 class="wprm-recipe-name"><?php echo $recipe->name(); ?></h2>
|
17 |
<div class="wprm-recipe-summary">
|
18 |
<?php echo $recipe->summary(); ?>
|
12 |
// @codingStandardsIgnoreStart
|
13 |
?>
|
14 |
<div class="wprm-recipe wprm-recipe-clean-print-with-image">
|
15 |
+
<div class="wprm-recipe-image"><?php echo WPRM_Template_Helper::recipe_image( $recipe, 'thumbnail' ); ?></div>
|
16 |
<h2 class="wprm-recipe-name"><?php echo $recipe->name(); ?></h2>
|
17 |
<div class="wprm-recipe-summary">
|
18 |
<?php echo $recipe->summary(); ?>
|
templates/recipe/simple/simple.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
<meta itemprop="datePublished" content="<?php echo $recipe->date(); ?>" />
|
17 |
<meta itemprop="image" content="<?php echo $recipe->image_url( 'full' ); ?>" />
|
18 |
<div class="wprm-recipe-image-container">
|
19 |
-
<div class="wprm-recipe-image"><?php echo $recipe
|
20 |
<div class="wprm-recipe-buttons">
|
21 |
<?php
|
22 |
if ( $recipe->has_rating() ) {
|
@@ -138,7 +138,7 @@
|
|
138 |
<div class="wprm-recipe-instruction-text" itemprop="recipeInstructions"><?php echo $instruction['text']; ?></div>
|
139 |
<?php endif; // Instruction text. ?>
|
140 |
<?php if ( $instruction['image'] ) : ?>
|
141 |
-
<div class="wprm-recipe-instruction-image"><?php echo
|
142 |
<?php endif; // Instruction image. ?>
|
143 |
</li>
|
144 |
<?php endforeach; // Instructions. ?>
|
16 |
<meta itemprop="datePublished" content="<?php echo $recipe->date(); ?>" />
|
17 |
<meta itemprop="image" content="<?php echo $recipe->image_url( 'full' ); ?>" />
|
18 |
<div class="wprm-recipe-image-container">
|
19 |
+
<div class="wprm-recipe-image"><?php echo WPRM_Template_Helper::recipe_image( $recipe, 'thumbnail' ); ?></div>
|
20 |
<div class="wprm-recipe-buttons">
|
21 |
<?php
|
22 |
if ( $recipe->has_rating() ) {
|
138 |
<div class="wprm-recipe-instruction-text" itemprop="recipeInstructions"><?php echo $instruction['text']; ?></div>
|
139 |
<?php endif; // Instruction text. ?>
|
140 |
<?php if ( $instruction['image'] ) : ?>
|
141 |
+
<div class="wprm-recipe-instruction-image"><?php echo WPRM_Template_Helper::instruction_image( $instruction, 'thumbnail' ); ?></div>
|
142 |
<?php endif; // Instruction image. ?>
|
143 |
</li>
|
144 |
<?php endforeach; // Instructions. ?>
|
templates/recipe/tastefully-simple/tastefully-simple.php
CHANGED
@@ -21,7 +21,7 @@
|
|
21 |
echo $recipe->rating_stars( true );
|
22 |
}
|
23 |
?>
|
24 |
-
<div class="wprm-recipe-image"><?php echo $recipe
|
25 |
<div class="wprm-recipe-buttons">
|
26 |
<span class="wprm-recipe-print wprm-color-accent"><?php echo WPRM_Template_Helper::label( 'print_button' ); ?></span>
|
27 |
</div>
|
@@ -142,7 +142,7 @@
|
|
142 |
<div class="wprm-recipe-instruction-text" itemprop="recipeInstructions"><?php echo $instruction['text']; ?></div>
|
143 |
<?php endif; // Instruction text. ?>
|
144 |
<?php if ( $instruction['image'] ) : ?>
|
145 |
-
<div class="wprm-recipe-instruction-image"><?php echo
|
146 |
<?php endif; // Instruction image. ?>
|
147 |
</li>
|
148 |
<?php endforeach; // Instructions. ?>
|
21 |
echo $recipe->rating_stars( true );
|
22 |
}
|
23 |
?>
|
24 |
+
<div class="wprm-recipe-image"><?php echo WPRM_Template_Helper::recipe_image( $recipe, 'thumbnail' ); ?></div>
|
25 |
<div class="wprm-recipe-buttons">
|
26 |
<span class="wprm-recipe-print wprm-color-accent"><?php echo WPRM_Template_Helper::label( 'print_button' ); ?></span>
|
27 |
</div>
|
142 |
<div class="wprm-recipe-instruction-text" itemprop="recipeInstructions"><?php echo $instruction['text']; ?></div>
|
143 |
<?php endif; // Instruction text. ?>
|
144 |
<?php if ( $instruction['image'] ) : ?>
|
145 |
+
<div class="wprm-recipe-instruction-image"><?php echo WPRM_Template_Helper::instruction_image( $instruction, 'thumbnail' ); ?></div>
|
146 |
<?php endif; // Instruction image. ?>
|
147 |
</li>
|
148 |
<?php endforeach; // Instructions. ?>
|
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: 1.
|
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: 1.16.0
|
19 |
* Author: Bootstrapped Ventures
|
20 |
* Author URI: http://bootstrapped.ventures/
|
21 |
* License: GPL-2.0+
|