← All changes
|
vendor/codeinwp/themeisle-sdk/src/Common/Abstract_module.php
+13
-1
3.10.3
→
3.11.14
View file →
| @@ -38,8 +38,11 @@ | ||
| 38 | 38 | 'wp-landing-kit' => 'wp-landing-kit/wp-landing-kit.php', |
| 39 | 39 | 'multiple-pages-generator-by-porthas' => 'multiple-pages-generator-by-porthas/porthas-multi-pages-generator.php', |
| 40 | 40 | 'sparks-for-woocommerce' => 'sparks-for-woocommerce/sparks-for-woocommerce.php', |
| 41 | 41 | 'templates-patterns-collection' => 'templates-patterns-collection/templates-patterns-collection.php', |
| 42 | + 'wpcf7-redirect' => 'wpcf7-redirect/wpcf7-redirect.php', | |
| 43 | + 'wp-full-stripe-free' => 'wp-full-stripe-free/wp-full-stripe.php', | |
| 44 | + 'learning-management-system' => 'learning-management-system/lms.php', | |
| 42 | 45 | ]; |
| 43 | 46 | |
| 44 | 47 | /** |
| 45 | 48 | * Product which use the module. |
| @@ -110,9 +113,9 @@ | ||
| 110 | 113 | * $themeisle_sdk_max_path can point to the theme when the theme version is higher. |
| 111 | 114 | * hence we also need to check that the path does not point to the theme else this will break the URL. |
| 112 | 115 | * References: https://github.com/Codeinwp/neve-pro-addon/issues/2403 |
| 113 | 116 | */ |
| 114 | - if ( $this->product->is_plugin() && false === strpos( $themeisle_sdk_max_path, get_template_directory() ) ) { | |
| 117 | + if ( ( $this->product->is_plugin() || $this->product->is_theme() ) && false === strpos( $themeisle_sdk_max_path, get_template_directory() ) ) { | |
| 115 | 118 | return plugins_url( '/', $themeisle_sdk_max_path . '/themeisle-sdk/' ); |
| 116 | 119 | }; |
| 117 | 120 | |
| 118 | 121 | return get_template_directory_uri() . '/vendor/codeinwp/themeisle-sdk/'; |
| @@ -216,6 +219,15 @@ | ||
| 216 | 219 | |
| 217 | 220 | $plugin = isset( $this->plugin_paths[ $plugin ] ) ? $this->plugin_paths[ $plugin ] : $plugin . '/' . $plugin . '.php'; |
| 218 | 221 | |
| 219 | 222 | return is_plugin_active( $plugin ); |
| 223 | + } | |
| 224 | + | |
| 225 | + /** | |
| 226 | + * Get the current date. | |
| 227 | + * | |
| 228 | + * @return \DateTime The date time. | |
| 229 | + */ | |
| 230 | + public function get_current_date() { | |
| 231 | + return apply_filters( 'themeisle_sdk_current_date', new \DateTime( 'now' ) ); | |
| 220 | 232 | } |
| 221 | 233 | } |