| @@ -21,9 +21,9 @@ | ||
| 21 | 21 | define('EMBEDPRESS_PLG_NAME', 'embedpress'); |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | if ( ! defined('EMBEDPRESS_VERSION')) { |
| 25 | - define('EMBEDPRESS_VERSION', "4.6.4"); | |
| 25 | + define('EMBEDPRESS_VERSION', "3.3.4"); | |
| 26 | 26 | /** |
| 27 | 27 | * @deprecated 2.2.0 |
| 28 | 28 | */ |
| 29 | 29 | define('EMBEDPRESS_PLG_VERSION', EMBEDPRESS_VERSION); |
| @@ -45,16 +45,8 @@ | ||
| 45 | 45 | if ( ! defined('EMBEDPRESS_URL_ASSETS')) { |
| 46 | 46 | define('EMBEDPRESS_URL_ASSETS', plugins_url(EMBEDPRESS_PLG_NAME) . "/assets/"); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | -if ( ! defined('EMBEDPRESS_URL_STATIC')) { | |
| 50 | - define('EMBEDPRESS_URL_STATIC', plugins_url(EMBEDPRESS_PLG_NAME) . "/static/"); | |
| 51 | -} | |
| 52 | - | |
| 53 | -if ( ! defined('EMBEDPRESS_PATH_STATIC')) { | |
| 54 | - define('EMBEDPRESS_PATH_STATIC', EMBEDPRESS_PATH_BASE . "static/"); | |
| 55 | -} | |
| 56 | - | |
| 57 | 49 | if ( ! defined('EMBEDPRESS_NAMESPACE')) { |
| 58 | 50 | define('EMBEDPRESS_NAMESPACE', "\\EmbedPress"); |
| 59 | 51 | } |
| 60 | 52 | |
| @@ -113,11 +105,8 @@ | ||
| 113 | 105 | * @return false|mixed |
| 114 | 106 | */ |
| 115 | 107 | function get_embedpress_pro_version() { |
| 116 | 108 | if ( is_embedpress_pro_active() ) { |
| 117 | - if(defined('EMBEDPRESS_PRO_PLUGIN_VERSION')){ | |
| 118 | - return EMBEDPRESS_PRO_PLUGIN_VERSION; | |
| 119 | - } | |
| 120 | 109 | $p = wp_get_active_and_valid_plugins(); |
| 121 | 110 | $p = array_filter( $p, function ( $plugin){ |
| 122 | 111 | return !empty( strpos( $plugin, 'embedpress-pro')); |
| 123 | 112 | }); |
| @@ -138,32 +127,7 @@ | ||
| 138 | 127 | if ( ! defined('EMBEDPRESS_IS_LOADED')) { |
| 139 | 128 | require_once EMBEDPRESS_PATH_BASE . "autoloader.php"; |
| 140 | 129 | } |
| 141 | 130 | |
| 142 | -// Update string attributes values to boleen | |
| 143 | -if (!function_exists('stringToBoolean')){ | |
| 144 | - function stringToBoolean($attributes) { | |
| 145 | - if(is_array($attributes)) { | |
| 146 | - foreach ($attributes as $key => $value) { | |
| 147 | - if(!empty($value) && $value === 'true'){ | |
| 148 | - $attributes[$key] = true; | |
| 149 | - } | |
| 150 | - else if(!empty($value) && $value === 'false'){ | |
| 151 | - $attributes[$key] = false; | |
| 152 | - } | |
| 153 | - } | |
| 154 | - } | |
| 155 | - return $attributes; | |
| 156 | - } | |
| 157 | -} | |
| 131 | +// Includes the Gutenberg blocks for EmbedPress | |
| 132 | +require_once __DIR__ . '/Gutenberg/plugin.php'; | |
| 158 | 133 | |
| 159 | - | |
| 160 | - | |
| 161 | -// Includes the EmbedPress blocks system | |
| 162 | -// Check if we should use the new block system | |
| 163 | -if (apply_filters('embedpress_use_new_block_system', true)) { | |
| 164 | - $new_block_file = __DIR__ . '/EmbedPress/Gutenberg/InitBlocks.php'; | |
| 165 | - | |
| 166 | - if (file_exists($new_block_file)) { | |
| 167 | - require_once $new_block_file; | |
| 168 | - } | |
| 169 | -} | |