activate your copy of the %2$s to get update notifications, access to support features & other resources!', 'wp-schema-pro' ), $url, $product_name ); } /** * Show action links on the plugin screen. * * @param mixed $links Plugin Action links. * @return array Filtered plugin action links. */ public function bsf_aiosrs_pro_license_form_and_links( $links = array() ) { if ( function_exists( 'get_bsf_inline_license_form' ) ) { $args = array( 'product_id' => 'wp-schema-pro', 'popup_license_form' => true, ); return get_bsf_inline_license_form( $links, $args, 'edd' ); } return $links; } /** * Bsf registration page * * @since 1.1.0 */ public function bsf_aiosrs_pro_bsf_registration_page_url() { // phpcs:ignore WordPressVIPMinimum.Hooks.AlwaysReturnInFilter.MissingReturnStatement if ( is_multisite() ) { return network_admin_url( 'plugins.php?bsf-inline-license-form=wp-schema-pro' ); } else { return admin_url( 'plugins.php?bsf-inline-license-form=wp-schema-pro' ); } } /** * Product Name. * * @param string $name Product Name. * @return string product name. */ public function product_name( $name ) { $branding = get_option( 'wp-schema-pro-branding-settings' ); if ( isset( $branding['sp_plugin_name'] ) && '' !== $branding['sp_plugin_name'] ) { $name = $branding['sp_plugin_name']; } return $name; } /** * Skip Menu. * * @param array $products products. * @return array $products updated products. */ public function skip_menu( $products ) { $products[] = 'wp-schema-pro'; return $products; } /** * Update brainstorm product version and product path. * * @return void */ public static function version_check() { $bsf_core_version_file = realpath( BSF_AIOSRS_PRO_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( BSF_AIOSRS_PRO_DIR . '/admin/bsf-core/' ); $version = file_get_contents( realpath( plugin_dir_path( BSF_AIOSRS_PRO_FILE ) . '/admin/bsf-core/version.yml' ) ); // Compare versions. if ( version_compare( $version, (string) $bsf_core_version, '>' ) ) { $bsf_core_version = $version; $bsf_core_path = $bsf_core_dir; } } } /** * Add Message for license. * * @param string $content Content. * @param string $purchase_url purchase_url. * @return string output message. */ public function license_message_aiosrs_pro( $content, $purchase_url ) { $schema_url = esc_url( "https://wpschema.com/pricing/" ); $purchase_url = apply_filters( 'wp_schema_pro_licence_url', $schema_url ); $message = "
'; $branding = get_option( 'wp-schema-pro-branding-settings' ); if ( isset( $branding['sp_plugin_name'] ) && '' !== $branding['sp_plugin_name'] ) { $message = ''; } return $message; } /** * 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_AIOSRS_Pro::get_instance(); endif;