get_cta_link( 'quick-links-corner' );
return $links;
}
/**
* Admin Assets
*/
public function admin_assets() {
$current_screen = get_current_screen();
if ( 'appearance_page_starter-templates' !== $current_screen->id ) {
return;
}
if ( Astra_Sites_White_Label::get_instance()->is_white_labeled() ) {
return;
}
wp_enqueue_style( 'astra-sites-admin-page', ASTRA_SITES_URI . 'assets/css/admin.css', ASTRA_SITES_VER, true );
wp_enqueue_script( 'astra-sites-admin-js', ASTRA_SITES_URI . 'assets/js/admin.js', array( 'astra-sites-admin-page', 'jquery' ), ASTRA_SITES_VER, true );
}
/**
* Add Custom CTA Infobar.
*/
public function custom_upgrade_cta() {
$current_screen = get_current_screen();
if ( 'appearance_page_starter-templates' !== $current_screen->id ) {
return;
}
if ( Astra_Sites_White_Label::get_instance()->is_white_labeled() ) {
return;
}
$custom_cta_content_data = apply_filters(
'astra_sites_custom_cta_vars',
array(
'text' => __( 'Get unlimited access to all premium Starter Templates and more, at a single low cost!', 'astra-sites' ),
'button_text' => __( 'Get Essential Toolkit', 'astra-sites' ),
'cta_link' => Astra_Sites::get_instance()->get_cta_link(),
)
);
$html = '
';
echo wp_kses_post( $html );
}
/**
* Admin Notices
*
* @since 2.3.7
* @return void
*/
public function admin_notices() {
$image_path = esc_url( ASTRA_SITES_URI . 'inc/assets/images/logo.svg' );
$complete = get_option( 'astra_sites_import_complete', '' );
Astra_Notices::add_notice(
array(
'id' => 'astra-sites-5-start-notice',
'type' => 'info',
'class' => 'astra-sites-5-star',
'show_if' => ( 'yes' === $complete && false === Astra_Sites_White_Label::get_instance()->is_white_labeled() ),
/* translators: %1$s white label plugin name and %2$s deactivation link */
'message' => sprintf(
'
',
$image_path,
__( 'Hello! Seems like you have used Starter Templates to build this website — Thanks a ton!', 'astra-sites' ),
__( 'Could you please do us a BIG favor and give it a 5-star rating on WordPress? This would boost our motivation and help other users make a comfortable decision while choosing the Starter Templates.', 'astra-sites' ),
'https://wordpress.org/support/plugin/astra-sites/reviews/?filter=5#new-post',
__( 'Ok, you deserve it', 'astra-sites' ),
MONTH_IN_SECONDS,
__( 'Nope, maybe later', 'astra-sites' ),
__( 'I already did', 'astra-sites' )
),
)
);
}
/**
* Enqueue Astra Notices CSS.
*
* @since 2.3.7
*
* @return void
*/
public static function notice_assets() {
$file = is_rtl() ? 'astra-notices-rtl.css' : 'astra-notices.css';
wp_enqueue_style( 'astra-sites-notices', ASTRA_SITES_URI . 'assets/css/' . $file, array(), ASTRA_SITES_VER );
}
}
/**
* Kicking this off by calling 'get_instance()' method
*/
Astra_Sites_Admin::get_instance();
endif;