Changeset 3080913
- Timestamp:
- 05/03/2024 11:46:54 AM (20 months ago)
- Location:
- zip-recipes/trunk
- Files:
-
- 263 added
- 1 deleted
- 7 edited
-
admin/js (deleted)
-
build (added)
-
build/blocks.asset.php (added)
-
build/blocks.css (added)
-
build/blocks.css.map (added)
-
build/blocks.js (added)
-
build/blocks.js.map (added)
-
build/style-blocks.css (added)
-
build/style-blocks.css.map (added)
-
class.ziprecipes.php (modified) (1 diff)
-
freemius (added)
-
freemius/LICENSE.txt (added)
-
freemius/assets (added)
-
freemius/assets/css (added)
-
freemius/assets/css/admin (added)
-
freemius/assets/css/admin/account.css (added)
-
freemius/assets/css/admin/add-ons.css (added)
-
freemius/assets/css/admin/affiliation.css (added)
-
freemius/assets/css/admin/checkout.css (added)
-
freemius/assets/css/admin/clone-resolution.css (added)
-
freemius/assets/css/admin/common.css (added)
-
freemius/assets/css/admin/connect.css (added)
-
freemius/assets/css/admin/debug.css (added)
-
freemius/assets/css/admin/dialog-boxes.css (added)
-
freemius/assets/css/admin/gdpr-optin-notice.css (added)
-
freemius/assets/css/admin/index.php (added)
-
freemius/assets/css/admin/optout.css (added)
-
freemius/assets/css/admin/plugins.css (added)
-
freemius/assets/css/customizer.css (added)
-
freemius/assets/css/index.php (added)
-
freemius/assets/img (added)
-
freemius/assets/img/index.php (added)
-
freemius/assets/img/plugin-icon.png (added)
-
freemius/assets/img/theme-icon.png (added)
-
freemius/assets/index.php (added)
-
freemius/assets/js (added)
-
freemius/assets/js/index.php (added)
-
freemius/assets/js/nojquery.ba-postmessage.js (added)
-
freemius/assets/js/postmessage.js (added)
-
freemius/config.php (added)
-
freemius/includes (added)
-
freemius/includes/class-freemius-abstract.php (added)
-
freemius/includes/class-freemius.php (added)
-
freemius/includes/class-fs-admin-notices.php (added)
-
freemius/includes/class-fs-api.php (added)
-
freemius/includes/class-fs-garbage-collector.php (added)
-
freemius/includes/class-fs-lock.php (added)
-
freemius/includes/class-fs-logger.php (added)
-
freemius/includes/class-fs-options.php (added)
-
freemius/includes/class-fs-plugin-updater.php (added)
-
freemius/includes/class-fs-security.php (added)
-
freemius/includes/class-fs-storage.php (added)
-
freemius/includes/class-fs-user-lock.php (added)
-
freemius/includes/customizer (added)
-
freemius/includes/customizer/class-fs-customizer-support-section.php (added)
-
freemius/includes/customizer/class-fs-customizer-upsell-control.php (added)
-
freemius/includes/customizer/index.php (added)
-
freemius/includes/debug (added)
-
freemius/includes/debug/class-fs-debug-bar-panel.php (added)
-
freemius/includes/debug/debug-bar-start.php (added)
-
freemius/includes/debug/index.php (added)
-
freemius/includes/entities (added)
-
freemius/includes/entities/class-fs-affiliate-terms.php (added)
-
freemius/includes/entities/class-fs-affiliate.php (added)
-
freemius/includes/entities/class-fs-billing.php (added)
-
freemius/includes/entities/class-fs-entity.php (added)
-
freemius/includes/entities/class-fs-payment.php (added)
-
freemius/includes/entities/class-fs-plugin-info.php (added)
-
freemius/includes/entities/class-fs-plugin-license.php (added)
-
freemius/includes/entities/class-fs-plugin-plan.php (added)
-
freemius/includes/entities/class-fs-plugin-tag.php (added)
-
freemius/includes/entities/class-fs-plugin.php (added)
-
freemius/includes/entities/class-fs-pricing.php (added)
-
freemius/includes/entities/class-fs-scope-entity.php (added)
-
freemius/includes/entities/class-fs-site.php (added)
-
freemius/includes/entities/class-fs-subscription.php (added)
-
freemius/includes/entities/class-fs-user.php (added)
-
freemius/includes/entities/index.php (added)
-
freemius/includes/fs-core-functions.php (added)
-
freemius/includes/fs-essential-functions.php (added)
-
freemius/includes/fs-html-escaping-functions.php (added)
-
freemius/includes/fs-plugin-info-dialog.php (added)
-
freemius/includes/index.php (added)
-
freemius/includes/l10n.php (added)
-
freemius/includes/managers (added)
-
freemius/includes/managers/class-fs-admin-menu-manager.php (added)
-
freemius/includes/managers/class-fs-admin-notice-manager.php (added)
-
freemius/includes/managers/class-fs-cache-manager.php (added)
-
freemius/includes/managers/class-fs-clone-manager.php (added)
-
freemius/includes/managers/class-fs-gdpr-manager.php (added)
-
freemius/includes/managers/class-fs-key-value-storage.php (added)
-
freemius/includes/managers/class-fs-license-manager.php (added)
-
freemius/includes/managers/class-fs-option-manager.php (added)
-
freemius/includes/managers/class-fs-permission-manager.php (added)
-
freemius/includes/managers/class-fs-plan-manager.php (added)
-
freemius/includes/managers/class-fs-plugin-manager.php (added)
-
freemius/includes/managers/index.php (added)
-
freemius/includes/sdk (added)
-
freemius/includes/sdk/Exceptions (added)
-
freemius/includes/sdk/Exceptions/ArgumentNotExistException.php (added)
-
freemius/includes/sdk/Exceptions/EmptyArgumentException.php (added)
-
freemius/includes/sdk/Exceptions/Exception.php (added)
-
freemius/includes/sdk/Exceptions/InvalidArgumentException.php (added)
-
freemius/includes/sdk/Exceptions/OAuthException.php (added)
-
freemius/includes/sdk/Exceptions/index.php (added)
-
freemius/includes/sdk/FreemiusBase.php (added)
-
freemius/includes/sdk/FreemiusWordPress.php (added)
-
freemius/includes/sdk/LICENSE.txt (added)
-
freemius/includes/sdk/index.php (added)
-
freemius/includes/supplements (added)
-
freemius/includes/supplements/fs-essential-functions-1.1.7.1.php (added)
-
freemius/includes/supplements/fs-essential-functions-2.2.1.php (added)
-
freemius/includes/supplements/fs-migration-2.5.1.php (added)
-
freemius/includes/supplements/index.php (added)
-
freemius/index.php (added)
-
freemius/languages (added)
-
freemius/languages/freemius-cs_CZ.mo (added)
-
freemius/languages/freemius-da_DK.mo (added)
-
freemius/languages/freemius-de_DE.mo (added)
-
freemius/languages/freemius-es_ES.mo (added)
-
freemius/languages/freemius-fr_FR.mo (added)
-
freemius/languages/freemius-he_IL.mo (added)
-
freemius/languages/freemius-hu_HU.mo (added)
-
freemius/languages/freemius-it_IT.mo (added)
-
freemius/languages/freemius-ja.mo (added)
-
freemius/languages/freemius-nl_NL.mo (added)
-
freemius/languages/freemius-ru_RU.mo (added)
-
freemius/languages/freemius-ta.mo (added)
-
freemius/languages/freemius-zh_CN.mo (added)
-
freemius/languages/freemius.pot (added)
-
freemius/languages/index.php (added)
-
freemius/require.php (added)
-
freemius/start.php (added)
-
freemius/templates (added)
-
freemius/templates/account (added)
-
freemius/templates/account.php (added)
-
freemius/templates/account/billing.php (added)
-
freemius/templates/account/index.php (added)
-
freemius/templates/account/partials (added)
-
freemius/templates/account/partials/activate-license-button.php (added)
-
freemius/templates/account/partials/addon.php (added)
-
freemius/templates/account/partials/deactivate-license-button.php (added)
-
freemius/templates/account/partials/disconnect-button.php (added)
-
freemius/templates/account/partials/index.php (added)
-
freemius/templates/account/partials/site.php (added)
-
freemius/templates/account/payments.php (added)
-
freemius/templates/add-ons.php (added)
-
freemius/templates/add-trial-to-pricing.php (added)
-
freemius/templates/admin-notice.php (added)
-
freemius/templates/ajax-loader.php (added)
-
freemius/templates/api-connectivity-message-js.php (added)
-
freemius/templates/auto-installation.php (added)
-
freemius/templates/checkout.php (added)
-
freemius/templates/clone-resolution-js.php (added)
-
freemius/templates/connect (added)
-
freemius/templates/connect.php (added)
-
freemius/templates/connect/index.php (added)
-
freemius/templates/connect/permission.php (added)
-
freemius/templates/connect/permissions-group.php (added)
-
freemius/templates/contact.php (added)
-
freemius/templates/debug (added)
-
freemius/templates/debug.php (added)
-
freemius/templates/debug/api-calls.php (added)
-
freemius/templates/debug/index.php (added)
-
freemius/templates/debug/logger.php (added)
-
freemius/templates/debug/plugins-themes-sync.php (added)
-
freemius/templates/debug/scheduled-crons.php (added)
-
freemius/templates/email.php (added)
-
freemius/templates/forms (added)
-
freemius/templates/forms/affiliation.php (added)
-
freemius/templates/forms/data-debug-mode.php (added)
-
freemius/templates/forms/deactivation (added)
-
freemius/templates/forms/deactivation/contact.php (added)
-
freemius/templates/forms/deactivation/form.php (added)
-
freemius/templates/forms/deactivation/index.php (added)
-
freemius/templates/forms/deactivation/retry-skip.php (added)
-
freemius/templates/forms/email-address-update.php (added)
-
freemius/templates/forms/index.php (added)
-
freemius/templates/forms/license-activation.php (added)
-
freemius/templates/forms/optout.php (added)
-
freemius/templates/forms/premium-versions-upgrade-handler.php (added)
-
freemius/templates/forms/premium-versions-upgrade-metadata.php (added)
-
freemius/templates/forms/resend-key.php (added)
-
freemius/templates/forms/subscription-cancellation.php (added)
-
freemius/templates/forms/trial-start.php (added)
-
freemius/templates/forms/user-change.php (added)
-
freemius/templates/gdpr-optin-js.php (added)
-
freemius/templates/index.php (added)
-
freemius/templates/js (added)
-
freemius/templates/js/index.php (added)
-
freemius/templates/js/jquery.content-change.php (added)
-
freemius/templates/js/open-license-activation.php (added)
-
freemius/templates/js/permissions.php (added)
-
freemius/templates/js/style-premium-theme.php (added)
-
freemius/templates/partials (added)
-
freemius/templates/partials/index.php (added)
-
freemius/templates/partials/network-activation.php (added)
-
freemius/templates/plugin-icon.php (added)
-
freemius/templates/plugin-info (added)
-
freemius/templates/plugin-info/description.php (added)
-
freemius/templates/plugin-info/features.php (added)
-
freemius/templates/plugin-info/index.php (added)
-
freemius/templates/plugin-info/screenshots.php (added)
-
freemius/templates/powered-by.php (added)
-
freemius/templates/pricing.php (added)
-
freemius/templates/secure-https-header.php (added)
-
freemius/templates/sticky-admin-notice-js.php (added)
-
freemius/templates/tabs-capture-js.php (added)
-
freemius/templates/tabs.php (added)
-
languages/zip-recipes-ar.mo (added)
-
languages/zip-recipes-ar.po (added)
-
languages/zip-recipes-da_DK.mo (added)
-
languages/zip-recipes-da_DK.po (added)
-
languages/zip-recipes-de_DE.mo (added)
-
languages/zip-recipes-de_DE.po (added)
-
languages/zip-recipes-el.mo (added)
-
languages/zip-recipes-el.po (added)
-
languages/zip-recipes-en_AU.mo (added)
-
languages/zip-recipes-en_AU.po (added)
-
languages/zip-recipes-en_CA.mo (added)
-
languages/zip-recipes-en_CA.po (added)
-
languages/zip-recipes-en_GB.mo (added)
-
languages/zip-recipes-en_GB.po (added)
-
languages/zip-recipes-en_NZ.mo (added)
-
languages/zip-recipes-en_NZ.po (added)
-
languages/zip-recipes-es_ES.mo (added)
-
languages/zip-recipes-es_ES.po (added)
-
languages/zip-recipes-fi.mo (added)
-
languages/zip-recipes-fi.po (added)
-
languages/zip-recipes-fr_BE.mo (added)
-
languages/zip-recipes-fr_BE.po (added)
-
languages/zip-recipes-fr_FR.mo (added)
-
languages/zip-recipes-fr_FR.po (added)
-
languages/zip-recipes-it_IT.mo (added)
-
languages/zip-recipes-it_IT.po (added)
-
languages/zip-recipes-ja.mo (added)
-
languages/zip-recipes-ja.po (added)
-
languages/zip-recipes-nl_BE.mo (added)
-
languages/zip-recipes-nl_BE.po (added)
-
languages/zip-recipes-nl_NL.mo (added)
-
languages/zip-recipes-nl_NL.po (added)
-
languages/zip-recipes-nl_NL_formal.mo (added)
-
languages/zip-recipes-nl_NL_formal.po (added)
-
languages/zip-recipes-pl_PL.mo (added)
-
languages/zip-recipes-pl_PL.po (added)
-
languages/zip-recipes-pt_BR.mo (added)
-
languages/zip-recipes-pt_BR.po (added)
-
languages/zip-recipes-ru_RU.mo (added)
-
languages/zip-recipes-ru_RU.po (added)
-
languages/zip-recipes-sk_SK.mo (added)
-
languages/zip-recipes-sk_SK.po (added)
-
languages/zip-recipes-sq.mo (added)
-
languages/zip-recipes-sq.po (added)
-
languages/zip-recipes-sr_RS.mo (added)
-
languages/zip-recipes-sr_RS.po (added)
-
languages/zip-recipes-sv_SE.mo (added)
-
languages/zip-recipes-sv_SE.po (added)
-
languages/zip-recipes-zh_CN.mo (added)
-
languages/zip-recipes-zh_CN.po (added)
-
package.json (added)
-
plugins/RecipeGrid2/package-lock.json (added)
-
plugins/RecipeGrid2/package.json (added)
-
plugins/_internal/__list.class.php (added)
-
readme.txt (modified) (5 diffs)
-
src/block.php (modified) (4 diffs)
-
src/block/editor.scss (modified) (1 diff)
-
src/block/style.scss (modified) (1 diff)
-
src/blocks.js (modified) (1 diff)
-
src/nutrition-label (added)
-
src/nutrition-label/block.js (added)
-
zip-recipes.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
zip-recipes/trunk/class.ziprecipes.php
r2832198 r3080913 640 640 return $all[$index_in_all_array]; 641 641 } 642 643 public static function get_all_usable_blocks() { 644 $available_blocks = array_filter( self::all_available_blocks(), function( $item ) { 645 if ( ! empty( $item['premium'] ) && ! ZipRecipes::is_paying_user() ) { 646 return false; 647 } 648 return true; 649 } ); 650 651 $not_data_blocks = array( 652 'divider', 653 'nutrition_label' 654 ); 655 656 $usable_blocks = []; 657 658 foreach ( $available_blocks as $block ) { 659 if ( in_array( $block['type'], $not_data_blocks, true ) ) { 660 continue; 661 } 662 663 $usable_blocks[] = $block; 664 } 665 666 return $usable_blocks; 667 } 668 669 public static function is_paying_user() { 670 671 $license_valid = false; 672 673 if ( defined('ZRDN_PREMIUM') ){ 674 if ( ! class_exists( '\ZRDN\licensing' ) ) { 675 require_once trailingslashit( ZRDN_PATH ) . 'plugins/Licensing/Licensing.php'; 676 } 677 $zrdn_license = new licensing(); 678 $license_valid = $zrdn_license->license_is_valid(); 679 } 680 681 if ( function_exists( '\ZRDN\zr_fs' ) ) { 682 $license_valid = zr_fs()->is_paying(); 683 } 684 685 if ( $license_valid ) { 686 return true; 687 } else { 688 return false; 689 } 690 } 642 691 643 692 /** -
zip-recipes/trunk/readme.txt
r2990532 r3080913 1 === Recipe MakerFor Your Food Blog from Zip Recipes ===2 Contributors: RogierLankhorst, markwolters, hgezim,3 Plugin Name: Recipe Maker For Your Food Blog from Zip Recipes1 === Recipe Cards For Your Food Blog from Zip Recipes === 2 Contributors: ibenic, freemius 3 Plugin Name: Recipe Cards For Your Food Blog from Zip Recipes (with Gutenberg support) 4 4 Plugin URI: https://www.ziprecipes.net 5 5 License: GPLv3 or later 6 Author URI: https://www. really-simple-plugins.com7 Author: Really Simple Plugins6 Author URI: https://www.wpsimplegiveaways.com 7 Author: Simple Giveaways 8 8 Donate link: https://www.paypal.me/reallysimplessl 9 Tags: recipe, recipes, ingredients, food, cooking, blog, SEO10 Requires at least: 4. 911 Tested up to: 6. 412 Stable tag: 8. 1.19 Tags: recipe, schema.org, seo, food, recipe card, recipe box, print recipe, recipe seo, cooking, nutrition 10 Requires at least: 4.8 11 Tested up to: 6.5.2 12 Stable tag: 8.2.6 13 13 Requires PHP: 7.2 14 14 15 Zip Recipes is the best way to easily create professional-looking recipes fully optimized for Google and your website visitors.15 Zip Recipes is the best way to easily create a beautiful food blog with professional looking recipes that can be found by Google. AMP (Accelerated Mobile Pages) compatible. Would you like to see what Zip Recipes can do for you? Visit our demo website: [demo.ziprecipes.net!](https://demo.ziprecipes.net/) 16 16 17 17 == Description == 18 18 19 Get started with the intuitive template editor and create professional recipes for your food blog. With schema.org, Recipe JSON-LD metadata optimized for Google, your recipes will reach more people than before! 20 21 1. Endless possibilities with the template editor and a wide range of settings. 22 2. Optimize your recipes for Google and other search engines and increase your organic reach. 23 3. Professional looking recipes for any device. 24 4. WYSIWYG Editors for adding new recipes of creating your recipe template. 25 5. Awesome support. 19 Easy to use recipe plugin that adds microdata and schema.org json ld to your recipes, so Google can find and understand them. AMP (Accelerated Mobile Pages) compatible. 20 We help you do that through our 4-step formula: 21 22 1. Easy to use 23 2. Professional look 24 3. Google friendly (schema.org and AMP compatible, rich snippets) 25 4. Integrates seamlessly with ad networks 26 26 27 27 Still got questions? [Go to our website for support](https://www.ziprecipes.net/support) or [email us](mailto:[email protected]). 28 28 29 Zip Recipes is on [GitHub](https://github.com/rlankhorst/zip-recipes-free) as well!30 31 ## 1. Endless possibilities with the template editor and a wide range of settings.32 Zip Recipes is the fastest way to create a recipe. The best way to build a following is to keep your readers coming back for new recipes for them to try. To speed up your workflow and save you time creating recipes, we provide:33 34 - **WYSIWYG Editors** Adding new recipes of creating your recipe template has never been so easy. [Sneak Preview](https://ziprecipes.net/video-a-quick-introduction-to-the-template-editor/)35 - **Easy Copy/Pasting**: You can copy & paste the recipes you already have from Microsoft Word or other programs.36 - **Flexible Editor**: Our flexible editor works how you work by allowing you to add recipes to posts, pages or custom post types.37 - **Featured Image Support**: You only have to set one image for your post or page if you use featured images. If you don't provide a recipe image, Zip Recipes will add the featured image to Google's rich snippet.38 - **No coding required**: We made Zip Recipes easy to use so you don’t need computer knowledge to start publishing your recipes. Even a complete novice can do it!39 - **Extensive support** through knowledgebase articles and responsive support.40 41 https://www.youtube.com/watch?v=-0yMFwgolzQ42 43 ## 2. More visitors | Rank higher in Google44 - **Schema.org and JSON LD**: your recipes will include all the necessary microdata so Google understands them, and will show rich snippets e.g. cooking time and other labels.45 - **Mobile friendly**: your recipes will look good on any device.46 - **AMP compatible**: out of the box compatible with Google's Accelerated Mobile pages. Zip Recipes will make your recipes load instantly from Google results.47 - **Social Media**: Pinterest can also be a huge source of readers for your blog as well. With our JSON-LD recipe markup, your recipes will appear on Pinterest as Rich Recipe Pins. People looking for your type of recipes will discover them and click over to your website giving you an excellent opportunity to build a fan base.48 49 ## 3. Professional looking recipes50 Some readers need a lot of information before even trying to re-create your recipe.51 52 - **Nutrition information**: Zip Recipes includes nutrition information, cook and prep time, notes and more53 - **Rich Snippets**: When users search for recipes, Google will show them the rich snippets with image, rating, nutrition info, cook and preptime, etc.54 - **Beautiful print layout**: When clicking the print button, your users will get a beautiful formatted print view.55 56 ## Love Zip Recipes?57 If you enjoy this plugin and you want your site to have the best recipe features, consider purchasing the [premium version](https://ziprecipes.net/premium).58 59 ## Premium features60 * Automatic Nutrition generation61 * Automatic serving adjustment for your users62 * Choose form several themes63 * Reviews and ratings, schema.org integrated64 * Recipe search, Recipe index and Recipe Gallery65 * Save Recipes on social media, like Big Oven and Yummly66 67 Check out other plugins developed by Really Simple Plugins as well: [Complianz](https://wordpress.org/plugins/complianz-gdpr/) and [Really Simple SSL](https://wordpress.org/plugins/really-simple-ssl/).68 69 == Installation ==70 71 You can get the [detailed installation instructions here](https://ziprecipes.net/knowledge-base/installing/). If you have more questions on how to use the plugin, feel free to reach out to us at [[email protected]](mailto:[email protected]).72 73 You can download and install the Zip Recipes plugin using the built-in WordPress plugin installer. If you download the Zip Recipes plugin manually, make sure it is uploaded to "/wp-content/plugins/zip-recipes/".74 75 == Frequently Asked Questions ==76 77 = Which languages are supported? =78 79 For all supported languages, please check [Translating WordPress](https://translate.wordpress.org/projects/wp-plugins/zip-recipes/)80 If you need a new language, you can contribute there!81 82 = Do you have a premium version? =83 84 Yes, we do! The premium version has automatically generated nutritional info, ratings, automatic serving adjustment, search by ingredient and easily created recipe galleries. You can learn about our premium features here: [https://www.ziprecipes.net/premium](https://www.ziprecipes.net/)85 86 = How do I edit a recipe with the Zip Recipes plugin? =87 88 To edit or create a recipe, click the Zip Recipes icon on the visual editor toolbar, or in Gutenberg, type in "zip", then click the Zip Recipes icon. More info [here](https://ziprecipes.net/knowledge-base/how-to-use-the-zip-recipes-plugin/).89 90 = Can I use the plugin to add multiple recipes to one post or page? =91 92 There should only be one recipe per post or page. The plugin does allow for compound recipes which is one way to include multiple lists of ingredients in your post. Under “creating a recipe” in the following article you can read how to do that. [Click here to learn more](https://ziprecipes.net/knowledge-base/how-to-use-the-zip-recipes-plugin/93 94 = When I use Zip Recipe plugin where are the recipes stored? =95 96 Your recipes are always stored on your own website. With Zip Recipes, your recipes are stored safely in a separate database table in your main WordPress database. The recipe table is named wp_amd_zlrecipe_recipes and you can take a look at it yourself using any WordPress database tools at your disposal.97 98 = How about Intellectual Property? =99 100 Your recipes are yours only! They're stored on your own server. Zip Recipes is only a tool to show your recipes on the internet.101 102 = Why do you put a placeholder image into my Edit Post page, instead of my actual recipe? =103 104 Because of the way WordPress' text editor works, if you decide to add or remove something from your recipe using the text editor, it can very easily mess up the markup of the code - so the Zip Recipe plugin prevents that from happening by not allowing you to edit the recipe in the text editor.105 106 == Screenshots ==107 108 1. A Template Editor with Endless Possibilities109 2. WYSIWYG Editor when Creating a Recipe110 3. Simple Recipe Cards with Nutrition Labels111 4. Structured Data Optimized for Google112 5. Overview of the most Important Recipe Data113 6. Style it to Match your Recipe Articles114 7. For more information, please visit [ziprecipes.net](https://ziprecipes.net)115 116 29 == Changelog == 117 118 = 8.1.0 = 30 = 8.2.6 = 31 * New: Nutrition Details Block 32 * Bug fixes 33 34 = 8.2.5 = 35 * Better integrating with new licensing system 36 * [Premium] Leaving old licensing system for updates in case of the new license not being active 37 * [Premium] Moving back to the older format of the plugin folder name "zip-recipes-lover" 38 39 = 8.2.4 = 40 * New licensing software 41 42 = 8.2.3 = 119 43 * Security: sanitizing of recipe overview filter 120 44 121 = 8. 1.0=45 = 8.2.2 = 122 46 * Improvement: PHP 8.2 compatibility 123 47 * Fix: Recipe Tags not linking correctly 124 48 125 = 8. 0.9=49 = 8.2.1 = 126 50 * Improvement: WordPress tested up to 6.3 127 51 * Improvement: Fixed deprecation notice 128 52 129 = 8.0.8 = 130 * Security: csrf vulnerability 131 132 = 8.0.7 = 53 = 8.2.0 = 54 * Fix: Recipe Grid not working in latest WordPress version 55 56 = 8.1.9 = 57 * Security: csrf 58 59 = 8.1.8 = 133 60 * Security: xss vulnerability 134 61 135 = 8. 0.6=136 * Improvement: tested up to WP6.2137 138 = 8. 0.5=139 * Improvement: catch non integer value in nutrition data140 141 = 8. 0.4=62 = 8.1.7 = 63 * Tested up to WordPress 6.2 64 65 = 8.1.6 = 66 * Improvement: catch non integer value in nutrition 67 68 = 8.1.5 = 142 69 * Fix: obsolete hooks 143 70 * Fix: PHP 8 compatibility 144 71 145 = 8. 0.3=72 = 8.1.4 = 146 73 * Fix: creating two recipes when in Classic Editor mode, then clicking first "save", then "save and close" 147 74 148 = 8. 0.2=75 = 8.1.3 = 149 76 * Fix: obsolete call made it impossible to remove recipe if sharing was enabled before 150 77 * Improvement: removed deprecated long_desc attribute from images 151 78 79 = 8.1.2 = 80 * Change: removed recipe sharing option. 81 82 = 8.1.1 = 83 * Fix: changed names of nutrition API output caused nutrition data not to get saved 84 * Fix: allow disabling of options that are set to default true 85 86 = 8.1.0 = 87 * Improvement: when recipe did not have a title, the print script should not try to retrieve it. 88 89 = 8.0.9 = 90 * Improvement: move nutrition label css outside recipe container, so it can be used outside a recipe 91 92 = 8.0.8 = 93 * Fix: when sharing was not enabled, saving a recipe could cause a validation error 94 95 = 8.0.7 = 96 * Fix: recipe sharing validation 97 * Improvement: output print file with Recipe title. 98 99 = 8.0.6 = 100 * Feature: Bulk monetizing 101 * Improvement: Dashboard UI for monetization 102 103 = 8.0.5 = 104 * Fix: feedback on not understandig ingredients 105 106 = 8.0.4 = 107 * Improvement: WCAG improvements 108 * Improvement: feedback on active sharing 109 110 = 8.0.3 = 111 * Fix: smooth scrolling in Chrome could be very slow because of chrome bug 112 * Fix: jump to recipe link not showing in some configurations 113 114 = 8.0.2 = 115 * Fix: css for new monetize settings block not minified. 116 152 117 = 8.0.1 = 153 * Bumped tested up to 5.9 154 155 = 8.0.0 = 156 * New: Grid gallery layout 157 * several small bug fixes 158 159 = 7.1.6 = 160 * don't add title to print view if it's not available 161 162 = 7.1.5 = 118 * New: recipe sharing: a new way to monetize your recipes! 119 120 = 7.1.9 = 163 121 * Fix: upgrade causing broken template 164 122 * Fix: other plugins injecting notices in Zip settings page 165 123 166 = 7.1. 4=124 = 7.1.8 = 167 125 * Improvement: template settings min width on smaller screens 168 126 * Improvement: Introduction tour on smaller screens not showing correctly 169 127 170 = 7.1.3 = 128 = 7.1.7 = 129 * Fix: license activation and updating not possible due to name change of plugin 130 131 = 7.1.6 = 171 132 * fix image change in preview mode 172 133 * fix stretched image in print view 173 134 * fix for shortcode matching with Gutenberg icw elementor 174 135 175 = 7.1.2 = 136 = 7.1.5 = 137 * Improvement: allow for mixed fraction numbers without spaces 138 139 = 7.1.4 = 140 * Fix: saving of admin notifications 141 142 = 7.1.3 = 176 143 * Fix: Images in instructions/ingredients were overriden by recipe image, if provided 177 144 * Fix: quotes resulted in double quotes on save in notes field 178 145 179 = 7.1. 1=146 = 7.1.2 = 180 147 * Improvement: prevent overriding nutrition label style by themes 148 * Fix: pattern recognition issue in serving adjustment 181 149 * Fix: bold and italic css for Zip Recipes markup 182 150 * Fix: make sure demo recipe is installed only once 183 151 184 = 7.1.0 = 152 = 7.1.1 = 153 * Improvement: catch not existing curl 154 * Improvement: option to add nutrition disclaimer on nutritional text values 185 155 * Improvement: template save button also in template editor preview 186 156 187 = 7.0. 6=157 = 7.0.13 = 188 158 * Fix: default setting for hide print image cause it to show as enabled after disabling it 189 159 * Fix: legacy image width setting still listed settings. 190 160 191 = 7.0.5 = 161 = 7.0.12 = 162 * Fix: for the unit 'g', the regex was not replacing the unit correctly 192 163 * Fix: support line breaks in notes and summary 193 164 * Improvement: also allow image editing outside preview 194 165 166 = 7.0.11 = 167 * Fix: Custom author option not enabled 168 * Fix: preview image not updating immediately after change 169 170 = 7.0.10 = 171 * Fix: preview numbering 172 173 = 7.0.9 = 174 * Fix: pinterest and reddit not sharing correctly 175 176 = 7.0.8 = 177 * Fix: numbering restarting after image in ingredients/instructions props @yaneli20 178 179 = 7.0.7 = 180 * Fix: categories check using term_exists instead of is_category 181 182 = 7.0.6 = 183 * Use title as fallback for description, when summary is empty 184 * Fix: recipe reviews not saving correctly 185 186 = 7.0.5 = 187 * Removed delay in preview 188 * Changed hyperlinks into divs for ratings/reviews, to prevent bot clickings 189 195 190 = 7.0.4 = 196 * Fix: preview image not updating immediately after change 191 * Improvement: better preview functionality, making reloading on typing obsolete, and possibly fixing "blocked" messages from security tools 192 * Improvement: improved grid structure with half blocks, which in some themes could cause the blocks not te show next to each other 197 193 198 194 = 7.0.3 = 199 * Fix: pinterest and reddit not sharing correctly 195 * Improvement: show warning when preview is blocked 196 * Fix:inline shortcodes parsing for ingredients and instructions 200 197 201 198 = 7.0.2 = 202 * Fix: numbering restarting after image in ingredients/instructions props @yaneli20 199 * Fix: recipeCategory array not converted to strings 200 * Fix: class in "add recipes" button caused unreadable style in other color schemes. 201 * Fix: migration did not remove image block or recipe title block when these were set to "hide" 203 202 204 203 = 7.0.1 = 205 * Fix: categories check using term_exists instead of is_category 204 * Fix: prevent css override on nobullets css style 205 * Improvement: Rich Snippets video json: add description fallback if no summary provided, and add uploadDate 206 * Fix: instructions list did not contain css for the nobullets class 207 * Fix: Due to 7.0.0.1 version, which compares to 7.0.0 as smaller, upgrade kept running 208 209 = 7.0.0.1 = 210 * fix: remove log in sanitize function 206 211 207 212 = 7.0.0 = … … 212 217 * Improved Rich Snippet structure 213 218 * Improved customization options 214 * Drag & Drop recipe template editor219 * Drag & Drop recipe template 215 220 * Added overridable templates 216 221 217 = 6.4.7 =218 * Fix: prevent plugin conflicts with the review notice.219 220 = 6.4.6 =221 * Fix: Jump to recipe link not translatable222 * Fix: fallback for rich snippet images if no post or recipe image is found223 222 224 223 = 6.4.5 = 225 * Fix: in nutrition label, Yield was missing, and serving size on the yield spot 226 * Fix breaking of links in ingredients when using metric imperial 227 * Don't show jump to recipes button on non-recipe pages 228 * Add option to show summary on archive pages 224 * Fix: notifications settings not showing correctly 229 225 230 226 = 6.4.4 = 231 * Added "jump to recipes" feature232 * Fix: When Elementor is enabled, but not used, Zip Recipes may not recognize a post as being linked to the recipe233 234 = 6.4.3 =235 * Improvement: added "edit recipe" button to toolbar236 237 = 6.4.2 =238 227 * Fix: prevent reviews and ratings from being active at the same time 239 228 * Improvement: add option to disable notifications for ratings 240 229 230 = 6.4.3 = 231 * Fix: ajax hooks called too late, causing the ajax submissions of ratings not to work. 232 233 = 6.4.2 = 234 * Fix loading of add ons on certain configurations 235 241 236 = 6.4.0 = 242 * New settings page style 243 244 = 6.1.7 = 237 * New: notify the administrator when a rating or review is received 238 * Fix: when generating nutrition data, take not saved changes into account 239 * Tweak: new settings page design and technical structure 240 241 = 6.3.9 = 242 * Tweak: added option to load Grid Recipes with ajax 245 243 * Fix: search on recipe overview page 246 244 247 = 6.1.6 = 245 = 6.3.8 = 246 * Tweak: Recipe Grid could show some spaces on first pageload, because the actual window size was not exactly known yet. By recalculating the grid after 500 ms, this is corrected. 247 248 = 6.3.7 = 249 * Tweak: Edamam attribution 250 251 = 6.3.6 = 252 * Tweak: use display_name instead of nicename 253 254 = 6.3.5 = 255 * Tweak: improved review notice 256 257 = 6.3.4 = 258 * Fix: WordPress 5.3 compatibility issue with grid2 gutenberg block 259 260 = 6.3.3 = 261 * Fix: too loose regex causing the metric conversion to recognize words incorrectly as units 262 263 = 6.3.2 = 264 * Remove cup from imperial metric until there's a more dependable solution 265 266 = 6.3.1 = 248 267 * Added filter to override print CSS url 249 * Execute shortcodes in recipe 250 251 = 6.1.5 = 268 * Fix: CSS bug because of to generic CSS style 269 270 = 6.3.0 = 271 * Imperial metric converter 272 273 = 6.2.6 = 274 * Fix: calculation of serving adjustment not correct when jumping more than one unit at a time (e.g from 2 => 4 servings instead of 2=>3) 275 276 = 6.2.5 = 277 * Improvement: use default item prop for rating 278 279 = 6.2.4 = 280 * Improvement: extended rating feature with recipe details 281 282 = 6.2.3 = 283 * Fix: rating ratingCount checked in json instead of count 284 285 = 6.2.2 = 252 286 * Fix: inverted formate for small snippet image 253 287 * Fix: post categories not used 254 288 255 = 6. 1.4=289 = 6.2.1 = 256 290 * New: Customize the generated rich snippets images 257 291 * New: three different rich snippet images with different image ratio's 258 292 * Fix: saving and deleting of image not working correctly when the save button is used after the change. 259 293 260 = 6.1.3 = 294 = 6.2.0 = 295 * New: Recipe Grid new style 296 297 = 6.1.1 = 261 298 * Fix: print styles for default theme 262 299 * Improvement: language strings for wp repo 263 300 264 = 6.1.2 =265 * Fix: pre php 7 compatibility266 267 = 6.1.1 =268 * Fix: when no language folder is present, no check on free languages files should be made269 270 301 = 6.1.0 = 271 * improvement: HTML and CSS styled nutrition label302 * fix: print style did not include nutrition label html and css yet 272 303 * language files from the plugin should not get overridden by wp.org translations 273 304 * Added option to switch between text and html/css label 305 306 = 6.0.8 = 307 * fix: notices auto hiding, even when they should not auto hide 308 * Fix: some nutritional data was not being saved 274 309 275 310 = 6.0.7 = … … 280 315 281 316 = 6.0.6 = 317 * Strip tags from description in JSON output 282 318 * Added review notice for free users 283 319 * set nutrition info to show by default 284 320 * Pull recipe title from post in classic editor popup 321 322 * added small margin to right of recipe adjustment input box, and put it in CSS class for better customization 285 323 286 324 = 6.0.5 = … … 289 327 * Added option to clear image 290 328 * Use different variable for JSON image, which can fallback to post image 329 * Fixed issue in recipe adjustment caused by move to json for schema.org 291 330 292 331 = 6.0.4 = 293 332 * Enforce not loading of styles when this option is disabled 294 333 * Grab post title as default recipe title 334 * Set yummly share button to smaller width, to prevent whitespace 295 335 * Use generic function for shortcode detection to ensure gutenberg compatibility (class.ziprecipes::amp_format) 296 336 * Improve schema.org by using only JSON LD, to prevent duplicate recipe detection … … 312 352 * User interface redesign 313 353 314 = 5.0.1 1=315 * Changed recipe image to large instead of full316 * Updated Twig library, fixing some compatibility issues with other twig using plugins, and lowering install size354 = 5.0.13 = 355 * Updated Twig library 356 * Allow index to show pages as well as posts 317 357 * Fix possible time parsing issue when time is entered as 1/2h instead of 0h30m 318 358 * Fixes some untranslatable strings 319 359 360 = 5.0.12 = 361 * Changed recipe image to large instead of full 362 * Added option to show nutrition label as schema.org html/css 363 * Added option to show nutrition label with a widget 364 * Added option to hide nutrition label 365 * Added option to hide other nutrition info 366 367 = 5.0.11 = 368 * limit bootstrap to back-end 369 320 370 = 5.0.10 = 321 * Fix: r oll back of dynamic version detection371 * Fix: renamed licensing.php file to Licensing.php to fix licensing file not loading on some hosts 322 372 323 373 = 5.0.9 = 324 * Fix: dropped caching twig files374 * Fix: order of constant declaration could cause plugin conflicts 325 375 326 376 = 5.0.8 = 377 * Fix: author did not save when only one author available 378 379 = 5.0.7 = 380 * Fix: include author in Gutenberg 381 382 = 5.0.6 = 383 * Fix: URL to print view styles not correct for some themes 327 384 * Fix: Gutenberg could cause an error in some situations 328 * Tweak: Use alt for image when available 329 330 = 5.0.7 = 385 * Fix: compatibility issue with MailPoet 386 * Tweak: use alt text as default for image alt texts 331 387 * Tweak: cache directory moved to uploads folder 332 333 = 5.0.6 =334 * Tweak: use alt attribute if available in image335 * Fix: compatibility issue with MailPoet336 388 * Tweak: Changed cached directory 337 389 -
zip-recipes/trunk/src/block.php
r2398599 r3080913 48 48 wp_enqueue_script( 49 49 'zrdn-block', // Handle. 50 plugins_url( '/ dist/blocks.build.js', dirname( __FILE__ ) ), // Block.build.js: We register the block here. Built with Webpack.50 plugins_url( '/build/blocks.js', dirname( __FILE__ ) ), // Block.build.js: We register the block here. Built with Webpack. 51 51 array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor', 'wp-api' ), // Dependencies, defined above. 52 filemtime( plugin_dir_path( __DIR__ ) . ' dist/blocks.build.js' ), // Version: File modification time.52 filemtime( plugin_dir_path( __DIR__ ) . 'build/blocks.js' ), // Version: File modification time. 53 53 true // Enqueue the script in the footer. 54 54 ); … … 62 62 'zrdn_recipe_preview' => trailingslashit(ZRDN_PLUGIN_URL). 'images/recipe-preview.png', 63 63 'zrdn_grid_preview' => trailingslashit(ZRDN_PLUGIN_URL). 'images/grid-preview.png', 64 64 'active_blocks' => ZipRecipes::get_all_usable_blocks(), 65 65 ) 66 66 ); … … 71 71 wp_enqueue_style( 72 72 'zrdn-block', // Handle. 73 trailingslashit(ZRDN_PLUGIN_URL) . " dist/blocks.style.build.css", array( 'wp-edit-blocks' ), ZRDN_VERSION_NUM73 trailingslashit(ZRDN_PLUGIN_URL) . "build/blocks.css", array( 'wp-edit-blocks' ), ZRDN_VERSION_NUM 74 74 ); 75 75 … … 96 96 } 97 97 98 function zrdn_render_block_nutrition_label($attributes) 99 { 100 $html = __('Please select a recipe', 'zip-recipes'); 101 if (isset($attributes['recipe_id']) && absint($attributes['recipe_id'])) { 102 $html = do_shortcode( '[zrdn-nutrition-label recipe_id=' . absint($attributes['recipe_id']) . ']'); 103 } 104 105 return $html; 106 } 107 108 98 109 register_block_type('zip-recipes/recipe-block', array( 99 110 'render_callback' => __NAMESPACE__ . '\zrdn_render_document_block', 100 111 )); 101 112 113 register_block_type('zip-recipes/nutrition-label', array( 114 'attributes' => [ 115 'recipe_id' => [ 116 'type' => 'string', 117 'default' => '', 118 ] 119 ], 120 'render_callback' => __NAMESPACE__ . '\zrdn_render_block_nutrition_label', 121 )); -
zip-recipes/trunk/src/block/editor.scss
r2278327 r3080913 5 5 * which makes it higher in priority. 6 6 */ 7 7 @import "../common"; -
zip-recipes/trunk/src/block/style.scss
r2107903 r3080913 1 @import "../common"; -
zip-recipes/trunk/src/blocks.js
r2107900 r3080913 11 11 12 12 import './block/block.js'; 13 import './nutrition-label/block.js'; -
zip-recipes/trunk/zip-recipes.php
r2985911 r3080913 1 1 <?php 2 2 3 /* 3 Plugin Name: Zip Recipes 4 Text Domain: zip-recipes 5 Domain Path: /languages 6 Plugin URI: http://www.ziprecipes.net/ 7 Plugin GitHub: https://github.com/Really-Simple-Plugins/zip-recipes-free 8 Description: A plugin that adds all the necessary microdata to your recipes, so they will show up in Google's Recipe Search 9 Version: 8.1.1 10 Author: Really Simple Plugins 11 Author URI: https://www.really-simple-plugins.com/ 12 License: GPL2 13 Copyright 2022 Really Simple Plugins 14 This code is derived from the 2.6 version build of ZipList Recipe Plugin released by ZipList Inc.: 15 http://get.ziplist.com/partner-with-ziplist/wordpress-recipe-plugin/ and licensed under GPL2 or later 4 Plugin Name: Zip Recipes Lover 5 Text Domain: zip-recipes 6 Domain Path: /languages 7 Plugin URI: https://ziprecipes.net/ 8 Plugin GitHub: https://github.com/really-simple-plugins/zip-recipes-free 9 Description: A plugin that adds all the necessary microdata to your recipes, so they will show up in Google's Recipe Search 10 Version: 8.2.6 11 Author: Igor Benić 12 Author URI: https://ibenic.com/ 13 License: GPLv3 or later 14 Copyright 2020 Rogier Lankhorst 16 15 */ 17 18 /* Copyright 2022 Zip Recipes BV (email : [email protected]) 19 This program is free software; you can redistribute it and/or modify 20 it under the terms of the GNU General Public License, version 2, as 21 published by the Free Software Foundation. 22 This program is distributed in the hope that it will be useful, 16 /* 17 Zip Recipes is free software: you can redistribute it and/or modify 18 it under the terms of the GNU General Public License as published by 19 the Free Software Foundation, either version 3 of the License, or 20 (at your option) any later version. 21 22 Zip Recipes Plugin is distributed in the hope that it will be useful, 23 23 but WITHOUT ANY WARRANTY; without even the implied warranty of 24 24 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 25 25 GNU General Public License for more details. 26 26 27 You should have received a copy of the GNU General Public License 27 along with this program; if not, write to the Free Software 28 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 28 along with Zip Recipes Plugin. If not, see <http://www.gnu.org/licenses/>. 29 29 */ 30 31 30 namespace ZRDN; 32 defined('ABSPATH') or die("Error! Cannot be called directly."); 33 34 if (!function_exists(__NAMESPACE__ . '\zrdn_activation_check')) { 35 /** 36 * Checks if the plugin can safely be activated, at least php 5.6 and wp 4.6 37 * @since 7.0.0 38 */ 39 function zrdn_activation_check() 40 { 41 if (version_compare(PHP_VERSION, '7.2', '<')) { 42 deactivate_plugins(plugin_basename(__FILE__)); 43 wp_die(__('Zip Recipes cannot be activated. The plugin requires PHP 7.2 or higher', 'zip-recipes')); 44 } 45 46 global $wp_version; 47 if (version_compare($wp_version, '4.9', '<')) { 48 deactivate_plugins(plugin_basename(__FILE__)); 49 wp_die(__('Zip Recipes cannot be activated. The plugin requires WordPress 4.9 or higher', 'zip-recipes')); 50 } 51 } 52 register_activation_hook( __FILE__, __NAMESPACE__ . '\zrdn_activation_check' ); 53 } 54 55 if (defined('ZRDN_PLUGIN_BASENAME')) { 56 if (defined('ZRDN_FREE')) { 57 deactivate_plugins('zip-recipes/zip-recipes.php'); 58 //add_action('admin_notices', __NAMESPACE__ . '\zrdn_notice_free_active'); 59 }elseif (defined('ZRDN_PRODUCT_ID') && ZRDN_PRODUCT_ID === 1851 ) { 60 deactivate_plugins('zip-recipes-friend/zip-recipes-friend.php'); 61 //add_action('admin_notices', __NAMESPACE__ . '\zrdn_notice_free_active'); 62 } else { 63 deactivate_plugins('zip-recipes-lover/zip-recipes-lover.php'); 64 } 31 32 // Make sure we don't expose any info if called directly 33 defined( 'ABSPATH' ) or die( "Error! Cannot be called directly." ); 34 if ( !function_exists( '\\ZRDN\\zr_fs' ) ) { 35 // Create a helper function for easy SDK access. 36 function zr_fs() { 37 global $zr_fs; 38 if ( !isset( $zr_fs ) ) { 39 // Include Freemius SDK. 40 require_once dirname( __FILE__ ) . '/freemius/start.php'; 41 $zr_fs = fs_dynamic_init( array( 42 'id' => '14746', 43 'slug' => 'zip-recipes', 44 'premium_slug' => 'zip-recipes-lover', 45 'type' => 'plugin', 46 'public_key' => 'pk_8fce9733a1349d1c76abfbef87413', 47 'is_premium' => false, 48 'premium_suffix' => 'Lover', 49 'has_addons' => false, 50 'has_paid_plans' => true, 51 'menu' => array( 52 'slug' => 'zrdn-recipes', 53 'support' => false, 54 ), 55 'is_live' => true, 56 ) ); 57 } 58 return $zr_fs; 59 } 60 61 // Init Freemius. 62 zr_fs(); 63 function zr_fs_custom_connect_message_on_update( 64 $message, 65 $user_first_name, 66 $plugin_title, 67 $user_login, 68 $site_link, 69 $freemius_link 70 ) { 71 return sprintf( 72 __( 'Hey %1$s' ) . ',<br>' . __( 'Please help us improve %2$s! If you opt-in, some data about your usage of %2$s will be sent to %5$s. If you skip this, that\'s okay! %2$s will still work just fine.', 'zip-recipes' ), 73 $user_first_name, 74 '<b>' . $plugin_title . '</b>', 75 '<b>' . $user_login . '</b>', 76 $site_link, 77 $freemius_link 78 ); 79 } 80 81 zr_fs()->add_filter( 82 'connect_message_on_update', 83 __NAMESPACE__ . '\\zr_fs_custom_connect_message_on_update', 84 10, 85 6 86 ); 87 $old_edd_license = get_option( 'zrdn_license_key' ); 88 if ( $old_edd_license ) { 89 zr_fs()->override_i18n( array( 90 'activate-free-version' => __( "Continue using your old license", 'zip-recipes' ), 91 ) ); 92 } 93 // Signal that SDK was initiated. 94 do_action( 'zr_fs_loaded' ); 95 } 96 if ( !function_exists( __NAMESPACE__ . '\\zrdn_activation_check' ) ) { 97 /** 98 * Checks if the plugin can safely be activated, at least php 5.6 and wp 4.6 99 * @since 7.0.0 100 */ 101 function zrdn_activation_check() { 102 if ( version_compare( PHP_VERSION, '7.2', '<' ) ) { 103 deactivate_plugins( plugin_basename( __FILE__ ) ); 104 wp_die( __( 'Zip Recipes cannot be activated. The plugin requires PHP 7.2 or higher', 'zip-recipes' ) ); 105 } 106 global $wp_version; 107 if ( version_compare( $wp_version, '4.9', '<' ) ) { 108 deactivate_plugins( plugin_basename( __FILE__ ) ); 109 wp_die( __( 'Zip Recipes cannot be activated. The plugin requires WordPress 4.9 or higher', 'zip-recipes' ) ); 110 } 111 if ( file_exists( WP_CONTENT_DIR . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . 'zip-recipes-premium' . DIRECTORY_SEPARATOR . 'zip-recipes-lover.php' ) ) { 112 deactivate_plugins( 'zip-recipes-premium/zip-recipes-lover.php' ); 113 } 114 } 115 116 register_activation_hook( __FILE__, __NAMESPACE__ . '\\zrdn_activation_check' ); 117 } 118 if ( defined( 'ZRDN_PLUGIN_BASENAME' ) ) { 119 if ( defined( 'ZRDN_FREE' ) ) { 120 deactivate_plugins( 'zip-recipes/zip-recipes.php' ); 121 //add_action('admin_notices', __NAMESPACE__ . '\zrdn_notice_free_active'); 122 } elseif ( defined( 'ZRDN_PRODUCT_ID' ) && ZRDN_PRODUCT_ID === 1851 ) { 123 deactivate_plugins( 'zip-recipes-friend/zip-recipes-friend.php' ); 124 //add_action('admin_notices', __NAMESPACE__ . '\zrdn_notice_free_active'); 125 } elseif ( file_exists( WP_CONTENT_DIR . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . 'zip-recipes-premium' . DIRECTORY_SEPARATOR . 'zip-recipes-lover.php' ) ) { 126 deactivate_plugins( 'zip-recipes-premium/zip-recipes-lover.php' ); 127 } else { 128 deactivate_plugins( 'zip-recipes-lover/zip-recipes-lover.php' ); 129 } 65 130 } else { 66 define('ZRDN_PATH', plugin_dir_path( __FILE__ ) ); 67 define('ZRDN_FREE', true); 68 define('ZRDN_PLUGIN_DIRECTORY_URL', plugin_dir_url( __FILE__ )); 69 define('ZRDN_PLUGIN_BASENAME', plugin_basename(__FILE__)); 70 define('ZRDN_PLUGIN_URL', sprintf('%s/%s/', plugins_url(), dirname(plugin_basename(__FILE__)))); 71 define('ZRDN_API_URL', "https://api.ziprecipes.net"); 72 define('ZRDN_RECIPEDATABASE_URL', 'https://share.ziprecipes.net/'); 73 define('ZRDN_PLUGIN_PRODUCT_NAME', 'Zip Recipes' ); 74 $debug = (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) ? time() : ''; 75 define('ZRDN_VERSION_NUM', '8.1.1' . $debug); 76 77 add_action('plugins_loaded', __NAMESPACE__ . '\init', 9); 78 } 79 80 if (!function_exists(__NAMESPACE__ . '\init')) { 81 function init( $className ) { 82 require_once( ZRDN_PATH . '/models/Recipe.php' ); 83 require_once( ZRDN_PATH . '_inc/class.ziprecipes.util.php' ); 84 require_once( ZRDN_PATH . 'class.ziprecipes.php' ); 85 require_once( ZRDN_PATH . 'class-review.php' ); 86 require_once( ZRDN_PATH . '_inc/helper_functions.php' ); 87 require_once( ZRDN_PATH . '_inc/PluginBase.php' ); 88 require_once( ZRDN_PATH . 'RecipeTable/RecipeMenu.php' ); 89 require_once( ZRDN_PATH . 'NutritionLabel/NutritionLabel.php' ); 90 91 if ( is_admin() ) { 92 require_once( ZRDN_PATH . 'upgrade-zip.php' ); 93 require_once( ZRDN_PATH . 'grid/grid-enqueue.php' ); 94 require_once( ZRDN_PATH . 'class-field.php' ); 95 require_once( ZRDN_PATH . 'shepherd/tour.php' ); 96 97 } 98 /** 99 * Recipe sharing 100 */ 101 require_once( ZRDN_PATH . 'sharing/class-recipe-sharing-admin.php' ); 102 103 /** 104 * API endpoint & Basic Auth 105 */ 106 require_once( ZRDN_PATH . "controllers/Response.php" ); 107 require_once( ZRDN_PATH . "controllers/EndpointController.php" ); 108 if ( ! function_exists( 'is_plugin_active' ) ) { 109 require_once( ABSPATH . '/wp-admin/includes/plugin.php' ); 110 } 111 ZipRecipes::init(); 112 } 113 } 114 115 if (!function_exists(__NAMESPACE__ . '\zrdn_set_defaults')) { 116 register_activation_hook( __FILE__, __NAMESPACE__ . '\zrdn_set_defaults' ); 117 118 /** 119 * set defaults on activation 120 */ 121 122 function zrdn_set_defaults() { 123 if (!get_option('zrdn_defaults_set')) { 124 //set some defaults 125 $settings = get_option('zrdn_settings_general'); 126 $zrdn_print['show_summary_on_archive_pages'] = true; 127 update_option('zrdn_settings_general', $settings); 128 129 update_option('zrdn_defaults_set', true); 130 } 131 } 132 } 133 134 if (!function_exists(__NAMESPACE__ . '\zrdn_check_translations')) { 135 register_activation_hook(__FILE__, __NAMESPACE__ . '\zrdn_check_translations'); 136 function zrdn_check_translations(){ 137 //dirname with levels does not exist before php 7 138 if (version_compare(PHP_VERSION, '7.0', '<')) return; 139 140 $path = dirname(ZRDN_PATH, 2)."/languages/plugins/"; 141 if (!file_exists($path)) return; 142 143 $extensions = array("po", "mo"); 144 if ($handle = opendir($path)) { 145 while (false !== ($file = readdir($handle))) { 146 if ($file != "." && $file != "..") { 147 $file = $path . '/' . $file; 148 $ext = strtolower(pathinfo($file, PATHINFO_EXTENSION)); 149 if (is_file($file) && in_array($ext, $extensions) && strpos($file, 'zip-recipes')!==FALSE && strpos($file, 'backup')===FALSE) { 150 //copy to new file 151 $new_name = str_replace('zip-recipes','zip-recipes-backup',$file); 152 153 rename($file, $new_name); 154 } 155 } 156 } 157 closedir($handle); 158 } 159 } 160 } 161 131 define( 'ZRDN_PLUGIN_PRODUCT_URL', 'https://ziprecipes.net/downloads/zip-recipes-lover' ); 132 define( 'ZRDN_PLUGIN_PRODUCT_FILE', __FILE__ ); 133 define( 'ZRDN_PLUGIN_DIRECTORY_URL', plugin_dir_url( __FILE__ ) ); 134 define( 'ZRDN_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); 135 define( 'ZRDN_PLUGIN_URL', sprintf( '%s/%s/', plugins_url(), dirname( plugin_basename( __FILE__ ) ) ) ); 136 define( 'ZRDN_API_URL', "https://api.ziprecipes.net" ); 137 define( 'ZRDN_PATH', plugin_dir_path( __FILE__ ) ); 138 define( 'ZRDN_PLUGIN_PRODUCT_NAME', 'Zip Recipes Lover' ); 139 $debug = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? time() : '' ); 140 define( 'ZRDN_VERSION_NUM', '8.2.4' . $debug ); 141 if ( !defined( 'ZRDN_PREMIUM' ) ) { 142 define( 'ZRDN_FREE', true ); 143 } 144 add_action( 'plugins_loaded', __NAMESPACE__ . '\\init', 9 ); 145 } 146 /** 147 * --exclude=plugins/AutomaticNutrition* 148 * --exclude=plugins/Authors* 149 * --exclude=plugins/CustomTemplates* 150 * --exclude=plugins/ImperialMetricsConverter* 151 * --exclude=plugins/Import* 152 * --exclude=plugins/Licensing* 153 * --exclude=plugins/MostPopularRecipes* 154 * --exclude=plugins/RecipeActions* 155 * --exclude=plugins/RecipeReviews* 156 * --exclude=plugins/RecipeSearch* 157 * --exclude=plugins/ServingAdjustment* 158 * --exclude=plugins/VisitorRating* 159 * --exclude=plugins/_internal* 160 * --exclude=*languages/zip-recipes*.po 161 * --exclude=*languages/zip-recipes*.mo zip-recipes-lover/. zip-recipes/ 162 */ 163 if ( !function_exists( __NAMESPACE__ . '\\init' ) ) { 164 function init( $className ) { 165 require_once ZRDN_PATH . '/models/Recipe.php'; 166 require_once ZRDN_PATH . '_inc/class.ziprecipes.util.php'; 167 require_once ZRDN_PATH . 'class.ziprecipes.php'; 168 require_once ZRDN_PATH . 'class-review.php'; 169 require_once ZRDN_PATH . '_inc/helper_functions.php'; 170 require_once ZRDN_PATH . '_inc/PluginBase.php'; 171 require_once ZRDN_PATH . 'RecipeTable/RecipeMenu.php'; 172 require_once ZRDN_PATH . 'NutritionLabel/NutritionLabel.php'; 173 require_once ZRDN_PATH . 'cron/cron.php'; 174 if ( is_admin() ) { 175 require_once ZRDN_PATH . 'upgrade-zip.php'; 176 require_once ZRDN_PATH . 'grid/grid-enqueue.php'; 177 require_once ZRDN_PATH . 'class-field.php'; 178 require_once ZRDN_PATH . 'shepherd/tour.php'; 179 } 180 /** 181 * API endpoint & Basic Auth 182 */ 183 require_once ZRDN_PATH . "controllers/Response.php"; 184 require_once ZRDN_PATH . "controllers/EndpointController.php"; 185 if ( !function_exists( 'is_plugin_active' ) ) { 186 require_once ABSPATH . '/wp-admin/includes/plugin.php'; 187 } 188 ZipRecipes::init(); 189 } 190 191 } 192 if ( !function_exists( __NAMESPACE__ . '\\zrdn_set_defaults' ) ) { 193 register_activation_hook( __FILE__, __NAMESPACE__ . '\\zrdn_set_defaults' ); 194 /** 195 * set defaults on activation 196 */ 197 function zrdn_set_defaults() { 198 if ( !get_option( 'zrdn_defaults_set' ) ) { 199 //set some defaults 200 $settings = get_option( 'zrdn_settings_general' ); 201 $zrdn_print['show_summary_on_archive_pages'] = true; 202 update_option( 'zrdn_settings_general', $settings ); 203 update_option( 'zrdn_defaults_set', true ); 204 } 205 } 206 207 } 208 if ( !function_exists( __NAMESPACE__ . '\\zrdn_check_translations' ) ) { 209 register_activation_hook( __FILE__, __NAMESPACE__ . '\\zrdn_check_translations' ); 210 function zrdn_check_translations() { 211 //dirname with levels does not exist before php 7 212 if ( version_compare( PHP_VERSION, '7.0', '<' ) ) { 213 return; 214 } 215 $path = dirname( ZRDN_PATH, 2 ) . "/languages/plugins/"; 216 if ( !file_exists( $path ) ) { 217 return; 218 } 219 $extensions = array("po", "mo"); 220 if ( $handle = opendir( $path ) ) { 221 while ( false !== ($file = readdir( $handle )) ) { 222 if ( $file != "." && $file != ".." ) { 223 $file = $path . '/' . $file; 224 $ext = strtolower( pathinfo( $file, PATHINFO_EXTENSION ) ); 225 if ( is_file( $file ) && in_array( $ext, $extensions ) && strpos( $file, 'zip-recipes' ) !== FALSE && strpos( $file, 'backup' ) === FALSE ) { 226 //copy to new file 227 $new_name = str_replace( 'zip-recipes', 'zip-recipes-backup', $file ); 228 rename( $file, $new_name ); 229 } 230 } 231 } 232 closedir( $handle ); 233 } 234 } 235 236 } 162 237 /** 163 238 * Load iframe has to hook into admin init, otherwise languages are not loaded yet. 164 239 * 165 240 * */ 166 if (!function_exists(__NAMESPACE__ . '\zrdn_maybe_load_iframe')) { 167 function zrdn_maybe_load_iframe() 168 { 169 // Setup query catch for recipe insertion popup. 170 if (strpos($_SERVER['REQUEST_URI'], 'media-upload.php') && strpos($_SERVER['REQUEST_URI'], '&type=z_recipe') && !strpos($_SERVER['REQUEST_URI'], '&wrt=')) { 171 // pluggable.php is needed for current_user_can 172 require_once(ABSPATH . 'wp-includes/pluggable.php'); 173 174 // user is logged in and can edit posts or pages 175 if (\current_user_can('edit_posts') || \current_user_can('edit_pages')) { 176 $get_info = $_REQUEST; 177 $post_id = isset($get_info["post_id"]) ? intval($get_info["post_id"]) : 0; 178 179 if (isset($get_info["recipe_post_id"]) && 180 !isset($get_info["add-recipe-button"]) && 181 strpos($get_info["recipe_post_id"], '-') !== false 182 ) { // EDIT recipe 183 $recipe_id = preg_replace('/[0-9]*?\-/i', '', $get_info["recipe_post_id"]); 184 wp_redirect(add_query_arg(array("page"=>"zrdn-recipes","action"=>"new","id"=>$recipe_id, "post_id" => $post_id,"popup"=>true),admin_url("admin.php"))); 185 186 } else { // New recipe 187 wp_redirect(add_query_arg(array("page"=>"zrdn-recipes","action"=>"new", "post_id" => $post_id,"popup"=>true),admin_url("admin.php"))); 188 } 189 } 190 exit; 191 } 192 } 193 add_action('admin_init', __NAMESPACE__ . '\zrdn_maybe_load_iframe', 30); 194 } 195 196 if ( ! function_exists( __NAMESPACE__ . '\zrdn_start_tour' ) ) { 197 /** 198 * Start the tour of the plugin on activation 199 */ 200 function zrdn_start_tour() { 201 if ( ! get_site_option( 'zrdn_tour_shown_once' ) ) { 202 update_site_option( 'zrdn_tour_started', true ); 203 } 204 } 205 206 register_activation_hook( __FILE__, __NAMESPACE__ . '\zrdn_start_tour' ); 207 } 241 if ( !function_exists( __NAMESPACE__ . '\\zrdn_maybe_load_iframe' ) ) { 242 function zrdn_maybe_load_iframe() { 243 // Setup query catch for recipe insertion popup. 244 if ( strpos( $_SERVER['REQUEST_URI'], 'media-upload.php' ) && strpos( $_SERVER['REQUEST_URI'], '&type=z_recipe' ) && !strpos( $_SERVER['REQUEST_URI'], '&wrt=' ) ) { 245 // pluggable.php is needed for current_user_can 246 require_once ABSPATH . 'wp-includes/pluggable.php'; 247 // user is logged in and can edit posts or pages 248 if ( \current_user_can( 'edit_posts' ) || \current_user_can( 'edit_pages' ) ) { 249 $get_info = $_REQUEST; 250 $post_id = ( isset( $get_info["post_id"] ) ? intval( $get_info["post_id"] ) : 0 ); 251 if ( isset( $get_info["recipe_post_id"] ) && !isset( $get_info["add-recipe-button"] ) && strpos( $get_info["recipe_post_id"], '-' ) !== false ) { 252 // EDIT recipe 253 $recipe_id = preg_replace( '/[0-9]*?\\-/i', '', $get_info["recipe_post_id"] ); 254 wp_redirect( add_query_arg( array( 255 "page" => "zrdn-recipes", 256 "action" => "new", 257 "id" => $recipe_id, 258 "post_id" => $post_id, 259 "popup" => true, 260 ), admin_url( "admin.php" ) ) ); 261 } else { 262 // New recipe 263 wp_redirect( add_query_arg( array( 264 "page" => "zrdn-recipes", 265 "action" => "new", 266 "post_id" => $post_id, 267 "popup" => true, 268 ), admin_url( "admin.php" ) ) ); 269 } 270 } 271 exit; 272 } 273 } 274 275 add_action( 'admin_init', __NAMESPACE__ . '\\zrdn_maybe_load_iframe', 30 ); 276 } 277 if ( !function_exists( __NAMESPACE__ . '\\zrdn_start_tour' ) ) { 278 /** 279 * Start the tour of the plugin on activation 280 */ 281 function zrdn_start_tour() { 282 if ( !get_site_option( 'zrdn_tour_shown_once' ) ) { 283 update_site_option( 'zrdn_tour_started', true ); 284 } 285 } 286 287 register_activation_hook( __FILE__, __NAMESPACE__ . '\\zrdn_start_tour' ); 288 }
Note: See TracChangeset
for help on using the changeset viewer.