'ampforwp-welcome-page' ), admin_url( 'index.php' ) ) ); } add_action( 'admin_init', 'ampforwp_welcome_screen_do_activation_redirect_parent' ); function ampforwp_welcome_screen_do_activation_redirect_parent() { include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); $amp_plugin_activation_check = is_plugin_active( 'amp/amp.php' ); // Bail if option is already set or plugin is deactivated if ( get_option( 'ampforwp_parent_plugin_check' ) || $amp_plugin_activation_check == false ) { return; } // Bail if activating from network, or bulk if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) { return; } // Redirect to welcome page wp_safe_redirect( add_query_arg( array( 'page' => 'ampforwp-welcome-page' ), admin_url( 'index.php' ) ) ); update_option( 'ampforwp_parent_plugin_check', true ); } add_action('admin_menu', 'ampforwp_welcome_screen_pages'); function ampforwp_welcome_screen_pages() { add_dashboard_page( 'Welcome To AMPforWP plugin', 'Welcome to AMP', 'read', 'ampforwp-welcome-page', 'ampforwp_welcome_screen_content' ); } function ampforwp_welcome_screen_content() { ?>

AMP is now Installed!

Thank you so much for installing the AMPforWP plugin!

Our team works really hard to deliver good user experience to you.

Head Over to Settings

Time to customize the your AMP!

Need Help?

We're bunch of passionate people that are dedicated towards helping our users. We will be happy to help you!

"amp", "page" => $paged, "per_page" => $per_page, "fields" => array( "last_updated" => true, "downloaded" => true, "icons" => true ), "locale" => get_locale(), ); $args = apply_filters( "install_plugins_table_api_args_$tab", $args ); $api = plugins_api( "query_plugins", $args ); $item = $api->plugins; $plugins_allowedtags = array( 'a' => array( 'href' => array(), 'title' => array(), 'target' => array() ), 'abbr' => array( 'title' => array() ), 'acronym' => array( 'title' => array() ), 'code' => array(), 'pre' => array(), 'em' => array(), 'strong' => array(), 'div' => array( 'class' => array() ), 'span' => array( 'class' => array() ), 'p' => array(), 'ul' => array(), 'ol' => array(), 'li' => array(), 'h1' => array(), 'h2' => array(), 'h3' => array(), 'h4' => array(), 'h5' => array(), 'h6' => array(), 'img' => array( 'src' => array(), 'class' => array(), 'alt' => array() ) ); ?>

Almost done. One last step remaining.

This plugin requires the following plugin: AMP

Automattic, the company behind WordPress has created a framework for AMP (also known as Default AMP plugin) which we are using as the core.

To complete the installation, you just need to click on the 'Finish Installation' button and default AMP plugin will be installed. Remember, to activate the plugin and you will be redirected to this screen again.

' . sprintf( __( 'By %s' ), $author ) . ''; } $action_links = array(); if ( current_user_can( 'install_plugins' ) || current_user_can( 'update_plugins' ) ) { $status = install_plugin_install_status( $plugin ); if ( $status['status'] == 'latest_installed' && is_plugin_inactive( $status['file'] ) ) { $status['activation'] = 'not_activated'; } elseif ( $status['status'] == 'latest_installed' && is_plugin_active( $status['file'] ) ) { $status['activation'] = 'activated'; } elseif ( $status['status'] == 'update_available' && is_plugin_active( $status['file'] ) ) { $status['activation'] = 'activated_update_required'; } else { $status['activation'] = 'not_installed'; } $activation_link = ampforwp_plugin_activation_link($status['file']); switch ( $status['status'] ) { case 'install': if ( $status['url'] ) { /* translators: 1: Plugin name and version. */ $action_links[] = '' . __( 'Install Now' ) . ''; } break; case 'update_available': if ( $status['url'] ) { /* translators: 1: Plugin name and version */ $action_links[] = '' . __( 'Update Now' ) . ''; } break; case 'latest_installed': if ( $status['activation'] == 'not_activated') { $action_links[] = '' . __( 'Activate' ) . ''; } break; case 'newer_installed': $action_links[] = '' . _x( 'Installed', 'plugin' ) . ''; break; } } $details_link = self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin['slug'] . '&TB_iframe=true&width=750&height=550' ); /* translators: 1: Plugin name and version. */ $action_links[] = '' . __( 'More Details' ) . ''; if ( !empty( $plugin['icons']['svg'] ) ) { $plugin_icon_url = $plugin['icons']['svg']; } elseif ( !empty( $plugin['icons']['2x'] ) ) { $plugin_icon_url = $plugin['icons']['2x']; } elseif ( !empty( $plugin['icons']['1x'] ) ) { $plugin_icon_url = $plugin['icons']['1x']; } else { $plugin_icon_url = $plugin['icons']['default']; } /** * Filter the install action links for a plugin. * * @since 2.7.0 * * @param array $action_links An array of plugin action hyperlinks. Defaults are links to Details and Install Now. * @param array $plugin The plugin currently being listed. */ $action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin ); ?>
';} ?>

by Automattic

'; echo '
  • ' . $action_links[0] . '
  • '; echo ''; } ?>
    id === "dashboard_page_ampforwp-welcome-page" ) {?>