芝麻web文件管理V1.00
编辑当前文件:/home/seolotod/techleez.site/wp-content/plugins/astra-addon/class-brainstorm-update-astra-addon.php
is_using_beta() ) { $status = true; } return $status; } /** * Check if Astra Theme or Astra Pro are using beta/alpha versions * * @since 1.6.0 * @return bool True if Astra Theme or Pro are using beta/alpha versions. False is both theme and pro are using stable versions. */ private function is_using_beta() { return strpos( ASTRA_EXT_VER, 'beta' ) || strpos( ASTRA_EXT_VER, 'alpha' ) || strpos( ASTRA_THEME_VERSION, 'beta' ) || strpos( ASTRA_THEME_VERSION, 'alpha' ); } /** * Enable/Disable beta updates for Astra Theme and Astra Pro. * * @since 1.5.1 * @param bool $status True - If beta updates are enabled. False - If beta updates are disabled. * @return bool */ public function enable_beta_updates( $status ) { $allow_beta = Astra_Admin_Helper::get_admin_settings_option( '_astra_beta_updates', true, 'disable' ); if ( 'enable' === $allow_beta ) { $status = true; } elseif ( 'disable' === $allow_beta ) { $status = false; } return $status; } /** * Get registration page url for astra addon. * * @since 1.0.0 * @return String URL of the licnense registration page. */ public function get_registration_page_url() { $url = admin_url( 'themes.php?page=astra' ); if ( method_exists( 'Astra_Menu', 'get_theme_page_slug' ) ) { $url = admin_url( 'admin.php?page=' . Astra_Menu::get_theme_page_slug() . '&path=settings' ); } return $url; } /** * Skip Menu. * * @param array $products products. * @return array $products updated products. */ public function skip_menu( $products ) { $products[] = 'astra-addon'; return $products; } /** * Update brainstorm product version and product path. * * @return void */ public static function version_check() { $bsf_core_version_file = realpath( ASTRA_EXT_DIR . '/admin/bsf-core/version.yml' ); // Is file 'version.yml' exist? if ( is_file( $bsf_core_version_file ) ) { global $bsf_core_version, $bsf_core_path; $bsf_core_dir = realpath( dirname( __FILE__ ) . '/admin/bsf-core/' ); $version = file_get_contents( $bsf_core_version_file ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents // Compare versions. if ( version_compare( $version, strval( $bsf_core_version ), '>' ) ) { $bsf_core_version = $version; // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound $bsf_core_path = $bsf_core_dir; // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound } } } /** * Add Message for license. * * @param string $content get the link content. * @param string $purchase_url purchase_url. * @return string output message. */ public function license_message_astra_addon( $content, $purchase_url ) { $purchase_url = apply_filters( 'astra_addon_licence_url', $purchase_url ); return "
" . esc_html__( 'Get the license »', 'astra-addon' ) . '
'; } /** * Load the brainstorm updater. * * @return void */ public function load() { global $bsf_core_version, $bsf_core_path; if ( is_file( realpath( $bsf_core_path . '/index.php' ) ) ) { include_once realpath( $bsf_core_path . '/index.php' ); } } } /** * Kicking this off by calling 'get_instance()' method */ Brainstorm_Update_Astra_Addon::get_instance(); }