← All changes
|
vendor/codeinwp/themeisle-sdk/src/Common/Abstract_module.php
+16
-2
3.10.13
→
4.0.8
View file →
| @@ -38,8 +38,12 @@ | ||
| 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', | |
| 45 | + 'wp-cloudflare-page-cache' => 'wp-cloudflare-page-cache/wp-cloudflare-super-page-cache.php', | |
| 42 | 46 | ]; |
| 43 | 47 | |
| 44 | 48 | /** |
| 45 | 49 | * Product which use the module. |
| @@ -110,9 +114,9 @@ | ||
| 110 | 114 | * $themeisle_sdk_max_path can point to the theme when the theme version is higher. |
| 111 | 115 | * hence we also need to check that the path does not point to the theme else this will break the URL. |
| 112 | 116 | * References: https://github.com/Codeinwp/neve-pro-addon/issues/2403 |
| 113 | 117 | */ |
| 114 | - if ( $this->product->is_plugin() && false === strpos( $themeisle_sdk_max_path, get_template_directory() ) ) { | |
| 118 | + if ( ( $this->product->is_plugin() || $this->product->is_theme() ) && false === strpos( $themeisle_sdk_max_path, get_template_directory() ) ) { | |
| 115 | 119 | return plugins_url( '/', $themeisle_sdk_max_path . '/themeisle-sdk/' ); |
| 116 | 120 | }; |
| 117 | 121 | |
| 118 | 122 | return get_template_directory_uri() . '/vendor/codeinwp/themeisle-sdk/'; |
| @@ -136,9 +140,10 @@ | ||
| 136 | 140 | array( |
| 137 | 141 | 'slug' => $slug, |
| 138 | 142 | 'fields' => array( |
| 139 | 143 | 'downloaded' => false, |
| 140 | - 'rating' => false, | |
| 144 | + 'rating' => true, | |
| 145 | + 'ratings' => true, | |
| 141 | 146 | 'description' => false, |
| 142 | 147 | 'short_description' => true, |
| 143 | 148 | 'donate_link' => false, |
| 144 | 149 | 'tags' => false, |
| @@ -216,6 +221,15 @@ | ||
| 216 | 221 | |
| 217 | 222 | $plugin = isset( $this->plugin_paths[ $plugin ] ) ? $this->plugin_paths[ $plugin ] : $plugin . '/' . $plugin . '.php'; |
| 218 | 223 | |
| 219 | 224 | return is_plugin_active( $plugin ); |
| 225 | + } | |
| 226 | + | |
| 227 | + /** | |
| 228 | + * Get the current date. | |
| 229 | + * | |
| 230 | + * @return \DateTime The date time. | |
| 231 | + */ | |
| 232 | + public function get_current_date() { | |
| 233 | + return apply_filters( 'themeisle_sdk_current_date', new \DateTime( 'now' ) ); | |
| 220 | 234 | } |
| 221 | 235 | } |