Edit File by line
/home/barbar84/www/wp-admin
File: index.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Dashboard Administration Screen
[2] Fix | Delete
*
[3] Fix | Delete
* @package WordPress
[4] Fix | Delete
* @subpackage Administration
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
/** Load WordPress Bootstrap */
[8] Fix | Delete
require_once __DIR__ . '/admin.php';
[9] Fix | Delete
[10] Fix | Delete
/** Load WordPress dashboard API */
[11] Fix | Delete
require_once ABSPATH . 'wp-admin/includes/dashboard.php';
[12] Fix | Delete
[13] Fix | Delete
wp_dashboard_setup();
[14] Fix | Delete
[15] Fix | Delete
wp_enqueue_script( 'dashboard' );
[16] Fix | Delete
[17] Fix | Delete
if ( current_user_can( 'install_plugins' ) ) {
[18] Fix | Delete
wp_enqueue_script( 'plugin-install' );
[19] Fix | Delete
wp_enqueue_script( 'updates' );
[20] Fix | Delete
}
[21] Fix | Delete
if ( current_user_can( 'upload_files' ) ) {
[22] Fix | Delete
wp_enqueue_script( 'media-upload' );
[23] Fix | Delete
}
[24] Fix | Delete
add_thickbox();
[25] Fix | Delete
[26] Fix | Delete
if ( wp_is_mobile() ) {
[27] Fix | Delete
wp_enqueue_script( 'jquery-touch-punch' );
[28] Fix | Delete
}
[29] Fix | Delete
[30] Fix | Delete
$title = __( 'Dashboard' );
[31] Fix | Delete
$parent_file = 'index.php';
[32] Fix | Delete
[33] Fix | Delete
$help = '<p>' . __( 'Welcome to your WordPress Dashboard! This is the screen you will see when you log in to your site, and gives you access to all the site management features of WordPress. You can get help for any screen by clicking the Help tab above the screen title.' ) . '</p>';
[34] Fix | Delete
[35] Fix | Delete
$screen = get_current_screen();
[36] Fix | Delete
[37] Fix | Delete
$screen->add_help_tab(
[38] Fix | Delete
array(
[39] Fix | Delete
'id' => 'overview',
[40] Fix | Delete
'title' => __( 'Overview' ),
[41] Fix | Delete
'content' => $help,
[42] Fix | Delete
)
[43] Fix | Delete
);
[44] Fix | Delete
[45] Fix | Delete
// Help tabs.
[46] Fix | Delete
[47] Fix | Delete
$help = '<p>' . __( 'The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.' ) . '</p>';
[48] Fix | Delete
$help .= '<p>' . __( 'Links in the Toolbar at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.' ) . '</p>';
[49] Fix | Delete
[50] Fix | Delete
$screen->add_help_tab(
[51] Fix | Delete
array(
[52] Fix | Delete
'id' => 'help-navigation',
[53] Fix | Delete
'title' => __( 'Navigation' ),
[54] Fix | Delete
'content' => $help,
[55] Fix | Delete
)
[56] Fix | Delete
);
[57] Fix | Delete
[58] Fix | Delete
$help = '<p>' . __( 'You can use the following controls to arrange your Dashboard screen to suit your workflow. This is true on most other administration screens as well.' ) . '</p>';
[59] Fix | Delete
$help .= '<p>' . __( '<strong>Screen Options</strong> &mdash; Use the Screen Options tab to choose which Dashboard boxes to show.' ) . '</p>';
[60] Fix | Delete
$help .= '<p>' . __( '<strong>Drag and Drop</strong> &mdash; To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.' ) . '</p>';
[61] Fix | Delete
$help .= '<p>' . __( '<strong>Box Controls</strong> &mdash; Click the title bar of the box to expand or collapse it. Some boxes added by plugins may have configurable content, and will show a &#8220;Configure&#8221; link in the title bar if you hover over it.' ) . '</p>';
[62] Fix | Delete
[63] Fix | Delete
$screen->add_help_tab(
[64] Fix | Delete
array(
[65] Fix | Delete
'id' => 'help-layout',
[66] Fix | Delete
'title' => __( 'Layout' ),
[67] Fix | Delete
'content' => $help,
[68] Fix | Delete
)
[69] Fix | Delete
);
[70] Fix | Delete
[71] Fix | Delete
$help = '<p>' . __( 'The boxes on your Dashboard screen are:' ) . '</p>';
[72] Fix | Delete
[73] Fix | Delete
if ( current_user_can( 'edit_theme_options' ) ) {
[74] Fix | Delete
$help .= '<p>' . __( '<strong>Welcome</strong> &mdash; Shows links for some of the most common tasks when setting up a new site.' ) . '</p>';
[75] Fix | Delete
}
[76] Fix | Delete
[77] Fix | Delete
if ( current_user_can( 'view_site_health_checks' ) ) {
[78] Fix | Delete
$help .= '<p>' . __( '<strong>Site Health Status</strong> &mdash; Informs you of any potential issues that should be addressed to improve the performance or security of your website.' ) . '</p>';
[79] Fix | Delete
}
[80] Fix | Delete
[81] Fix | Delete
if ( current_user_can( 'edit_posts' ) ) {
[82] Fix | Delete
$help .= '<p>' . __( '<strong>At a Glance</strong> &mdash; Displays a summary of the content on your site and identifies which theme and version of WordPress you are using.' ) . '</p>';
[83] Fix | Delete
}
[84] Fix | Delete
[85] Fix | Delete
$help .= '<p>' . __( '<strong>Activity</strong> &mdash; Shows the upcoming scheduled posts, recently published posts, and the most recent comments on your posts and allows you to moderate them.' ) . '</p>';
[86] Fix | Delete
[87] Fix | Delete
if ( is_blog_admin() && current_user_can( 'edit_posts' ) ) {
[88] Fix | Delete
$help .= '<p>' . __( "<strong>Quick Draft</strong> &mdash; Allows you to create a new post and save it as a draft. Also displays links to the 3 most recent draft posts you've started." ) . '</p>';
[89] Fix | Delete
}
[90] Fix | Delete
[91] Fix | Delete
$help .= '<p>' . sprintf(
[92] Fix | Delete
/* translators: %s: WordPress Planet URL. */
[93] Fix | Delete
__( '<strong>WordPress Events and News</strong> &mdash; Upcoming events near you as well as the latest news from the official WordPress project and the <a href="%s">WordPress Planet</a>.' ),
[94] Fix | Delete
__( 'https://planet.wordpress.org/' )
[95] Fix | Delete
) . '</p>';
[96] Fix | Delete
[97] Fix | Delete
$screen->add_help_tab(
[98] Fix | Delete
array(
[99] Fix | Delete
'id' => 'help-content',
[100] Fix | Delete
'title' => __( 'Content' ),
[101] Fix | Delete
'content' => $help,
[102] Fix | Delete
)
[103] Fix | Delete
);
[104] Fix | Delete
[105] Fix | Delete
unset( $help );
[106] Fix | Delete
[107] Fix | Delete
$screen->set_help_sidebar(
[108] Fix | Delete
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
[109] Fix | Delete
'<p>' . __( '<a href="https://wordpress.org/support/article/dashboard-screen/">Documentation on Dashboard</a>' ) . '</p>' .
[110] Fix | Delete
'<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>'
[111] Fix | Delete
);
[112] Fix | Delete
[113] Fix | Delete
require_once ABSPATH . 'wp-admin/admin-header.php';
[114] Fix | Delete
?>
[115] Fix | Delete
[116] Fix | Delete
<div class="wrap">
[117] Fix | Delete
<h1><?php echo esc_html( $title ); ?></h1>
[118] Fix | Delete
[119] Fix | Delete
<?php
[120] Fix | Delete
if ( ! empty( $_GET['admin_email_remind_later'] ) ) :
[121] Fix | Delete
/** This filter is documented in wp-login.php */
[122] Fix | Delete
$remind_interval = (int) apply_filters( 'admin_email_remind_interval', 3 * DAY_IN_SECONDS );
[123] Fix | Delete
$postponed_time = get_option( 'admin_email_lifespan' );
[124] Fix | Delete
[125] Fix | Delete
/*
[126] Fix | Delete
* Calculate how many seconds it's been since the reminder was postponed.
[127] Fix | Delete
* This allows us to not show it if the query arg is set, but visited due to caches, bookmarks or similar.
[128] Fix | Delete
*/
[129] Fix | Delete
$time_passed = time() - ( $postponed_time - $remind_interval );
[130] Fix | Delete
[131] Fix | Delete
// Only show the dashboard notice if it's been less than a minute since the message was postponed.
[132] Fix | Delete
if ( $time_passed < MINUTE_IN_SECONDS ) :
[133] Fix | Delete
?>
[134] Fix | Delete
<div class="notice notice-success is-dismissible">
[135] Fix | Delete
<p>
[136] Fix | Delete
<?php
[137] Fix | Delete
printf(
[138] Fix | Delete
/* translators: %s: Human-readable time interval. */
[139] Fix | Delete
__( 'The admin email verification page will reappear after %s.' ),
[140] Fix | Delete
human_time_diff( time() + $remind_interval )
[141] Fix | Delete
);
[142] Fix | Delete
?>
[143] Fix | Delete
</p>
[144] Fix | Delete
</div>
[145] Fix | Delete
<?php endif; ?>
[146] Fix | Delete
<?php endif; ?>
[147] Fix | Delete
[148] Fix | Delete
<?php
[149] Fix | Delete
if ( has_action( 'welcome_panel' ) && current_user_can( 'edit_theme_options' ) ) :
[150] Fix | Delete
$classes = 'welcome-panel';
[151] Fix | Delete
[152] Fix | Delete
$option = (int) get_user_meta( get_current_user_id(), 'show_welcome_panel', true );
[153] Fix | Delete
// 0 = hide, 1 = toggled to show or single site creator, 2 = multisite site owner.
[154] Fix | Delete
$hide = ( 0 === $option || ( 2 === $option && wp_get_current_user()->user_email !== get_option( 'admin_email' ) ) );
[155] Fix | Delete
if ( $hide ) {
[156] Fix | Delete
$classes .= ' hidden';
[157] Fix | Delete
}
[158] Fix | Delete
?>
[159] Fix | Delete
[160] Fix | Delete
<div id="welcome-panel" class="<?php echo esc_attr( $classes ); ?>">
[161] Fix | Delete
<?php wp_nonce_field( 'welcome-panel-nonce', 'welcomepanelnonce', false ); ?>
[162] Fix | Delete
<a class="welcome-panel-close" href="<?php echo esc_url( admin_url( '?welcome=0' ) ); ?>" aria-label="<?php esc_attr_e( 'Dismiss the welcome panel' ); ?>"><?php _e( 'Dismiss' ); ?></a>
[163] Fix | Delete
<?php
[164] Fix | Delete
/**
[165] Fix | Delete
* Add content to the welcome panel on the admin dashboard.
[166] Fix | Delete
*
[167] Fix | Delete
* To remove the default welcome panel, use remove_action():
[168] Fix | Delete
*
[169] Fix | Delete
* remove_action( 'welcome_panel', 'wp_welcome_panel' );
[170] Fix | Delete
*
[171] Fix | Delete
* @since 3.5.0
[172] Fix | Delete
*/
[173] Fix | Delete
do_action( 'welcome_panel' );
[174] Fix | Delete
?>
[175] Fix | Delete
</div>
[176] Fix | Delete
<?php endif; ?>
[177] Fix | Delete
[178] Fix | Delete
<div id="dashboard-widgets-wrap">
[179] Fix | Delete
<?php wp_dashboard(); ?>
[180] Fix | Delete
</div><!-- dashboard-widgets-wrap -->
[181] Fix | Delete
[182] Fix | Delete
</div><!-- wrap -->
[183] Fix | Delete
[184] Fix | Delete
<?php
[185] Fix | Delete
wp_print_community_events_templates();
[186] Fix | Delete
[187] Fix | Delete
require_once ABSPATH . 'wp-admin/admin-footer.php';
[188] Fix | Delete
[189] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function