| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: WP Delicious |
| 4 |
* Plugin URI: https://wpdelicious.com/docs/ |
| 5 |
* Description: A powerful recipe plugin to create and display recipes for bloggers. SEO optimized and Schema-friendly to rank recipes higher on search engines. |
| 6 |
* Author: WP Delicious |
| 7 |
* Author URI: https://wpdelicious.com |
| 8 |
* License: GPLv3 or later |
| 9 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.html |
| 10 |
* Text Domain: delicious-recipes |
| 11 |
* Domain Path: /languages |
| 12 |
* Version: 1.10.7 |
| 13 |
* Requires at least: 5.8 |
| 14 |
* Tested up to: 7.1 |
| 15 |
* Requires PHP: 7.4 |
| 16 |
* |
| 17 |
* @package Delicious_Recipes |
| 18 |
*/ |
| 19 |
|
| 20 |
use WP_Delicious\DeliciousRecipes; |
| 21 |
|
| 22 |
defined( 'ABSPATH' ) || exit; |
| 23 |
|
| 24 |
if ( ! function_exists( 'delicious_recipes_fs' ) ) { |
| 25 |
/** |
| 26 |
* Helper function to access the instance of Delicious Recipes SDK. |
| 27 |
* |
| 28 |
* @return DeliciousRecipes |
| 29 |
*/ |
| 30 |
function delicious_recipes_fs() { |
| 31 |
global $delicious_recipes_fs; |
| 32 |
|
| 33 |
if ( ! isset( $delicious_recipes_fs ) ) { |
| 34 |
// Include Freemius SDK. |
| 35 |
require_once __DIR__ . '/src/lib/freemius/start.php'; |
| 36 |
|
| 37 |
$first_time_activation_flag = get_option( 'delicious_recipes_first_time_activation_flag', false ); |
| 38 |
|
| 39 |
$slug = false === $first_time_activation_flag ? 'delicious-recipes-onboard' : 'delicious_recipes_global_settings'; |
| 40 |
|
| 41 |
$delicious_recipes_fs = fs_dynamic_init( |
| 42 |
array( |
| 43 |
'id' => '7284', |
| 44 |
'slug' => 'delicious-recipes', |
| 45 |
'type' => 'plugin', |
| 46 |
'public_key' => 'pk_85490c48c376203d6194ac3de232e', |
| 47 |
'is_premium' => false, |
| 48 |
'has_addons' => false, |
| 49 |
'has_paid_plans' => false, |
| 50 |
'menu' => array( |
| 51 |
'slug' => $slug, |
| 52 |
'account' => false, |
| 53 |
'contact' => false, |
| 54 |
'support' => false, |
| 55 |
'parent' => array( |
| 56 |
'slug' => 'delicious-recipes', |
| 57 |
), |
| 58 |
), |
| 59 |
) |
| 60 |
); |
| 61 |
} |
| 62 |
|
| 63 |
return $delicious_recipes_fs; |
| 64 |
} |
| 65 |
|
| 66 |
// Init Freemius. |
| 67 |
delicious_recipes_fs(); |
| 68 |
// Signal that parent SDK was initiated. |
| 69 |
do_action( '_loaded' ); |
| 70 |
// Signal that SDK was initiated. |
| 71 |
do_action( 'delicious_recipes_fs_loaded' ); |
| 72 |
} |
| 73 |
|
| 74 |
// Include the autoloader. |
| 75 |
require_once __DIR__ . '/vendor/autoload.php'; |
| 76 |
|
| 77 |
if ( ! defined( 'DELICIOUS_RECIPES_PLUGIN_FILE' ) ) { |
| 78 |
define( 'DELICIOUS_RECIPES_PLUGIN_FILE', __FILE__ ); |
| 79 |
} |
| 80 |
|
| 81 |
if ( ! defined( 'DELICIOUS_RECIPES_VERSION' ) ) { |
| 82 |
define( 'DELICIOUS_RECIPES_VERSION', '1.10.7' ); |
| 83 |
} |
| 84 |
|
| 85 |
/** |
| 86 |
* Return the main instance of DeliciousRecipes. |
| 87 |
* |
| 88 |
* @since 1.0.0 |
| 89 |
* @return DeliciousRecipes |
| 90 |
*/ |
| 91 |
function DEL_RECIPE() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid |
| 92 |
return DeliciousRecipes::instance(); |
| 93 |
} |
| 94 |
|
| 95 |
DEL_RECIPE(); |
| 96 |
|