PageRenderTime 26ms CodeModel.GetById 13ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

/wp-content/plugins/wordpress-seo/admin/pages/dashboard.php

https://bitbucket.org/carloskikea/helpet
PHP | 67 lines | 50 code | 12 blank | 5 comment | 5 complexity | c8ec23a024726dae0fe25770c76b6df5 MD5 | raw file
 1<?php
 2/**
 3 * WPSEO plugin file.
 4 *
 5 * @package WPSEO\Admin
 6 */
 7
 8if ( ! defined( 'WPSEO_VERSION' ) ) {
 9	header( 'Status: 403 Forbidden' );
10	header( 'HTTP/1.1 403 Forbidden' );
11	exit();
12}
13
14if ( filter_input( INPUT_GET, 'intro' ) ) {
15	update_user_meta( get_current_user_id(), 'wpseo_seen_about_version', WPSEO_VERSION );
16	require WPSEO_PATH . 'admin/views/about.php';
17
18	return;
19}
20
21if ( isset( $_GET['allow_tracking'] ) && check_admin_referer( 'wpseo_activate_tracking', 'nonce' ) ) {
22	WPSEO_Options::set( 'yoast_tracking', ( $_GET['allow_tracking'] === 'yes' ) );
23
24	if ( isset( $_SERVER['HTTP_REFERER'] ) ) {
25		wp_safe_redirect( $_SERVER['HTTP_REFERER'], 307 );
26		exit;
27	}
28}
29
30$yform = Yoast_Form::get_instance();
31$yform->admin_header( true, 'wpseo' );
32
33do_action( 'wpseo_all_admin_notices' );
34
35$tabs = new WPSEO_Option_Tabs( 'dashboard' );
36$tabs->add_tab(
37	new WPSEO_Option_Tab(
38		'dashboard',
39		__( 'Dashboard', 'wordpress-seo' ),
40		array(
41			'video_url'   => WPSEO_Shortlinker::get( 'https://yoa.st/screencast-notification-center' ),
42			'save_button' => false,
43		)
44	)
45);
46$tabs->add_tab(
47	new WPSEO_Option_Tab(
48		'features',
49		__( 'Features', 'wordpress-seo' ),
50		array( 'video_url' => WPSEO_Shortlinker::get( 'https://yoa.st/screencast-features' ) )
51	)
52);
53$tabs->add_tab(
54	new WPSEO_Option_Tab(
55		'webmaster-tools',
56		__( 'Webmaster Tools', 'wordpress-seo' ),
57		array( 'video_url' => WPSEO_Shortlinker::get( 'https://yoa.st/screencast-general-search-console' ) )
58	)
59);
60
61do_action( 'wpseo_settings_tabs_dashboard', $tabs );
62
63$tabs->display( $yform );
64
65do_action( 'wpseo_dashboard' );
66
67$yform->admin_footer();