PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.4.2
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.4.2
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
← All changes | vendor/codeinwp/themeisle-sdk/src/Product.php +36 -1 3.1.33.4.2 View file →
@@ -113,9 +113,9 @@
113 113 * @param string $basefile Product basefile.
114 114 */
115 115 public function __construct( $basefile ) {
116 116 if ( ! empty( $basefile ) ) {
117 - if ( is_readable( $basefile ) ) {
117 + if ( is_file( $basefile ) ) {
118 118 $this->basefile = $basefile;
119 119 $this->setup_from_path();
120 120 $this->setup_from_fileheaders();
121 121 }
@@ -199,8 +199,9 @@
199 199 */
200 200 public function get_key() {
201 201 return $this->key;
202 202 }
203 +
203 204 /**
204 205 * Check if the product is either theme or plugin.
205 206 *
206 207 * @return string Product type.
@@ -341,8 +342,13 @@
341 342 *
342 343 * @return string The store url.
343 344 */
344 345 public function get_store_url() {
346 +
347 + if ( strpos( $this->store_url, '/themeisle.com' ) !== false ) {
348 + return 'https://store.themeisle.com/';
349 + }
350 +
345 351 return $this->store_url;
346 352 }
347 353
348 354 /**
@@ -354,8 +360,23 @@
354 360 return $this->basefile;
355 361 }
356 362
357 363 /**
364 + * Get changelog url.
365 + *
366 + * @return string Changelog url.
367 + */
368 + public function get_changelog() {
369 + return add_query_arg(
370 + [
371 + 'name' => rawurlencode( $this->get_name() ),
372 + 'edd_action' => 'view_changelog',
373 + ],
374 + $this->get_store_url()
375 + );
376 + }
377 +
378 + /**
358 379 * Returns product filename.
359 380 *
360 381 * @return string The product filename.
361 382 */
@@ -361,8 +382,9 @@
361 382 */
362 383 public function get_file() {
363 384 return $this->file;
364 385 }
386 +
365 387 /**
366 388 * Returns the pro slug, if available.
367 389 *
368 390 * @return string The pro slug.
@@ -377,7 +399,20 @@
377 399 * @return int The install timestamp.
378 400 */
379 401 public function get_install_time() {
380 402 return $this->install;
403 + }
404 +
405 + /**
406 + * Returns the URL of the product base file.
407 + *
408 + * @param string $path The path to the file.
409 + *
410 + * @return string The URL of the product base file.
411 + */
412 + public function get_base_url( $path = '/' ) {
413 + if ( $this->type ) {
414 + return plugins_url( $path, $this->basefile );
415 + }
381 416 }
382 417
383 418 }