Astra_Admin_Settings::astra_sites_notice_button()
Render button for Astra Site notices
Description
Return
(array) $ast_sites_notice_btn Rendered button
Source
File: inc/core/class-astra-admin-settings.php
public static function astra_sites_notice_button() { $ast_sites_notice_btn = array(); // Any of the Starter Templtes plugin - Active. if ( is_plugin_active( 'astra-pro-sites/astra-pro-sites.php' ) || is_plugin_active( 'astra-sites/astra-sites.php' ) ) { $ast_sites_notice_btn['class'] = 'active'; $ast_sites_notice_btn['button_text'] = __( 'See Library »', 'astra' ); $ast_sites_notice_btn['link'] = admin_url( 'themes.php?page=' . self::$starter_templates_slug ); return $ast_sites_notice_btn; } // Starter Templates PRO Plugin - Installed but Inactive. if ( file_exists( WP_PLUGIN_DIR . '/astra-pro-sites/astra-pro-sites.php' ) && is_plugin_inactive( 'astra-pro-sites/astra-pro-sites.php' ) ) { $ast_sites_notice_btn['class'] = 'astra-activate-recommended-plugin'; $ast_sites_notice_btn['button_text'] = __( 'Activate Importer Plugin', 'astra' ); $ast_sites_notice_btn['data_slug'] = 'astra-pro-sites'; $ast_sites_notice_btn['data_init'] = '/astra-pro-sites/astra-pro-sites.php'; $ast_sites_notice_btn['data_settings_link'] = admin_url( 'themes.php?page=' . self::$starter_templates_slug ); $ast_sites_notice_btn['data_settings_link_text'] = __( 'See Library »', 'astra' ); $ast_sites_notice_btn['activating_text'] = __( 'Activating Importer Plugin ', 'astra' ) . '…'; return $ast_sites_notice_btn; } // Starter Templates FREE Plugin - Installed but Inactive. if ( file_exists( WP_PLUGIN_DIR . '/astra-sites/astra-sites.php' ) && is_plugin_inactive( 'astra-sites/astra-sites.php' ) ) { $ast_sites_notice_btn['class'] = 'astra-activate-recommended-plugin'; $ast_sites_notice_btn['button_text'] = __( 'Activate Importer Plugin', 'astra' ); $ast_sites_notice_btn['data_slug'] = 'astra-sites'; $ast_sites_notice_btn['data_init'] = '/astra-sites/astra-sites.php'; $ast_sites_notice_btn['data_settings_link'] = admin_url( 'themes.php?page=' . self::$starter_templates_slug ); $ast_sites_notice_btn['data_settings_link_text'] = __( 'See Library »', 'astra' ); $ast_sites_notice_btn['activating_text'] = __( 'Activating Importer Plugin ', 'astra' ) . '…'; return $ast_sites_notice_btn; } // Any of the Starter Templates plugin not available. if ( ! file_exists( WP_PLUGIN_DIR . '/astra-sites/astra-sites.php' ) || ! file_exists( WP_PLUGIN_DIR . '/astra-pro-sites/astra-pro-sites.php' ) ) { $ast_sites_notice_btn['class'] = 'astra-install-recommended-plugin'; $ast_sites_notice_btn['button_text'] = __( 'Install Importer Plugin', 'astra' ); $ast_sites_notice_btn['data_slug'] = 'astra-sites'; $ast_sites_notice_btn['data_init'] = '/astra-sites/astra-sites.php'; $ast_sites_notice_btn['data_settings_link'] = admin_url( 'themes.php?page=' . self::$starter_templates_slug ); $ast_sites_notice_btn['data_settings_link_text'] = __( 'See Library »', 'astra' ); $ast_sites_notice_btn['detail_link_class'] = 'plugin-detail thickbox open-plugin-details-modal astra-starter-sites-detail-link'; $ast_sites_notice_btn['detail_link'] = network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=astra-sites&TB_iframe=true&width=772&height=400' ); $ast_sites_notice_btn['detail_link_text'] = __( 'Details »', 'astra' ); return $ast_sites_notice_btn; } $ast_sites_notice_btn['class'] = 'active'; $ast_sites_notice_btn['button_text'] = __( 'See Library »', 'astra' ); $ast_sites_notice_btn['link'] = admin_url( 'themes.php?page=' . self::$starter_templates_slug ); return $ast_sites_notice_btn; }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
1.6.5 | Introduced. |