| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly; |
| 3 |
|
| 4 |
class Wdk_demo_import extends Winter_MVC_Controller { |
| 5 |
|
| 6 |
public function __construct(){ |
| 7 |
parent::__construct(); |
| 8 |
} |
| 9 |
|
| 10 |
public function index() |
| 11 |
{ |
| 12 |
$current_theme = wp_get_theme(); |
| 13 |
|
| 14 |
$this->data['current_theme'] = $current_theme; |
| 15 |
|
| 16 |
$this->load->view('wdk_demo_import/index', $this->data); |
| 17 |
} |
| 18 |
|
| 19 |
public function step_2() |
| 20 |
{ |
| 21 |
$current_theme = wp_get_theme(); |
| 22 |
|
| 23 |
$this->data['current_theme'] = $current_theme; |
| 24 |
|
| 25 |
$this->load->view('wdk_demo_import/step_2', $this->data); |
| 26 |
} |
| 27 |
|
| 28 |
public function step_1() |
| 29 |
{ |
| 30 |
$current_theme = wp_get_theme(); |
| 31 |
|
| 32 |
$plugins = array( |
| 33 |
|
| 34 |
array( |
| 35 |
'name' => 'Elementor', // The plugin name. |
| 36 |
'slug' => 'elementor', // The plugin slug (typically the folder name). |
| 37 |
'required' => false, // If false, the plugin is only 'recommended' instead of required. |
| 38 |
'version' => '3.12.2', // E.g. 1.0.0. If set, the active plugin must be this version or higher. If the plugin version is higher than the plugin version installed, the user will be notified to update the plugin. |
| 39 |
'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. |
| 40 |
'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. |
| 41 |
'external_url' => '', // If set, overrides default API URL and points to an external URL. |
| 42 |
'is_callable' => '', // If set, this callable will be be checked for availability to determine if a plugin is active. |
| 43 |
), |
| 44 |
|
| 45 |
array( |
| 46 |
'name' => 'Element Invader', // The plugin name. |
| 47 |
'slug' => 'elementinvader', // The plugin slug (typically the folder name). |
| 48 |
'required' => false, // If false, the plugin is only 'recommended' instead of required. |
| 49 |
'version' => '1.2.1', // E.g. 1.0.0. If set, the active plugin must be this version or higher. If the plugin version is higher than the plugin version installed, the user will be notified to update the plugin. |
| 50 |
'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. |
| 51 |
'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. |
| 52 |
'external_url' => '', // If set, overrides default API URL and points to an external URL. |
| 53 |
'is_callable' => '', // If set, this callable will be be checked for availability to determine if a plugin is active. |
| 54 |
), |
| 55 |
); |
| 56 |
|
| 57 |
|
| 58 |
if(file_exists( get_stylesheet_directory() .'/addons/elementinvader-addons-for-elementor.zip')) { |
| 59 |
$plugins [] = array( |
| 60 |
'name' => 'ElementInvader Add-ons for Elementor', // The plugin name. |
| 61 |
'slug' => 'elementinvader-addons-for-elementor', // The plugin slug (typically the folder name). |
| 62 |
'source' => get_stylesheet_directory() . '/addons/elementinvader-addons-for-elementor.zip', // The plugin source. |
| 63 |
'required' => false, // If false, the plugin is only 'recommended' instead of required. |
| 64 |
'version' => '1.1.4', // E.g. 1.0.0. If set, the active plugin must be this version or higher. If the plugin version is higher than the plugin version installed, the user will be notified to update the plugin. |
| 65 |
'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. |
| 66 |
'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. |
| 67 |
'external_url' => '', // If set, overrides default API URL and points to an external URL. |
| 68 |
'is_callable' => '', // If set, this callable will be be checked for availability to determine if a plugin is active. |
| 69 |
); |
| 70 |
} |
| 71 |
else |
| 72 |
{ |
| 73 |
$plugins [] = array( |
| 74 |
'name' => 'ElementInvader Addons for Elementor', // The plugin name. |
| 75 |
'slug' => 'elementinvader-addons-for-elementor', // The plugin slug (typically the folder name). |
| 76 |
'required' => false, // If false, the plugin is only 'recommended' instead of required. |
| 77 |
'version' => '1.1.4', // E.g. 1.0.0. If set, the active plugin must be this version or higher. If the plugin version is higher than the plugin version installed, the user will be notified to update the plugin. |
| 78 |
'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. |
| 79 |
'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. |
| 80 |
'external_url' => '', // If set, overrides default API URL and points to an external URL. |
| 81 |
'is_callable' => '', // If set, this callable will be be checked for availability to determine if a plugin is active. |
| 82 |
); |
| 83 |
} |
| 84 |
|
| 85 |
if(file_exists( get_stylesheet_directory() .'/addons/wdk-bookings.zip')) { |
| 86 |
$plugins [] = array( |
| 87 |
'name' => 'WDK Bookings Addon', // The plugin name. |
| 88 |
'slug' => 'wdk-bookings', // The plugin slug (typically the folder name). |
| 89 |
'source' => get_stylesheet_directory() . '/addons/wdk-bookings.zip', // The plugin source. |
| 90 |
'required' => false, // If false, the plugin is only 'recommended' instead of required. |
| 91 |
'version' => '1.0.1', // E.g. 1.0.0. If set, the active plugin must be this version or higher. If the plugin version is higher than the plugin version installed, the user will be notified to update the plugin. |
| 92 |
'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. |
| 93 |
'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. |
| 94 |
'external_url' => '', // If set, overrides default API URL and points to an external URL. |
| 95 |
'is_callable' => '', // If set, this callable will be be checked for availability to determine if a plugin is active. |
| 96 |
); |
| 97 |
} |
| 98 |
|
| 99 |
if(file_exists( get_stylesheet_directory() .'/addons/wdk-currency-conversion.zip')) { |
| 100 |
$plugins [] = array( |
| 101 |
'name' => 'WDK Currency Conversion Addon', // The plugin name. |
| 102 |
'slug' => 'wdk-currency-conversion', // The plugin slug (typically the folder name). |
| 103 |
'source' => get_stylesheet_directory() . '/addons/wdk-currency-conversion.zip', // The plugin source. |
| 104 |
'required' => false, // If false, the plugin is only 'recommended' instead of required. |
| 105 |
'version' => '1.0.1', // E.g. 1.0.0. If set, the active plugin must be this version or higher. If the plugin version is higher than the plugin version installed, the user will be notified to update the plugin. |
| 106 |
'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. |
| 107 |
'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. |
| 108 |
'external_url' => '', // If set, overrides default API URL and points to an external URL. |
| 109 |
'is_callable' => '', // If set, this callable will be be checked for availability to determine if a plugin is active. |
| 110 |
); |
| 111 |
} |
| 112 |
|
| 113 |
if(file_exists( get_stylesheet_directory() .'/addons/wdk-favorites.zip')) { |
| 114 |
$plugins [] = array( |
| 115 |
'name' => 'WDK Favorites Addon', // The plugin name. |
| 116 |
'slug' => 'wdk-favorites', // The plugin slug (typically the folder name). |
| 117 |
'source' => get_stylesheet_directory() . '/addons/wdk-favorites.zip', // The plugin source. |
| 118 |
'required' => false, // If false, the plugin is only 'recommended' instead of required. |
| 119 |
'version' => '1.0.1', // E.g. 1.0.0. If set, the active plugin must be this version or higher. If the plugin version is higher than the plugin version installed, the user will be notified to update the plugin. |
| 120 |
'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. |
| 121 |
'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. |
| 122 |
'external_url' => '', // If set, overrides default API URL and points to an external URL. |
| 123 |
'is_callable' => '', // If set, this callable will be be checked for availability to determine if a plugin is active. |
| 124 |
); |
| 125 |
} |
| 126 |
if(file_exists( get_stylesheet_directory() .'/addons/wdk-membership.zip')) { |
| 127 |
$plugins [] = array( |
| 128 |
'name' => 'WDK Membership Addon', // The plugin name. |
| 129 |
'slug' => 'wdk-membership', // The plugin slug (typically the folder name). |
| 130 |
'source' => get_stylesheet_directory() . '/addons/wdk-membership.zip', // The plugin source. |
| 131 |
'required' => false, // If false, the plugin is only 'recommended' instead of required. |
| 132 |
'version' => '1.0.1', // E.g. 1.0.0. If set, the active plugin must be this version or higher. If the plugin version is higher than the plugin version installed, the user will be notified to update the plugin. |
| 133 |
'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. |
| 134 |
'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. |
| 135 |
'external_url' => '', // If set, overrides default API URL and points to an external URL. |
| 136 |
'is_callable' => '', // If set, this callable will be be checked for availability to determine if a plugin is active. |
| 137 |
); |
| 138 |
} |
| 139 |
if(file_exists( get_stylesheet_directory() .'/addons/wdk-mortgage.zip')) { |
| 140 |
$plugins [] = array( |
| 141 |
|
| 142 |
'name' => 'WDK Mortgage Addon', // The plugin name. |
| 143 |
'slug' => 'wdk-mortgage', // The plugin slug (typically the folder name). |
| 144 |
'source' => get_stylesheet_directory() . '/addons/wdk-mortgage.zip', // The plugin source. |
| 145 |
'required' => false, // If false, the plugin is only 'recommended' instead of required. |
| 146 |
'version' => '1.0.1', // E.g. 1.0.0. If set, the active plugin must be this version or higher. If the plugin version is higher than the plugin version installed, the user will be notified to update the plugin. |
| 147 |
'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. |
| 148 |
'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. |
| 149 |
'external_url' => '', // If set, overrides default API URL and points to an external URL. |
| 150 |
'is_callable' => '', // If set, this callable will be be checked for availability to determine if a plugin is active. |
| 151 |
); |
| 152 |
} |
| 153 |
|
| 154 |
if(file_exists( get_stylesheet_directory() .'/addons/wdk-wp-all-import.zip')) { |
| 155 |
$plugins [] = array( |
| 156 |
|
| 157 |
'name' => 'WDK Wp All Import', // The plugin name. |
| 158 |
'slug' => 'wdk-wp-all-import', // The plugin slug (typically the folder name). |
| 159 |
'source' => get_stylesheet_directory() . '/addons/wdk-wp-all-import.zip', // The plugin source. |
| 160 |
'required' => false, // If false, the plugin is only 'recommended' instead of required. |
| 161 |
'version' => '1.0.1', // E.g. 1.0.0. If set, the active plugin must be this version or higher. If the plugin version is higher than the plugin version installed, the user will be notified to update the plugin. |
| 162 |
'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. |
| 163 |
'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. |
| 164 |
'external_url' => '', // If set, overrides default API URL and points to an external URL. |
| 165 |
'is_callable' => '', // If set, this callable will be be checked for availability to determine if a plugin is active. |
| 166 |
); |
| 167 |
} |
| 168 |
|
| 169 |
if(file_exists( get_stylesheet_directory() .'/addons/profile-picture-uploader.zip')) { |
| 170 |
$plugins [] = array( |
| 171 |
|
| 172 |
'name' => 'WDK Profile picture uploader', // The plugin name. |
| 173 |
'slug' => 'profile-picture-uploader', // The plugin slug (typically the folder name). |
| 174 |
'source' => get_stylesheet_directory() . '/addons/profile-picture-uploader.zip', // The plugin source. |
| 175 |
'required' => false, // If false, the plugin is only 'recommended' instead of required. |
| 176 |
'version' => '1.0.1', // E.g. 1.0.0. If set, the active plugin must be this version or higher. If the plugin version is higher than the plugin version installed, the user will be notified to update the plugin. |
| 177 |
'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. |
| 178 |
'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. |
| 179 |
'external_url' => '', // If set, overrides default API URL and points to an external URL. |
| 180 |
'is_callable' => '', // If set, this callable will be be checked for availability to determine if a plugin is active. |
| 181 |
); |
| 182 |
} |
| 183 |
|
| 184 |
if(file_exists( get_stylesheet_directory() .'/addons/wdk-reviews.zip')) { |
| 185 |
$plugins [] = array( |
| 186 |
|
| 187 |
'name' => 'WDK Reviews', // The plugin name. |
| 188 |
'slug' => 'wdk-reviews', // The plugin slug (typically the folder name). |
| 189 |
'source' => get_stylesheet_directory() . '/addons/wdk-reviews.zip', // The plugin source. |
| 190 |
'required' => false, // If false, the plugin is only 'recommended' instead of required. |
| 191 |
'version' => '1.0.1', // E.g. 1.0.0. If set, the active plugin must be this version or higher. If the plugin version is higher than the plugin version installed, the user will be notified to update the plugin. |
| 192 |
'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. |
| 193 |
'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. |
| 194 |
'external_url' => '', // If set, overrides default API URL and points to an external URL. |
| 195 |
'is_callable' => '', // If set, this callable will be be checked for availability to determine if a plugin is active. |
| 196 |
); |
| 197 |
} |
| 198 |
|
| 199 |
if(file_exists( get_stylesheet_directory() .'/addons/sweet-energy-efficiency.zip')) { |
| 200 |
$plugins [] = array( |
| 201 |
'name' => 'Sweet Energy Efficiency', // The plugin name. |
| 202 |
'slug' => 'sweet-energy-efficiency', // The plugin slug (typically the folder name). |
| 203 |
'source' => get_stylesheet_directory() . '/addons/sweet-energy-efficiency.zip', // The plugin source. |
| 204 |
'required' => false, // If false, the plugin is only 'recommended' instead of required. |
| 205 |
'version' => '1.0.5', // E.g. 1.0.0. If set, the active plugin must be this version or higher. If the plugin version is higher than the plugin version installed, the user will be notified to update the plugin. |
| 206 |
'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. |
| 207 |
'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. |
| 208 |
'external_url' => '', // If set, overrides default API URL and points to an external URL. |
| 209 |
'is_callable' => '', // If set, this callable will be be checked for availability to determine if a plugin is active. |
| 210 |
); |
| 211 |
} |
| 212 |
|
| 213 |
if(file_exists( get_stylesheet_directory() .'/addons/wdk-report-abuse.zip')) { |
| 214 |
$plugins [] = array( |
| 215 |
'name' => 'WDK Report Abuse', // The plugin name. |
| 216 |
'slug' => 'wdk-report-abuse', // The plugin slug (typically the folder name). |
| 217 |
'source' => get_stylesheet_directory() . '/addons/wdk-report-abuse.zip', // The plugin source. |
| 218 |
'required' => false, // If false, the plugin is only 'recommended' instead of required. |
| 219 |
'version' => '1.0.1', // E.g. 1.0.0. If set, the active plugin must be this version or higher. If the plugin version is higher than the plugin version installed, the user will be notified to update the plugin. |
| 220 |
'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. |
| 221 |
'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. |
| 222 |
'external_url' => '', // If set, overrides default API URL and points to an external URL. |
| 223 |
'is_callable' => '', // If set, this callable will be be checked for availability to determine if a plugin is active. |
| 224 |
); |
| 225 |
} |
| 226 |
|
| 227 |
if(file_exists( get_stylesheet_directory() .'/addons/wdk-facebook-comments.zip')) { |
| 228 |
$plugins [] = array( |
| 229 |
'name' => 'WDK Facebook Comments', // The plugin name. |
| 230 |
'slug' => 'wdk-facebook-comments', // The plugin slug (typically the folder name). |
| 231 |
'source' => get_stylesheet_directory() . '/addons/wdk-facebook-comments.zip', // The plugin source. |
| 232 |
'required' => false, // If false, the plugin is only 'recommended' instead of required. |
| 233 |
'version' => '1.0.1', // E.g. 1.0.0. If set, the active plugin must be this version or higher. If the plugin version is higher than the plugin version installed, the user will be notified to update the plugin. |
| 234 |
'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. |
| 235 |
'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. |
| 236 |
'external_url' => '', // If set, overrides default API URL and points to an external URL. |
| 237 |
'is_callable' => '', // If set, this callable will be be checked for availability to determine if a plugin is active. |
| 238 |
); |
| 239 |
} |
| 240 |
|
| 241 |
if(file_exists( get_stylesheet_directory() .'/addons/wdk-mailchimp.zip')) { |
| 242 |
$plugins [] = array( |
| 243 |
'name' => 'WDK Mailchimp', // The plugin name. |
| 244 |
'slug' => 'wdk-mailchimp', // The plugin slug (typically the folder name). |
| 245 |
'source' => get_stylesheet_directory() . '/addons/wdk-mailchimp.zip', // The plugin source. |
| 246 |
'required' => false, // If false, the plugin is only 'recommended' instead of required. |
| 247 |
'version' => '1.0.1', // E.g. 1.0.0. If set, the active plugin must be this version or higher. If the plugin version is higher than the plugin version installed, the user will be notified to update the plugin. |
| 248 |
'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. |
| 249 |
'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. |
| 250 |
'external_url' => '', // If set, overrides default API URL and points to an external URL. |
| 251 |
'is_callable' => '', // If set, this callable will be be checked for availability to determine if a plugin is active. |
| 252 |
); |
| 253 |
} |
| 254 |
|
| 255 |
if(file_exists( get_stylesheet_directory() .'/addons/wdk-compare-listing.zip')) { |
| 256 |
$plugins [] = array( |
| 257 |
'name' => 'WDK Compare Listings', // The plugin name. |
| 258 |
'slug' => 'wdk-compare-listing', // The plugin slug (typically the folder name). |
| 259 |
'source' => get_stylesheet_directory() . '/addons/wdk-compare-listing.zip', // The plugin source. |
| 260 |
'required' => false, // If false, the plugin is only 'recommended' instead of required. |
| 261 |
'version' => '1.0.1', // E.g. 1.0.0. If set, the active plugin must be this version or higher. If the plugin version is higher than the plugin version installed, the user will be notified to update the plugin. |
| 262 |
'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. |
| 263 |
'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. |
| 264 |
'external_url' => '', // If set, overrides default API URL and points to an external URL. |
| 265 |
'is_callable' => '', // If set, this callable will be be checked for availability to determine if a plugin is active. |
| 266 |
); |
| 267 |
} |
| 268 |
|
| 269 |
if(file_exists( get_stylesheet_directory() .'/addons/wdk-save-search.zip')) { |
| 270 |
$plugins [] = array( |
| 271 |
'name' => 'WDK Save Search', // The plugin name. |
| 272 |
'slug' => 'wdk-save-search', // The plugin slug (typically the folder name). |
| 273 |
'source' => get_stylesheet_directory() . '/addons/wdk-save-search.zip', // The plugin source. |
| 274 |
'required' => false, // If false, the plugin is only 'recommended' instead of required. |
| 275 |
'version' => '1.0.1', // E.g. 1.0.0. If set, the active plugin must be this version or higher. If the plugin version is higher than the plugin version installed, the user will be notified to update the plugin. |
| 276 |
'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch. |
| 277 |
'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. |
| 278 |
'external_url' => '', // If set, overrides default API URL and points to an external URL. |
| 279 |
'is_callable' => '', // If set, this callable will be be checked for availability to determine if a plugin is active. |
| 280 |
); |
| 281 |
} |
| 282 |
|
| 283 |
$this->data['current_theme'] = $current_theme; |
| 284 |
|
| 285 |
$this->data['theme_plugins'] = $plugins; |
| 286 |
|
| 287 |
$this->load->view('wdk_demo_import/step_1', $this->data); |
| 288 |
} |
| 289 |
} |
| 290 |
|
| 291 |
|