| @@ -70,14 +70,8 @@ | ||
| 70 | 70 | * @var string $key The product ready key. |
| 71 | 71 | */ |
| 72 | 72 | private $key; |
| 73 | 73 | /** |
| 74 | - * Author URL | |
| 75 | - * | |
| 76 | - * @var string $author_url The author url. | |
| 77 | - */ | |
| 78 | - private $author_url; | |
| 79 | - /** | |
| 80 | 74 | * Product store url. |
| 81 | 75 | * |
| 82 | 76 | * @var string $store_url The store url. |
| 83 | 77 | */ |
| @@ -138,35 +132,12 @@ | ||
| 138 | 132 | } |
| 139 | 133 | $install = get_option( $this->get_key() . '_install', 0 ); |
| 140 | 134 | if ( 0 === $install ) { |
| 141 | 135 | $install = time(); |
| 142 | - /** | |
| 143 | - * Action to be triggered when the product is first activated. | |
| 144 | - * | |
| 145 | - * @param string $basefile The basefile of the product. | |
| 146 | - */ | |
| 147 | - do_action( 'themeisle_sdk_first_activation', $basefile ); | |
| 148 | - | |
| 149 | 136 | update_option( $this->get_key() . '_install', time() ); |
| 150 | 137 | } |
| 151 | - $this->install = (int) $install; | |
| 138 | + $this->install = $install; | |
| 152 | 139 | self::$cached_products[ crc32( $basefile ) ] = $this; |
| 153 | - $current_version = get_option( $this->slug . '_version', '' ); | |
| 154 | - | |
| 155 | - if ( $current_version !== $this->version && wp_cache_add( "{$this->slug}_version_upgrade", true, '', HOUR_IN_SECONDS ) ) { | |
| 156 | - /** | |
| 157 | - * Action to be triggered when the product is updated. | |
| 158 | - * | |
| 159 | - * @param string $current_version The current version of the product. | |
| 160 | - * @param string $new_version The new version of the product. | |
| 161 | - * @param string $basefile The basefile of the product. | |
| 162 | - */ | |
| 163 | - do_action( "themeisle_sdk_update_{$this->slug}", $current_version, $this->version, $basefile ); | |
| 164 | - | |
| 165 | - // Update the version of the product. | |
| 166 | - update_option( "{$this->slug}_version", $this->version ); | |
| 167 | - wp_cache_delete( "{$this->slug}_version_upgrade" ); | |
| 168 | - } | |
| 169 | 140 | } |
| 170 | 141 | |
| 171 | 142 | /** |
| 172 | 143 | * Return a product. |
| @@ -368,19 +339,9 @@ | ||
| 368 | 339 | * |
| 369 | 340 | * @return string Friendly name. |
| 370 | 341 | */ |
| 371 | 342 | public function get_friendly_name() { |
| 372 | - $name = trim( str_replace( 'Lite', '', $this->get_name() ) ); | |
| 373 | - if ( defined( 'OTTER_BLOCKS_BASEFILE' ) && OTTER_BLOCKS_BASEFILE === $this->basefile ) { | |
| 374 | - $name = 'Otter Blocks'; | |
| 375 | - } | |
| 376 | - if ( defined( 'OPTML_BASEFILE' ) && OPTML_BASEFILE === $this->basefile ) { | |
| 377 | - $name = 'Optimole'; | |
| 378 | - } | |
| 379 | - if ( defined( 'WPMM_FILE' ) && WPMM_FILE === $this->basefile ) { | |
| 380 | - $name = 'LightStart'; | |
| 381 | - } | |
| 382 | - $name = apply_filters( $this->get_key() . '_friendly_name', $name ); | |
| 343 | + $name = apply_filters( $this->get_key() . '_friendly_name', trim( str_replace( 'Lite', '', $this->get_name() ) ) ); | |
| 383 | 344 | $name = rtrim( $name, '- ()' ); |
| 384 | 345 | |
| 385 | 346 | return $name; |
| 386 | 347 | } |
| @@ -444,9 +405,8 @@ | ||
| 444 | 405 | return add_query_arg( |
| 445 | 406 | [ |
| 446 | 407 | 'name' => rawurlencode( $this->get_name() ), |
| 447 | 408 | 'edd_action' => 'view_changelog', |
| 448 | - 'locale' => get_user_locale(), | |
| 449 | 409 | ], |
| 450 | 410 | $this->get_store_url() |
| 451 | 411 | ); |
| 452 | 412 | } |