@@ -1,4 +1,4 @@ |
||
| 1 | 1 | <?php return array( |
| 2 | - 'dependencies' => array( 'react', 'react-dom', 'wp-polyfill' ), |
|
| 3 | - 'version' => '2ad0b7d5866ced8d6cbad5ed030a5bbf', |
|
| 2 | + 'dependencies' => array( 'react', 'react-dom', 'wp-polyfill' ), |
|
| 3 | + 'version' => '2ad0b7d5866ced8d6cbad5ed030a5bbf', |
|
| 4 | 4 | ); |
@@ -1,4 +1,4 @@ |
||
| 1 | 1 | <?php return array( |
| 2 | - 'dependencies' => array( 'react', 'react-dom', 'wp-polyfill' ), |
|
| 2 | + 'dependencies' => array('react', 'react-dom', 'wp-polyfill'), |
|
| 3 | 3 | 'version' => '2ad0b7d5866ced8d6cbad5ed030a5bbf', |
| 4 | 4 | ); |
@@ -1,4 +1,4 @@ |
||
| 1 | 1 | <?php return array( |
| 2 | - 'dependencies' => array( 'react', 'react-dom', 'wp-hooks', 'wp-polyfill' ), |
|
| 3 | - 'version' => '4ee769e3e935bd4c640759ae3aecd7f0', |
|
| 2 | + 'dependencies' => array( 'react', 'react-dom', 'wp-hooks', 'wp-polyfill' ), |
|
| 3 | + 'version' => '4ee769e3e935bd4c640759ae3aecd7f0', |
|
| 4 | 4 | ); |
@@ -1,4 +1,4 @@ |
||
| 1 | 1 | <?php return array( |
| 2 | - 'dependencies' => array( 'react', 'react-dom', 'wp-hooks', 'wp-polyfill' ), |
|
| 2 | + 'dependencies' => array('react', 'react-dom', 'wp-hooks', 'wp-polyfill'), |
|
| 3 | 3 | 'version' => '4ee769e3e935bd4c640759ae3aecd7f0', |
| 4 | 4 | ); |
@@ -1,4 +1,4 @@ |
||
| 1 | 1 | <?php return array( |
| 2 | - 'dependencies' => array( 'react', 'react-dom', 'wp-hooks', 'wp-i18n', 'wp-polyfill' ), |
|
| 3 | - 'version' => '9b95359d39be315a15baf56dd5081f2f', |
|
| 2 | + 'dependencies' => array( 'react', 'react-dom', 'wp-hooks', 'wp-i18n', 'wp-polyfill' ), |
|
| 3 | + 'version' => '9b95359d39be315a15baf56dd5081f2f', |
|
| 4 | 4 | ); |
@@ -1,4 +1,4 @@ |
||
| 1 | 1 | <?php return array( |
| 2 | - 'dependencies' => array( 'react', 'react-dom', 'wp-hooks', 'wp-i18n', 'wp-polyfill' ), |
|
| 2 | + 'dependencies' => array('react', 'react-dom', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), |
|
| 3 | 3 | 'version' => '9b95359d39be315a15baf56dd5081f2f', |
| 4 | 4 | ); |
@@ -1,4 +1,4 @@ |
||
| 1 | 1 | <?php return array( |
| 2 | - 'dependencies' => array( 'react', 'react-dom', 'wp-polyfill' ), |
|
| 3 | - 'version' => 'ec79959e51f5fe169cb3599c0cbf8fd7', |
|
| 2 | + 'dependencies' => array( 'react', 'react-dom', 'wp-polyfill' ), |
|
| 3 | + 'version' => 'ec79959e51f5fe169cb3599c0cbf8fd7', |
|
| 4 | 4 | ); |
@@ -1,4 +1,4 @@ |
||
| 1 | 1 | <?php return array( |
| 2 | - 'dependencies' => array( 'react', 'react-dom', 'wp-polyfill' ), |
|
| 2 | + 'dependencies' => array('react', 'react-dom', 'wp-polyfill'), |
|
| 3 | 3 | 'version' => 'ec79959e51f5fe169cb3599c0cbf8fd7', |
| 4 | 4 | ); |
@@ -16,62 +16,62 @@ |
||
| 16 | 16 | use Wordlift\Modules\Food_Kg\Preconditions; |
| 17 | 17 | |
| 18 | 18 | if ( ! defined( 'ABSPATH' ) ) { |
| 19 | - exit; |
|
| 19 | + exit; |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | define( 'WL_FOOD_KG_FILE', __FILE__ ); |
| 23 | 23 | define( 'WL_FOOD_KG_DIR_PATH', dirname( WL_FOOD_KG_FILE ) ); |
| 24 | 24 | |
| 25 | 25 | function __wl_foodkg__load() { |
| 26 | - // Autoloader for dependencies. |
|
| 27 | - if ( file_exists( WL_FOOD_KG_DIR_PATH . '/third-party/vendor/scoper-autoload.php' ) ) { |
|
| 28 | - require WL_FOOD_KG_DIR_PATH . '/third-party/vendor/scoper-autoload.php'; |
|
| 29 | - } |
|
| 30 | - |
|
| 31 | - // Autoloader for plugin itself. |
|
| 32 | - if ( file_exists( WL_FOOD_KG_DIR_PATH . '/includes/vendor/autoload.php' ) ) { |
|
| 33 | - require WL_FOOD_KG_DIR_PATH . '/includes/vendor/autoload.php'; |
|
| 34 | - } |
|
| 35 | - |
|
| 36 | - $container_builder = new ContainerBuilder(); |
|
| 37 | - $loader = new YamlFileLoader( $container_builder, new FileLocator( __DIR__ ) ); |
|
| 38 | - $loader->load( 'services.yml' ); |
|
| 39 | - $container_builder->compile(); |
|
| 40 | - |
|
| 41 | - $notices = $container_builder->get( 'Wordlift\Modules\Food_Kg\Notices' ); |
|
| 42 | - $notices->register_hooks(); |
|
| 43 | - |
|
| 44 | - /** |
|
| 45 | - * @var Preconditions $preconditions |
|
| 46 | - */ |
|
| 47 | - $preconditions = $container_builder->get( 'Wordlift\Modules\Food_Kg\Preconditions' ); |
|
| 48 | - if ( ! $preconditions->pass() ) { |
|
| 49 | - return; |
|
| 50 | - } |
|
| 51 | - |
|
| 52 | - // Meta Box. |
|
| 53 | - $meta_box = $container_builder->get( 'Wordlift\Modules\Food_Kg\Meta_Box' ); |
|
| 54 | - $meta_box->register_hooks(); |
|
| 55 | - |
|
| 56 | - $module = $container_builder->get( 'Wordlift\Modules\Food_Kg\Module' ); |
|
| 57 | - $module->register_hooks(); |
|
| 58 | - |
|
| 59 | - /** @var Jsonld $jsonld */ |
|
| 60 | - $jsonld = $container_builder->get( 'Wordlift\Modules\Food_Kg\Jsonld' ); |
|
| 61 | - $jsonld->register_hooks(); |
|
| 62 | - |
|
| 63 | - /** @var Main_Ingredient_Jsonld $jsonld */ |
|
| 64 | - $main_ingredient_jsonld = $container_builder->get( 'Wordlift\Modules\Food_Kg\Main_Ingredient_Jsonld' ); |
|
| 65 | - $main_ingredient_jsonld->register_hooks(); |
|
| 66 | - |
|
| 67 | - if ( is_admin() ) { |
|
| 68 | - $page = $container_builder->get( 'Wordlift\Modules\Food_Kg\Admin\Page' ); |
|
| 69 | - $page->register_hooks(); |
|
| 70 | - |
|
| 71 | - // Download Ingredients Data. |
|
| 72 | - $download_ingredients_data = $container_builder->get( 'Wordlift\Modules\Food_Kg\Admin\Download_Ingredients_Data' ); |
|
| 73 | - $download_ingredients_data->register_hooks(); |
|
| 74 | - } |
|
| 26 | + // Autoloader for dependencies. |
|
| 27 | + if ( file_exists( WL_FOOD_KG_DIR_PATH . '/third-party/vendor/scoper-autoload.php' ) ) { |
|
| 28 | + require WL_FOOD_KG_DIR_PATH . '/third-party/vendor/scoper-autoload.php'; |
|
| 29 | + } |
|
| 30 | + |
|
| 31 | + // Autoloader for plugin itself. |
|
| 32 | + if ( file_exists( WL_FOOD_KG_DIR_PATH . '/includes/vendor/autoload.php' ) ) { |
|
| 33 | + require WL_FOOD_KG_DIR_PATH . '/includes/vendor/autoload.php'; |
|
| 34 | + } |
|
| 35 | + |
|
| 36 | + $container_builder = new ContainerBuilder(); |
|
| 37 | + $loader = new YamlFileLoader( $container_builder, new FileLocator( __DIR__ ) ); |
|
| 38 | + $loader->load( 'services.yml' ); |
|
| 39 | + $container_builder->compile(); |
|
| 40 | + |
|
| 41 | + $notices = $container_builder->get( 'Wordlift\Modules\Food_Kg\Notices' ); |
|
| 42 | + $notices->register_hooks(); |
|
| 43 | + |
|
| 44 | + /** |
|
| 45 | + * @var Preconditions $preconditions |
|
| 46 | + */ |
|
| 47 | + $preconditions = $container_builder->get( 'Wordlift\Modules\Food_Kg\Preconditions' ); |
|
| 48 | + if ( ! $preconditions->pass() ) { |
|
| 49 | + return; |
|
| 50 | + } |
|
| 51 | + |
|
| 52 | + // Meta Box. |
|
| 53 | + $meta_box = $container_builder->get( 'Wordlift\Modules\Food_Kg\Meta_Box' ); |
|
| 54 | + $meta_box->register_hooks(); |
|
| 55 | + |
|
| 56 | + $module = $container_builder->get( 'Wordlift\Modules\Food_Kg\Module' ); |
|
| 57 | + $module->register_hooks(); |
|
| 58 | + |
|
| 59 | + /** @var Jsonld $jsonld */ |
|
| 60 | + $jsonld = $container_builder->get( 'Wordlift\Modules\Food_Kg\Jsonld' ); |
|
| 61 | + $jsonld->register_hooks(); |
|
| 62 | + |
|
| 63 | + /** @var Main_Ingredient_Jsonld $jsonld */ |
|
| 64 | + $main_ingredient_jsonld = $container_builder->get( 'Wordlift\Modules\Food_Kg\Main_Ingredient_Jsonld' ); |
|
| 65 | + $main_ingredient_jsonld->register_hooks(); |
|
| 66 | + |
|
| 67 | + if ( is_admin() ) { |
|
| 68 | + $page = $container_builder->get( 'Wordlift\Modules\Food_Kg\Admin\Page' ); |
|
| 69 | + $page->register_hooks(); |
|
| 70 | + |
|
| 71 | + // Download Ingredients Data. |
|
| 72 | + $download_ingredients_data = $container_builder->get( 'Wordlift\Modules\Food_Kg\Admin\Download_Ingredients_Data' ); |
|
| 73 | + $download_ingredients_data->register_hooks(); |
|
| 74 | + } |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | add_action( 'plugins_loaded', '__wl_foodkg__load' ); |
@@ -15,64 +15,64 @@ |
||
| 15 | 15 | use Wordlift\Modules\Food_Kg\Main_Ingredient_Jsonld; |
| 16 | 16 | use Wordlift\Modules\Food_Kg\Preconditions; |
| 17 | 17 | |
| 18 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 18 | +if ( ! defined('ABSPATH')) { |
|
| 19 | 19 | exit; |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | -define( 'WL_FOOD_KG_FILE', __FILE__ ); |
|
| 23 | -define( 'WL_FOOD_KG_DIR_PATH', dirname( WL_FOOD_KG_FILE ) ); |
|
| 22 | +define('WL_FOOD_KG_FILE', __FILE__); |
|
| 23 | +define('WL_FOOD_KG_DIR_PATH', dirname(WL_FOOD_KG_FILE)); |
|
| 24 | 24 | |
| 25 | 25 | function __wl_foodkg__load() { |
| 26 | 26 | // Autoloader for dependencies. |
| 27 | - if ( file_exists( WL_FOOD_KG_DIR_PATH . '/third-party/vendor/scoper-autoload.php' ) ) { |
|
| 28 | - require WL_FOOD_KG_DIR_PATH . '/third-party/vendor/scoper-autoload.php'; |
|
| 27 | + if (file_exists(WL_FOOD_KG_DIR_PATH.'/third-party/vendor/scoper-autoload.php')) { |
|
| 28 | + require WL_FOOD_KG_DIR_PATH.'/third-party/vendor/scoper-autoload.php'; |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | // Autoloader for plugin itself. |
| 32 | - if ( file_exists( WL_FOOD_KG_DIR_PATH . '/includes/vendor/autoload.php' ) ) { |
|
| 33 | - require WL_FOOD_KG_DIR_PATH . '/includes/vendor/autoload.php'; |
|
| 32 | + if (file_exists(WL_FOOD_KG_DIR_PATH.'/includes/vendor/autoload.php')) { |
|
| 33 | + require WL_FOOD_KG_DIR_PATH.'/includes/vendor/autoload.php'; |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | $container_builder = new ContainerBuilder(); |
| 37 | - $loader = new YamlFileLoader( $container_builder, new FileLocator( __DIR__ ) ); |
|
| 38 | - $loader->load( 'services.yml' ); |
|
| 37 | + $loader = new YamlFileLoader($container_builder, new FileLocator(__DIR__)); |
|
| 38 | + $loader->load('services.yml'); |
|
| 39 | 39 | $container_builder->compile(); |
| 40 | 40 | |
| 41 | - $notices = $container_builder->get( 'Wordlift\Modules\Food_Kg\Notices' ); |
|
| 41 | + $notices = $container_builder->get('Wordlift\Modules\Food_Kg\Notices'); |
|
| 42 | 42 | $notices->register_hooks(); |
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | 45 | * @var Preconditions $preconditions |
| 46 | 46 | */ |
| 47 | - $preconditions = $container_builder->get( 'Wordlift\Modules\Food_Kg\Preconditions' ); |
|
| 48 | - if ( ! $preconditions->pass() ) { |
|
| 47 | + $preconditions = $container_builder->get('Wordlift\Modules\Food_Kg\Preconditions'); |
|
| 48 | + if ( ! $preconditions->pass()) { |
|
| 49 | 49 | return; |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | // Meta Box. |
| 53 | - $meta_box = $container_builder->get( 'Wordlift\Modules\Food_Kg\Meta_Box' ); |
|
| 53 | + $meta_box = $container_builder->get('Wordlift\Modules\Food_Kg\Meta_Box'); |
|
| 54 | 54 | $meta_box->register_hooks(); |
| 55 | 55 | |
| 56 | - $module = $container_builder->get( 'Wordlift\Modules\Food_Kg\Module' ); |
|
| 56 | + $module = $container_builder->get('Wordlift\Modules\Food_Kg\Module'); |
|
| 57 | 57 | $module->register_hooks(); |
| 58 | 58 | |
| 59 | 59 | /** @var Jsonld $jsonld */ |
| 60 | - $jsonld = $container_builder->get( 'Wordlift\Modules\Food_Kg\Jsonld' ); |
|
| 60 | + $jsonld = $container_builder->get('Wordlift\Modules\Food_Kg\Jsonld'); |
|
| 61 | 61 | $jsonld->register_hooks(); |
| 62 | 62 | |
| 63 | 63 | /** @var Main_Ingredient_Jsonld $jsonld */ |
| 64 | - $main_ingredient_jsonld = $container_builder->get( 'Wordlift\Modules\Food_Kg\Main_Ingredient_Jsonld' ); |
|
| 64 | + $main_ingredient_jsonld = $container_builder->get('Wordlift\Modules\Food_Kg\Main_Ingredient_Jsonld'); |
|
| 65 | 65 | $main_ingredient_jsonld->register_hooks(); |
| 66 | 66 | |
| 67 | - if ( is_admin() ) { |
|
| 68 | - $page = $container_builder->get( 'Wordlift\Modules\Food_Kg\Admin\Page' ); |
|
| 67 | + if (is_admin()) { |
|
| 68 | + $page = $container_builder->get('Wordlift\Modules\Food_Kg\Admin\Page'); |
|
| 69 | 69 | $page->register_hooks(); |
| 70 | 70 | |
| 71 | 71 | // Download Ingredients Data. |
| 72 | - $download_ingredients_data = $container_builder->get( 'Wordlift\Modules\Food_Kg\Admin\Download_Ingredients_Data' ); |
|
| 72 | + $download_ingredients_data = $container_builder->get('Wordlift\Modules\Food_Kg\Admin\Download_Ingredients_Data'); |
|
| 73 | 73 | $download_ingredients_data->register_hooks(); |
| 74 | 74 | } |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | -add_action( 'plugins_loaded', '__wl_foodkg__load' ); |
|
| 77 | +add_action('plugins_loaded', '__wl_foodkg__load'); |
|
| 78 | 78 | |
@@ -6,27 +6,27 @@ |
||
| 6 | 6 | $baseDir = dirname($vendorDir); |
| 7 | 7 | |
| 8 | 8 | return array( |
| 9 | - 'ComposerAutoloaderInitbaaf547b24d2757395578581da934187' => $vendorDir . '/composer/autoload_real.php', |
|
| 10 | - 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', |
|
| 11 | - 'Wordlift\\Modules\\Food_Kg\\Admin\\Download_Ingredients_Data' => $baseDir . '/admin/Download_Ingredients_Data.php', |
|
| 12 | - 'Wordlift\\Modules\\Food_Kg\\Admin\\Full_Page_Delegate' => $baseDir . '/admin/Full_Page_Delegate.php', |
|
| 13 | - 'Wordlift\\Modules\\Food_Kg\\Admin\\Ingredients_List_Table' => $baseDir . '/admin/Ingredients_List_Table.php', |
|
| 14 | - 'Wordlift\\Modules\\Food_Kg\\Admin\\Ingredients_Modal_Page_Delegate' => $baseDir . '/admin/Ingredients_Modal_Page_Delegate.php', |
|
| 15 | - 'Wordlift\\Modules\\Food_Kg\\Admin\\Main_Ingredient_List_Table' => $baseDir . '/admin/Main_Ingredient_List_Table.php', |
|
| 16 | - 'Wordlift\\Modules\\Food_Kg\\Admin\\Main_Ingredient_Modal_Page_Delegate' => $baseDir . '/admin/Main_Ingredient_Modal_Page_Delegate.php', |
|
| 17 | - 'Wordlift\\Modules\\Food_Kg\\Admin\\Page' => $baseDir . '/admin/Page.php', |
|
| 18 | - 'Wordlift\\Modules\\Food_Kg\\Admin\\Page_Delegate' => $baseDir . '/admin/Page_Delegate.php', |
|
| 19 | - 'Wordlift\\Modules\\Food_Kg\\Ingredients' => $baseDir . '/Ingredients.php', |
|
| 20 | - 'Wordlift\\Modules\\Food_Kg\\Ingredients_Client' => $baseDir . '/Ingredients_Client.php', |
|
| 21 | - 'Wordlift\\Modules\\Food_Kg\\Ingredients_Taxonomy_Recipe_Lift_Strategy' => $baseDir . '/Ingredients_Taxonomy_Recipe_Lift_Strategy.php', |
|
| 22 | - 'Wordlift\\Modules\\Food_Kg\\Jsonld' => $baseDir . '/Jsonld.php', |
|
| 23 | - 'Wordlift\\Modules\\Food_Kg\\Main_Ingredient_Jsonld' => $baseDir . '/Main_Ingredient_Jsonld.php', |
|
| 24 | - 'Wordlift\\Modules\\Food_Kg\\Main_Ingredient_Recipe_Lift_Strategy' => $baseDir . '/Main_Ingredient_Recipe_Lift_Strategy.php', |
|
| 25 | - 'Wordlift\\Modules\\Food_Kg\\Meta_Box' => $baseDir . '/Meta_Box.php', |
|
| 26 | - 'Wordlift\\Modules\\Food_Kg\\Module' => $baseDir . '/Module.php', |
|
| 27 | - 'Wordlift\\Modules\\Food_Kg\\Notices' => $baseDir . '/Notices.php', |
|
| 28 | - 'Wordlift\\Modules\\Food_Kg\\Preconditions' => $baseDir . '/Preconditions.php', |
|
| 29 | - 'Wordlift\\Modules\\Food_Kg\\Recipe_Lift_Strategy' => $baseDir . '/Recipe_Lift_Strategy.php', |
|
| 30 | - 'Wordlift_Modules_Food_Kg_Composer\\Autoload\\ClassLoader' => $vendorDir . '/composer/ClassLoader.php', |
|
| 31 | - 'Wordlift_Modules_Food_Kg_Composer\\Autoload\\ComposerStaticInitbaaf547b24d2757395578581da934187' => $vendorDir . '/composer/autoload_static.php', |
|
| 9 | + 'ComposerAutoloaderInitbaaf547b24d2757395578581da934187' => $vendorDir.'/composer/autoload_real.php', |
|
| 10 | + 'Composer\\InstalledVersions' => $vendorDir.'/composer/InstalledVersions.php', |
|
| 11 | + 'Wordlift\\Modules\\Food_Kg\\Admin\\Download_Ingredients_Data' => $baseDir.'/admin/Download_Ingredients_Data.php', |
|
| 12 | + 'Wordlift\\Modules\\Food_Kg\\Admin\\Full_Page_Delegate' => $baseDir.'/admin/Full_Page_Delegate.php', |
|
| 13 | + 'Wordlift\\Modules\\Food_Kg\\Admin\\Ingredients_List_Table' => $baseDir.'/admin/Ingredients_List_Table.php', |
|
| 14 | + 'Wordlift\\Modules\\Food_Kg\\Admin\\Ingredients_Modal_Page_Delegate' => $baseDir.'/admin/Ingredients_Modal_Page_Delegate.php', |
|
| 15 | + 'Wordlift\\Modules\\Food_Kg\\Admin\\Main_Ingredient_List_Table' => $baseDir.'/admin/Main_Ingredient_List_Table.php', |
|
| 16 | + 'Wordlift\\Modules\\Food_Kg\\Admin\\Main_Ingredient_Modal_Page_Delegate' => $baseDir.'/admin/Main_Ingredient_Modal_Page_Delegate.php', |
|
| 17 | + 'Wordlift\\Modules\\Food_Kg\\Admin\\Page' => $baseDir.'/admin/Page.php', |
|
| 18 | + 'Wordlift\\Modules\\Food_Kg\\Admin\\Page_Delegate' => $baseDir.'/admin/Page_Delegate.php', |
|
| 19 | + 'Wordlift\\Modules\\Food_Kg\\Ingredients' => $baseDir.'/Ingredients.php', |
|
| 20 | + 'Wordlift\\Modules\\Food_Kg\\Ingredients_Client' => $baseDir.'/Ingredients_Client.php', |
|
| 21 | + 'Wordlift\\Modules\\Food_Kg\\Ingredients_Taxonomy_Recipe_Lift_Strategy' => $baseDir.'/Ingredients_Taxonomy_Recipe_Lift_Strategy.php', |
|
| 22 | + 'Wordlift\\Modules\\Food_Kg\\Jsonld' => $baseDir.'/Jsonld.php', |
|
| 23 | + 'Wordlift\\Modules\\Food_Kg\\Main_Ingredient_Jsonld' => $baseDir.'/Main_Ingredient_Jsonld.php', |
|
| 24 | + 'Wordlift\\Modules\\Food_Kg\\Main_Ingredient_Recipe_Lift_Strategy' => $baseDir.'/Main_Ingredient_Recipe_Lift_Strategy.php', |
|
| 25 | + 'Wordlift\\Modules\\Food_Kg\\Meta_Box' => $baseDir.'/Meta_Box.php', |
|
| 26 | + 'Wordlift\\Modules\\Food_Kg\\Module' => $baseDir.'/Module.php', |
|
| 27 | + 'Wordlift\\Modules\\Food_Kg\\Notices' => $baseDir.'/Notices.php', |
|
| 28 | + 'Wordlift\\Modules\\Food_Kg\\Preconditions' => $baseDir.'/Preconditions.php', |
|
| 29 | + 'Wordlift\\Modules\\Food_Kg\\Recipe_Lift_Strategy' => $baseDir.'/Recipe_Lift_Strategy.php', |
|
| 30 | + 'Wordlift_Modules_Food_Kg_Composer\\Autoload\\ClassLoader' => $vendorDir.'/composer/ClassLoader.php', |
|
| 31 | + 'Wordlift_Modules_Food_Kg_Composer\\Autoload\\ComposerStaticInitbaaf547b24d2757395578581da934187' => $vendorDir.'/composer/autoload_static.php', |
|
| 32 | 32 | ); |
@@ -6,35 +6,35 @@ |
||
| 6 | 6 | |
| 7 | 7 | class ComposerStaticInitbaaf547b24d2757395578581da934187 |
| 8 | 8 | { |
| 9 | - public static $classMap = array ( |
|
| 10 | - 'ComposerAutoloaderInitbaaf547b24d2757395578581da934187' => __DIR__ . '/..' . '/composer/autoload_real.php', |
|
| 11 | - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', |
|
| 12 | - 'Wordlift\\Modules\\Food_Kg\\Admin\\Download_Ingredients_Data' => __DIR__ . '/../..' . '/admin/Download_Ingredients_Data.php', |
|
| 13 | - 'Wordlift\\Modules\\Food_Kg\\Admin\\Full_Page_Delegate' => __DIR__ . '/../..' . '/admin/Full_Page_Delegate.php', |
|
| 14 | - 'Wordlift\\Modules\\Food_Kg\\Admin\\Ingredients_List_Table' => __DIR__ . '/../..' . '/admin/Ingredients_List_Table.php', |
|
| 15 | - 'Wordlift\\Modules\\Food_Kg\\Admin\\Ingredients_Modal_Page_Delegate' => __DIR__ . '/../..' . '/admin/Ingredients_Modal_Page_Delegate.php', |
|
| 16 | - 'Wordlift\\Modules\\Food_Kg\\Admin\\Main_Ingredient_List_Table' => __DIR__ . '/../..' . '/admin/Main_Ingredient_List_Table.php', |
|
| 17 | - 'Wordlift\\Modules\\Food_Kg\\Admin\\Main_Ingredient_Modal_Page_Delegate' => __DIR__ . '/../..' . '/admin/Main_Ingredient_Modal_Page_Delegate.php', |
|
| 18 | - 'Wordlift\\Modules\\Food_Kg\\Admin\\Page' => __DIR__ . '/../..' . '/admin/Page.php', |
|
| 19 | - 'Wordlift\\Modules\\Food_Kg\\Admin\\Page_Delegate' => __DIR__ . '/../..' . '/admin/Page_Delegate.php', |
|
| 20 | - 'Wordlift\\Modules\\Food_Kg\\Ingredients' => __DIR__ . '/../..' . '/Ingredients.php', |
|
| 21 | - 'Wordlift\\Modules\\Food_Kg\\Ingredients_Client' => __DIR__ . '/../..' . '/Ingredients_Client.php', |
|
| 22 | - 'Wordlift\\Modules\\Food_Kg\\Ingredients_Taxonomy_Recipe_Lift_Strategy' => __DIR__ . '/../..' . '/Ingredients_Taxonomy_Recipe_Lift_Strategy.php', |
|
| 23 | - 'Wordlift\\Modules\\Food_Kg\\Jsonld' => __DIR__ . '/../..' . '/Jsonld.php', |
|
| 24 | - 'Wordlift\\Modules\\Food_Kg\\Main_Ingredient_Jsonld' => __DIR__ . '/../..' . '/Main_Ingredient_Jsonld.php', |
|
| 25 | - 'Wordlift\\Modules\\Food_Kg\\Main_Ingredient_Recipe_Lift_Strategy' => __DIR__ . '/../..' . '/Main_Ingredient_Recipe_Lift_Strategy.php', |
|
| 26 | - 'Wordlift\\Modules\\Food_Kg\\Meta_Box' => __DIR__ . '/../..' . '/Meta_Box.php', |
|
| 27 | - 'Wordlift\\Modules\\Food_Kg\\Module' => __DIR__ . '/../..' . '/Module.php', |
|
| 28 | - 'Wordlift\\Modules\\Food_Kg\\Notices' => __DIR__ . '/../..' . '/Notices.php', |
|
| 29 | - 'Wordlift\\Modules\\Food_Kg\\Preconditions' => __DIR__ . '/../..' . '/Preconditions.php', |
|
| 30 | - 'Wordlift\\Modules\\Food_Kg\\Recipe_Lift_Strategy' => __DIR__ . '/../..' . '/Recipe_Lift_Strategy.php', |
|
| 31 | - 'Wordlift_Modules_Food_Kg_Composer\\Autoload\\ClassLoader' => __DIR__ . '/..' . '/composer/ClassLoader.php', |
|
| 32 | - 'Wordlift_Modules_Food_Kg_Composer\\Autoload\\ComposerStaticInitbaaf547b24d2757395578581da934187' => __DIR__ . '/..' . '/composer/autoload_static.php', |
|
| 9 | + public static $classMap = array( |
|
| 10 | + 'ComposerAutoloaderInitbaaf547b24d2757395578581da934187' => __DIR__.'/..'.'/composer/autoload_real.php', |
|
| 11 | + 'Composer\\InstalledVersions' => __DIR__.'/..'.'/composer/InstalledVersions.php', |
|
| 12 | + 'Wordlift\\Modules\\Food_Kg\\Admin\\Download_Ingredients_Data' => __DIR__.'/../..'.'/admin/Download_Ingredients_Data.php', |
|
| 13 | + 'Wordlift\\Modules\\Food_Kg\\Admin\\Full_Page_Delegate' => __DIR__.'/../..'.'/admin/Full_Page_Delegate.php', |
|
| 14 | + 'Wordlift\\Modules\\Food_Kg\\Admin\\Ingredients_List_Table' => __DIR__.'/../..'.'/admin/Ingredients_List_Table.php', |
|
| 15 | + 'Wordlift\\Modules\\Food_Kg\\Admin\\Ingredients_Modal_Page_Delegate' => __DIR__.'/../..'.'/admin/Ingredients_Modal_Page_Delegate.php', |
|
| 16 | + 'Wordlift\\Modules\\Food_Kg\\Admin\\Main_Ingredient_List_Table' => __DIR__.'/../..'.'/admin/Main_Ingredient_List_Table.php', |
|
| 17 | + 'Wordlift\\Modules\\Food_Kg\\Admin\\Main_Ingredient_Modal_Page_Delegate' => __DIR__.'/../..'.'/admin/Main_Ingredient_Modal_Page_Delegate.php', |
|
| 18 | + 'Wordlift\\Modules\\Food_Kg\\Admin\\Page' => __DIR__.'/../..'.'/admin/Page.php', |
|
| 19 | + 'Wordlift\\Modules\\Food_Kg\\Admin\\Page_Delegate' => __DIR__.'/../..'.'/admin/Page_Delegate.php', |
|
| 20 | + 'Wordlift\\Modules\\Food_Kg\\Ingredients' => __DIR__.'/../..'.'/Ingredients.php', |
|
| 21 | + 'Wordlift\\Modules\\Food_Kg\\Ingredients_Client' => __DIR__.'/../..'.'/Ingredients_Client.php', |
|
| 22 | + 'Wordlift\\Modules\\Food_Kg\\Ingredients_Taxonomy_Recipe_Lift_Strategy' => __DIR__.'/../..'.'/Ingredients_Taxonomy_Recipe_Lift_Strategy.php', |
|
| 23 | + 'Wordlift\\Modules\\Food_Kg\\Jsonld' => __DIR__.'/../..'.'/Jsonld.php', |
|
| 24 | + 'Wordlift\\Modules\\Food_Kg\\Main_Ingredient_Jsonld' => __DIR__.'/../..'.'/Main_Ingredient_Jsonld.php', |
|
| 25 | + 'Wordlift\\Modules\\Food_Kg\\Main_Ingredient_Recipe_Lift_Strategy' => __DIR__.'/../..'.'/Main_Ingredient_Recipe_Lift_Strategy.php', |
|
| 26 | + 'Wordlift\\Modules\\Food_Kg\\Meta_Box' => __DIR__.'/../..'.'/Meta_Box.php', |
|
| 27 | + 'Wordlift\\Modules\\Food_Kg\\Module' => __DIR__.'/../..'.'/Module.php', |
|
| 28 | + 'Wordlift\\Modules\\Food_Kg\\Notices' => __DIR__.'/../..'.'/Notices.php', |
|
| 29 | + 'Wordlift\\Modules\\Food_Kg\\Preconditions' => __DIR__.'/../..'.'/Preconditions.php', |
|
| 30 | + 'Wordlift\\Modules\\Food_Kg\\Recipe_Lift_Strategy' => __DIR__.'/../..'.'/Recipe_Lift_Strategy.php', |
|
| 31 | + 'Wordlift_Modules_Food_Kg_Composer\\Autoload\\ClassLoader' => __DIR__.'/..'.'/composer/ClassLoader.php', |
|
| 32 | + 'Wordlift_Modules_Food_Kg_Composer\\Autoload\\ComposerStaticInitbaaf547b24d2757395578581da934187' => __DIR__.'/..'.'/composer/autoload_static.php', |
|
| 33 | 33 | ); |
| 34 | 34 | |
| 35 | 35 | public static function getInitializer(ClassLoader $loader) |
| 36 | 36 | { |
| 37 | - return \Closure::bind(function () use ($loader) { |
|
| 37 | + return \Closure::bind(function() use ($loader) { |
|
| 38 | 38 | $loader->classMap = ComposerStaticInitbaaf547b24d2757395578581da934187::$classMap; |
| 39 | 39 | |
| 40 | 40 | }, null, ClassLoader::class); |
@@ -4,15 +4,15 @@ |
||
| 4 | 4 | |
| 5 | 5 | class Full_Page_Delegate implements Page_Delegate { |
| 6 | 6 | |
| 7 | - public function render() { |
|
| 8 | - include WL_FOOD_KG_DIR_PATH . '/includes/admin/partials/main_ingredient.php'; |
|
| 9 | - } |
|
| 7 | + public function render() { |
|
| 8 | + include WL_FOOD_KG_DIR_PATH . '/includes/admin/partials/main_ingredient.php'; |
|
| 9 | + } |
|
| 10 | 10 | |
| 11 | - public function admin_enqueue_scripts() { |
|
| 12 | - wp_enqueue_style( 'thickbox' ); |
|
| 13 | - wp_enqueue_script( 'plugin-install' ); |
|
| 11 | + public function admin_enqueue_scripts() { |
|
| 12 | + wp_enqueue_style( 'thickbox' ); |
|
| 13 | + wp_enqueue_script( 'plugin-install' ); |
|
| 14 | 14 | |
| 15 | - wp_enqueue_style( 'wl-ingredients', plugin_dir_url( __FILE__ ) . '/assets/css/ingredients.css', array(), WORDLIFT_VERSION ); |
|
| 16 | - } |
|
| 15 | + wp_enqueue_style( 'wl-ingredients', plugin_dir_url( __FILE__ ) . '/assets/css/ingredients.css', array(), WORDLIFT_VERSION ); |
|
| 16 | + } |
|
| 17 | 17 | |
| 18 | 18 | } |
@@ -5,14 +5,14 @@ |
||
| 5 | 5 | class Full_Page_Delegate implements Page_Delegate { |
| 6 | 6 | |
| 7 | 7 | public function render() { |
| 8 | - include WL_FOOD_KG_DIR_PATH . '/includes/admin/partials/main_ingredient.php'; |
|
| 8 | + include WL_FOOD_KG_DIR_PATH.'/includes/admin/partials/main_ingredient.php'; |
|
| 9 | 9 | } |
| 10 | 10 | |
| 11 | 11 | public function admin_enqueue_scripts() { |
| 12 | - wp_enqueue_style( 'thickbox' ); |
|
| 13 | - wp_enqueue_script( 'plugin-install' ); |
|
| 12 | + wp_enqueue_style('thickbox'); |
|
| 13 | + wp_enqueue_script('plugin-install'); |
|
| 14 | 14 | |
| 15 | - wp_enqueue_style( 'wl-ingredients', plugin_dir_url( __FILE__ ) . '/assets/css/ingredients.css', array(), WORDLIFT_VERSION ); |
|
| 15 | + wp_enqueue_style('wl-ingredients', plugin_dir_url(__FILE__).'/assets/css/ingredients.css', array(), WORDLIFT_VERSION); |
|
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | } |
@@ -4,66 +4,66 @@ |
||
| 4 | 4 | |
| 5 | 5 | class Main_Ingredient_Recipe_Lift_Strategy implements Recipe_Lift_Strategy { |
| 6 | 6 | |
| 7 | - /** |
|
| 8 | - * @var Ingredients_Client |
|
| 9 | - */ |
|
| 10 | - private $ingredients_client; |
|
| 7 | + /** |
|
| 8 | + * @var Ingredients_Client |
|
| 9 | + */ |
|
| 10 | + private $ingredients_client; |
|
| 11 | 11 | |
| 12 | - /** |
|
| 13 | - * @var Notices |
|
| 14 | - */ |
|
| 15 | - private $notices; |
|
| 12 | + /** |
|
| 13 | + * @var Notices |
|
| 14 | + */ |
|
| 15 | + private $notices; |
|
| 16 | 16 | |
| 17 | - public function __construct( Ingredients_Client $ingredients_client, Notices $notices ) { |
|
| 18 | - $this->ingredients_client = $ingredients_client; |
|
| 19 | - $this->notices = $notices; |
|
| 20 | - } |
|
| 17 | + public function __construct( Ingredients_Client $ingredients_client, Notices $notices ) { |
|
| 18 | + $this->ingredients_client = $ingredients_client; |
|
| 19 | + $this->notices = $notices; |
|
| 20 | + } |
|
| 21 | 21 | |
| 22 | - public function get_json_ld_data( $ingredient ) { |
|
| 23 | - // Get JSON LD Data. |
|
| 24 | - return $this->ingredients_client->main_ingredient( $ingredient ); |
|
| 25 | - } |
|
| 22 | + public function get_json_ld_data( $ingredient ) { |
|
| 23 | + // Get JSON LD Data. |
|
| 24 | + return $this->ingredients_client->main_ingredient( $ingredient ); |
|
| 25 | + } |
|
| 26 | 26 | |
| 27 | - public function run() { |
|
| 28 | - $this->notices->queue( 'info', __( 'WordLift detected WP Recipe Maker and, it is lifting the ingredients...', 'wordlift' ) ); |
|
| 27 | + public function run() { |
|
| 28 | + $this->notices->queue( 'info', __( 'WordLift detected WP Recipe Maker and, it is lifting the ingredients...', 'wordlift' ) ); |
|
| 29 | 29 | |
| 30 | - $recipes = get_posts( |
|
| 31 | - array( |
|
| 32 | - 'post_type' => 'wprm_recipe', |
|
| 33 | - 'numberposts' => - 1, |
|
| 34 | - ) |
|
| 35 | - ); |
|
| 36 | - $count = count( $recipes ); |
|
| 30 | + $recipes = get_posts( |
|
| 31 | + array( |
|
| 32 | + 'post_type' => 'wprm_recipe', |
|
| 33 | + 'numberposts' => - 1, |
|
| 34 | + ) |
|
| 35 | + ); |
|
| 36 | + $count = count( $recipes ); |
|
| 37 | 37 | |
| 38 | - $count_lifted = 0; |
|
| 39 | - foreach ( $recipes as $recipe ) { |
|
| 40 | - /* translators: 1: The number of lifted recipes, 2: The total number of recipes. */ |
|
| 41 | - $this->notices->queue( 'info', sprintf( __( 'WordLift is adding the main ingredient to recipes. So far it lifted %1$d of %2$d recipe(s).', 'wordlift' ), $count_lifted, $count ) ); |
|
| 38 | + $count_lifted = 0; |
|
| 39 | + foreach ( $recipes as $recipe ) { |
|
| 40 | + /* translators: 1: The number of lifted recipes, 2: The total number of recipes. */ |
|
| 41 | + $this->notices->queue( 'info', sprintf( __( 'WordLift is adding the main ingredient to recipes. So far it lifted %1$d of %2$d recipe(s).', 'wordlift' ), $count_lifted, $count ) ); |
|
| 42 | 42 | |
| 43 | - // Emit something to keep the connection alive. |
|
| 44 | - echo esc_html( "$count_lifted\n" ); |
|
| 43 | + // Emit something to keep the connection alive. |
|
| 44 | + echo esc_html( "$count_lifted\n" ); |
|
| 45 | 45 | |
| 46 | - // Skip posts with existing data. |
|
| 47 | - $existing = get_post_meta( $recipe->ID, '_wl_main_ingredient_jsonld', true ); |
|
| 48 | - if ( ! empty( $existing ) ) { |
|
| 49 | - $count_lifted ++; |
|
| 50 | - continue; |
|
| 51 | - } |
|
| 46 | + // Skip posts with existing data. |
|
| 47 | + $existing = get_post_meta( $recipe->ID, '_wl_main_ingredient_jsonld', true ); |
|
| 48 | + if ( ! empty( $existing ) ) { |
|
| 49 | + $count_lifted ++; |
|
| 50 | + continue; |
|
| 51 | + } |
|
| 52 | 52 | |
| 53 | - $jsonld = $this->ingredients_client->main_ingredient( $recipe->post_title ); |
|
| 54 | - if ( ! empty( $jsonld ) ) { |
|
| 55 | - add_post_meta( $recipe->ID, '_wl_main_ingredient_jsonld', $jsonld ); |
|
| 56 | - $count_lifted ++; |
|
| 57 | - } else { |
|
| 58 | - delete_post_meta( $recipe->ID, '_wl_main_ingredient_jsonld' ); |
|
| 59 | - } |
|
| 60 | - } |
|
| 53 | + $jsonld = $this->ingredients_client->main_ingredient( $recipe->post_title ); |
|
| 54 | + if ( ! empty( $jsonld ) ) { |
|
| 55 | + add_post_meta( $recipe->ID, '_wl_main_ingredient_jsonld', $jsonld ); |
|
| 56 | + $count_lifted ++; |
|
| 57 | + } else { |
|
| 58 | + delete_post_meta( $recipe->ID, '_wl_main_ingredient_jsonld' ); |
|
| 59 | + } |
|
| 60 | + } |
|
| 61 | 61 | |
| 62 | - /** |
|
| 63 | - * @@todo add notification that procedure is complete, with information about the number of processed items vs |
|
| 64 | - * total items |
|
| 65 | - */ |
|
| 66 | - /* translators: 1: The number of lifted recipes, 2: The total number of recipes. */ |
|
| 67 | - $this->notices->queue( 'info', sprintf( __( 'WordLift lifted %1$d of %2$d recipe(s).', 'wordlift' ), $count_lifted, $count ) ); |
|
| 68 | - } |
|
| 62 | + /** |
|
| 63 | + * @@todo add notification that procedure is complete, with information about the number of processed items vs |
|
| 64 | + * total items |
|
| 65 | + */ |
|
| 66 | + /* translators: 1: The number of lifted recipes, 2: The total number of recipes. */ |
|
| 67 | + $this->notices->queue( 'info', sprintf( __( 'WordLift lifted %1$d of %2$d recipe(s).', 'wordlift' ), $count_lifted, $count ) ); |
|
| 68 | + } |
|
| 69 | 69 | } |
@@ -14,48 +14,48 @@ discard block |
||
| 14 | 14 | */ |
| 15 | 15 | private $notices; |
| 16 | 16 | |
| 17 | - public function __construct( Ingredients_Client $ingredients_client, Notices $notices ) { |
|
| 17 | + public function __construct(Ingredients_Client $ingredients_client, Notices $notices) { |
|
| 18 | 18 | $this->ingredients_client = $ingredients_client; |
| 19 | 19 | $this->notices = $notices; |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | - public function get_json_ld_data( $ingredient ) { |
|
| 22 | + public function get_json_ld_data($ingredient) { |
|
| 23 | 23 | // Get JSON LD Data. |
| 24 | - return $this->ingredients_client->main_ingredient( $ingredient ); |
|
| 24 | + return $this->ingredients_client->main_ingredient($ingredient); |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | public function run() { |
| 28 | - $this->notices->queue( 'info', __( 'WordLift detected WP Recipe Maker and, it is lifting the ingredients...', 'wordlift' ) ); |
|
| 28 | + $this->notices->queue('info', __('WordLift detected WP Recipe Maker and, it is lifting the ingredients...', 'wordlift')); |
|
| 29 | 29 | |
| 30 | 30 | $recipes = get_posts( |
| 31 | 31 | array( |
| 32 | 32 | 'post_type' => 'wprm_recipe', |
| 33 | - 'numberposts' => - 1, |
|
| 33 | + 'numberposts' => -1, |
|
| 34 | 34 | ) |
| 35 | 35 | ); |
| 36 | - $count = count( $recipes ); |
|
| 36 | + $count = count($recipes); |
|
| 37 | 37 | |
| 38 | 38 | $count_lifted = 0; |
| 39 | - foreach ( $recipes as $recipe ) { |
|
| 39 | + foreach ($recipes as $recipe) { |
|
| 40 | 40 | /* translators: 1: The number of lifted recipes, 2: The total number of recipes. */ |
| 41 | - $this->notices->queue( 'info', sprintf( __( 'WordLift is adding the main ingredient to recipes. So far it lifted %1$d of %2$d recipe(s).', 'wordlift' ), $count_lifted, $count ) ); |
|
| 41 | + $this->notices->queue('info', sprintf(__('WordLift is adding the main ingredient to recipes. So far it lifted %1$d of %2$d recipe(s).', 'wordlift'), $count_lifted, $count)); |
|
| 42 | 42 | |
| 43 | 43 | // Emit something to keep the connection alive. |
| 44 | - echo esc_html( "$count_lifted\n" ); |
|
| 44 | + echo esc_html("$count_lifted\n"); |
|
| 45 | 45 | |
| 46 | 46 | // Skip posts with existing data. |
| 47 | - $existing = get_post_meta( $recipe->ID, '_wl_main_ingredient_jsonld', true ); |
|
| 48 | - if ( ! empty( $existing ) ) { |
|
| 49 | - $count_lifted ++; |
|
| 47 | + $existing = get_post_meta($recipe->ID, '_wl_main_ingredient_jsonld', true); |
|
| 48 | + if ( ! empty($existing)) { |
|
| 49 | + $count_lifted++; |
|
| 50 | 50 | continue; |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | - $jsonld = $this->ingredients_client->main_ingredient( $recipe->post_title ); |
|
| 54 | - if ( ! empty( $jsonld ) ) { |
|
| 55 | - add_post_meta( $recipe->ID, '_wl_main_ingredient_jsonld', $jsonld ); |
|
| 56 | - $count_lifted ++; |
|
| 53 | + $jsonld = $this->ingredients_client->main_ingredient($recipe->post_title); |
|
| 54 | + if ( ! empty($jsonld)) { |
|
| 55 | + add_post_meta($recipe->ID, '_wl_main_ingredient_jsonld', $jsonld); |
|
| 56 | + $count_lifted++; |
|
| 57 | 57 | } else { |
| 58 | - delete_post_meta( $recipe->ID, '_wl_main_ingredient_jsonld' ); |
|
| 58 | + delete_post_meta($recipe->ID, '_wl_main_ingredient_jsonld'); |
|
| 59 | 59 | } |
| 60 | 60 | } |
| 61 | 61 | |
@@ -64,6 +64,6 @@ discard block |
||
| 64 | 64 | * total items |
| 65 | 65 | */ |
| 66 | 66 | /* translators: 1: The number of lifted recipes, 2: The total number of recipes. */ |
| 67 | - $this->notices->queue( 'info', sprintf( __( 'WordLift lifted %1$d of %2$d recipe(s).', 'wordlift' ), $count_lifted, $count ) ); |
|
| 67 | + $this->notices->queue('info', sprintf(__('WordLift lifted %1$d of %2$d recipe(s).', 'wordlift'), $count_lifted, $count)); |
|
| 68 | 68 | } |
| 69 | 69 | } |