'ampforwp-welcome-page' ), admin_url( 'admin.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( 'admin.php' ) ) ); update_option( 'ampforwp_parent_plugin_check', true ); } add_filter('ampforwp_add_admin_subpages', 'ampforwp_add_welcome_pages'); function ampforwp_add_welcome_pages($sections){ $sections[] = array( 'page_title'=> __('Welcome To AMPforWP plugin','accelerated-mobile-pages'), 'menu_title'=>__('Welcome to AMP','accelerated-mobile-pages'), 'page_permissions'=>'manage_options', 'menu_slug' => 'ampforwp-welcome-page', 'callback' => 'ampforwp_welcome_screen_content', 'custom_amp_menu' => true ); //array_splice($sections,10,0,$newsection); return $sections; } function ampforwp_welcome_screen_content() { ?>

I'm a New User!

We have recommend you to go through AMP installation wizard which helps setup the Basic AMP and get started immediatly.

Run Installation Wizard

I'm an Experienced User!

We have many settings in Options Panel to help you setup the AMP perfectly to according to your taste & needs.

AMP Options Panel

"amp", "page" => $paged, "per_page" => $per_page, "fields" => array( "last_updated" => true, "short_description" => true, "downloaded" => false, "icons" => true ), //"locale" => get_locale(), ); $args = apply_filters( "install_plugins_table_api_args_$tab", $args ); $api = plugins_api( "plugin_information", $args ); $item = $api; $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() ) ); ?>

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.

','accelerated-mobile-pages') ?>

' . 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','accelerated-mobile-pages' ) . ''; } break; case 'update_available': if ( $status['url'] ) { /* translators: 1: Plugin name and version */ $action_links[] = '' . __( 'Update Now','accelerated-mobile-pages' ) . ''; } break; case 'latest_installed': if ( $status['activation'] == 'not_activated') { $action_links[] = '' . __( 'Activate','accelerated-mobile-pages' ) . ''; } break; case 'newer_installed': $action_links[] = '' . _x( 'Installed', 'plugin','accelerated-mobile-pages' ) . ''; 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','accelerated-mobile-pages' ) . ''; 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 ); ?>
';} ?>

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