=' ) ); ?>
Storefront
'; } /** * Display a different message when the user visits this page when returning from the guided tour */ $referrer = wp_get_referer(); if ( strpos( $referrer, 'sf_starter_content' ) !== false ) { /* translators: 1: HTML, 2: HTML */ echo '

' . sprintf( esc_attr__( 'Setup complete %1$sYour Storefront adventure begins now 🚀%2$s ', 'storefront' ), '', '' ) . '

'; echo '

' . esc_attr__( 'One more thing... You might be interested in the following Storefront extensions and designs.', 'storefront' ) . '

'; } else { echo '

' . esc_attr__( 'Hello! You might be interested in the following Storefront extensions and designs.', 'storefront' ) . '

'; } if ( $show_setup_screen ) { echo '
'; } ?>

Storefront Extensions Hero

Storefront Powerpack

Automattic' ); ?>

esc_attr__( 'Activated', 'storefront' ), 'url' => '#', 'classes' => 'disabled', ); } elseif ( $this->is_plugin_installed( $plugin_slug ) ) { $url = $this->is_plugin_installed( $plugin_slug ); // The plugin exists but isn't activated yet. $button = array( 'message' => esc_attr__( 'Activate', 'storefront' ), 'url' => $url, 'classes' => 'activate-now', ); } else { // The plugin doesn't exist. $url = wp_nonce_url( add_query_arg( array( 'action' => 'install-plugin', 'plugin' => $plugin_slug, ), self_admin_url( 'update.php' ) ), 'install-plugin_' . $plugin_slug ); $button = array( 'message' => esc_attr__( 'Install now', 'storefront' ), 'url' => $url, 'classes' => ' install-now install-' . $plugin_slug, ); } ?> 'activate', 'plugin' => $plugin_file, ), admin_url( 'plugins.php' ) ), 'activate-plugin_' . $plugin_file ); return $url; } } return false; } /** * Welcome screen enhance section * * @since 1.5.2 */ public function welcome_enhance() { require_once get_template_directory() . '/inc/admin/welcome-screen/component-enhance.php'; } /** * Welcome screen contribute section * * @since 1.5.2 */ public function welcome_contribute() { require_once get_template_directory() . '/inc/admin/welcome-screen/component-contribute.php'; } /** * Get product data from json * * @param string $url URL to the json file. * @param string $transient Name the transient. * @return [type] [description] */ public function get_storefront_product_data( $url, $transient ) { $raw_products = wp_safe_remote_get( $url ); $products = json_decode( wp_remote_retrieve_body( $raw_products ) ); if ( ! empty( $products ) ) { set_transient( $transient, $products, DAY_IN_SECONDS ); } return $products; } } endif; return new Storefront_Admin();