Example #1
0
function jps_start()
{
    if (current_user_can_for_blog(get_current_blog_id(), 'switch_themes')) {
        if (isset($_GET['jps_wizard_end'])) {
            add_option('jpstart_wizard_has_run', true);
            wp_safe_redirect(remove_query_arg('jps_wizard_end'));
            die;
        }
        if (!get_option('jpstart_wizard_has_run') || isset($_GET['jps_wizard_start'])) {
            // Hack to get sure  the welcome panel gets shown.
            update_user_meta(get_current_user_id(), 'show_welcome_panel', true);
            require_once plugin_dir_path(__FILE__) . 'class.jetpack-start.php';
            if (isset($_GET['jps_wizard_start'])) {
                delete_option('jpstart_wizard_has_run');
                wp_safe_redirect(admin_url());
            }
            Jetpack_Start::init();
        }
        require_once plugin_dir_path(__FILE__) . 'class.jetpack-start-welcome-panel.php';
        Jetpack_Start_Welcome_Panel::init();
    }
}
Example #2
0
	<link rel="stylesheet" type="text/css" href="<?php 
echo JETPACK_START_BASE_URL . '/css/jetpack-start.css';
?>
" />
	<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans:400italic,400,600,700">
	<link rel="stylesheet" type="text/css" href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css">

	<?php 
wp_print_scripts();
?>
</head>
<body>

<?php 
$steps = Jetpack_Start::get_steps();
?>

<header>
	<span class="genericon genericon-wordpress"></span>
	<div class="progress">
		<span><?php 
_e('WordPress Setup Wizard', 'jetpack-start');
?>
</span>
		<ul></ul>
	</div>
</header>

<div id="wizard"></div>
 static function wp_welcome_panel()
 {
     require_once JETPACK_START_BASE_DIR . '/class.jetpack-start.php';
     Jetpack_Start::get_view('welcome-panel.php');
 }
Example #4
0
<?php

/**
 * Label: Maximize your site traffic
 * Sort Order: 2
 */
if (isset($_GET['page']) && $_GET['page'] == 'sharing') {
    add_filter('jetpack_start_render_wizard', '__return_false');
    if (isset($_GET['action']) && $_GET['action'] == 'completed') {
        do_action('jetpack_start_connect_service', isset($_GET['service']) ? sanitize_text_field($_GET['service']) : 'service_not_set');
        Jetpack_Start::redirect_to_step('connect-social');
    }
}
class Jetpack_Start_Step_connect_social extends Jetpack_Start_Step
{
    function __construct()
    {
        if (class_exists('Jetpack') && Jetpack::is_active()) {
            add_action('jetpack-start_step-connect-social', array($this, 'render'));
            add_filter('jetpack_start_js_globals', array($this, 'jetpack_start_js_globals'));
        }
    }
    static function jetpack_start_js_globals($jetpack_start_global_variables)
    {
        $jetpack_start_global_variables['connecting_message'] = esc_js(__('Connecting...', 'jetpack-start'));
        return $jetpack_start_global_variables;
    }
    static function get_social_services()
    {
        global $publicize;
        if (!is_object($publicize)) {