X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/849f15aeed7a5e39314057bdc0064d8edd60dd7d..e3ff8f35458a959c1879c0a4976701ed8dcfe651:/wp-admin/includes/dashboard.php diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index bf37176b..0ecf0a23 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -12,6 +12,10 @@ * Handles POST data, sets up filters. * * @since 2.5.0 + * + * @global array $wp_registered_widgets + * @global array $wp_registered_widget_controls + * @global array $wp_dashboard_control_callbacks */ function wp_dashboard_setup() { global $wp_registered_widgets, $wp_registered_widget_controls, $wp_dashboard_control_callbacks; @@ -43,7 +47,7 @@ function wp_dashboard_setup() { } // QuickPress Widget - if ( is_blog_admin() && current_user_can( 'edit_posts' ) ) { + if ( is_blog_admin() && current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) { $quick_draft_title = sprintf( '%1$s %2$s', __( 'Quick Draft' ), __( 'Drafts' ) ); wp_add_dashboard_widget( 'dashboard_quick_press', $quick_draft_title, 'wp_dashboard_quick_press' ); } @@ -61,7 +65,7 @@ function wp_dashboard_setup() { do_action( 'wp_network_dashboard_setup' ); /** - * Filter the list of widgets to load for the Network Admin dashboard. + * Filters the list of widgets to load for the Network Admin dashboard. * * @since 3.1.0 * @@ -78,7 +82,7 @@ function wp_dashboard_setup() { do_action( 'wp_user_dashboard_setup' ); /** - * Filter the list of widgets to load for the User Admin dashboard. + * Filters the list of widgets to load for the User Admin dashboard. * * @since 3.1.0 * @@ -95,7 +99,7 @@ function wp_dashboard_setup() { do_action( 'wp_dashboard_setup' ); /** - * Filter the list of widgets to load for the admin dashboard. + * Filters the list of widgets to load for the admin dashboard. * * @since 2.5.0 * @@ -125,10 +129,33 @@ function wp_dashboard_setup() { do_action( 'do_meta_boxes', $screen->id, 'side', '' ); } +/** + * Adds a new dashboard widget. + * + * @since 2.7.0 + * + * @global array $wp_dashboard_control_callbacks + * + * @param string $widget_id Widget ID (used in the 'id' attribute for the widget). + * @param string $widget_name Title of the widget. + * @param callable $callback Function that fills the widget with the desired content. + * The function should echo its output. + * @param callable $control_callback Optional. Function that outputs controls for the widget. Default null. + * @param array $callback_args Optional. Data that should be set as the $args property of the widget array + * (which is the second parameter passed to your callback). Default null. + */ function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_callback = null, $callback_args = null ) { $screen = get_current_screen(); global $wp_dashboard_control_callbacks; + $private_callback_args = array( '__widget_basename' => $widget_name ); + + if ( is_null( $callback_args ) ) { + $callback_args = $private_callback_args; + } else if ( is_array( $callback_args ) ) { + $callback_args = array_merge( $callback_args, $private_callback_args ); + } + if ( $control_callback && current_user_can( 'edit_dashboard' ) && is_callable( $control_callback ) ) { $wp_dashboard_control_callbacks[$widget_id] = $control_callback; if ( isset( $_GET['edit'] ) && $widget_id == $_GET['edit'] ) { @@ -154,8 +181,17 @@ function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_ add_meta_box( $widget_id, $widget_name, $callback, $screen, $location, $priority, $callback_args ); } +/** + * Outputs controls for the current dashboard widget. + * + * @access private + * @since 2.7.0 + * + * @param mixed $dashboard + * @param array $meta_box + */ function _wp_dashboard_control_callback( $dashboard, $meta_box ) { - echo '
'; + echo ''; wp_dashboard_trigger_widget_control( $meta_box['id'] ); wp_nonce_field( 'edit-dashboard-widget_' . $meta_box['id'], 'dashboard-widget-nonce' ); echo ''; @@ -235,22 +271,27 @@ function wp_dashboard_right_now() { } // Comments $num_comm = wp_count_comments(); - if ( $num_comm && $num_comm->approved ) { + if ( $num_comm && ( $num_comm->approved || $num_comm->moderated ) ) { $text = sprintf( _n( '%s Comment', '%s Comments', $num_comm->approved ), number_format_i18n( $num_comm->approved ) ); ?>
  • moderated ) { - /* translators: Number of comments in moderation */ - $text = sprintf( _nx( '%s in moderation', '%s in moderation', $num_comm->moderated, 'comments' ), number_format_i18n( $num_comm->moderated ) ); - ?> -
  • - moderated ); + /* translators: Number of comments in moderation */ + $text = sprintf( _nx( '%s in moderation', '%s in moderation', $num_comm->moderated, 'comments' ), $moderated_comments_count_i18n ); + /* translators: Number of comments in moderation */ + $aria_label = sprintf( _nx( '%s comment in moderation', '%s comments in moderation', $num_comm->moderated, 'comments' ), $moderated_comments_count_i18n ); + ?> +
  • + $content

    "; + echo "

    $content

    "; } ?> @@ -336,6 +379,9 @@ function wp_dashboard_right_now() { " method="get">

    - - 'submit_users' ) ); ?> + + + 'submit_users' ) ); ?>

    - - 'submit_sites' ) ); ?> + + + 'submit_sites' ) ); ?>

    'modified', 'order' => 'DESC' ); + + /** + * Filters the post query arguments for the 'Recent Drafts' dashboard widget. + * + * @since 4.4.0 + * + * @param array $query_args The query arguments for the 'Recent Drafts' dashboard widget. + */ + $query_args = apply_filters( 'dashboard_recent_drafts_query_args', $query_args ); + $drafts = get_posts( $query_args ); if ( ! $drafts ) { return; @@ -496,17 +565,18 @@ function wp_dashboard_recent_drafts( $drafts = false ) { echo '
    '; if ( count( $drafts ) > 3 ) { - echo '

    ' . _x( 'View all', 'drafts' ) . "

    \n"; + echo '

    ' . _x( 'View all', 'drafts' ) . "

    \n"; } - echo '

    ' . __( 'Drafts' ) . "

    \n
    "; } +/** + * Outputs a row for the Recent Comments widget. + * + * @access private + * @since 2.7.0 + * + * @global WP_Comment $comment + * + * @param WP_Comment $comment The current comment. + * @param bool $show_date Optional. Whether to display the date. + */ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { - $GLOBALS['comment'] =& $comment; + $GLOBALS['comment'] = clone $comment; - $comment_post_title = strip_tags(get_the_title( $comment->comment_post_ID )); + if ( $comment->comment_post_ID > 0 ) { - if ( current_user_can( 'edit_post', $comment->comment_post_ID ) ) { - $comment_post_url = get_edit_post_link( $comment->comment_post_ID ); + $comment_post_title = _draft_or_post_title( $comment->comment_post_ID ); + $comment_post_url = get_the_permalink( $comment->comment_post_ID ); $comment_post_link = "$comment_post_title"; } else { - $comment_post_link = $comment_post_title; + $comment_post_link = ''; } - $comment_link = '#'; - $actions_string = ''; if ( current_user_can( 'edit_comment', $comment->comment_ID ) ) { // Pre-order it: Approve | Reply | Edit | Spam | Trash. @@ -537,7 +616,8 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { 'reply' => '', 'edit' => '', 'spam' => '', - 'trash' => '', 'delete' => '' + 'trash' => '', 'delete' => '', + 'view' => '', ); $del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "delete-comment_$comment->comment_ID" ) ); @@ -549,26 +629,30 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { $trash_url = esc_url( "comment.php?action=trashcomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); $delete_url = esc_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); - $actions['approve'] = "" . __( 'Approve' ) . ''; - $actions['unapprove'] = "" . __( 'Unapprove' ) . ''; - $actions['edit'] = "". __('Edit') . ''; - $actions['reply'] = '' . __('Reply') . ''; - $actions['spam'] = "" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . ''; - if ( !EMPTY_TRASH_DAYS ) - $actions['delete'] = "" . __('Delete Permanently') . ''; - else - $actions['trash'] = "" . _x('Trash', 'verb') . ''; + $actions['approve'] = "" . __( 'Approve' ) . ''; + $actions['unapprove'] = "" . __( 'Unapprove' ) . ''; + $actions['edit'] = "". __( 'Edit' ) . ''; + $actions['reply'] = '' . __( 'Reply' ) . ''; + $actions['spam'] = "" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . ''; + + if ( ! EMPTY_TRASH_DAYS ) { + $actions['delete'] = "" . __( 'Delete Permanently' ) . ''; + } else { + $actions['trash'] = "" . _x( 'Trash', 'verb' ) . ''; + } + + $actions['view'] = '' . __( 'View' ) . ''; /** - * Filter the action links displayed for each comment in the 'Recent Comments' + * Filters the action links displayed for each comment in the 'Recent Comments' * dashboard widget. * * @since 2.6.0 * - * @param array $actions An array of comment actions. Default actions include: - * 'Approve', 'Unapprove', 'Edit', 'Reply', 'Spam', - * 'Delete', and 'Trash'. - * @param object $comment The comment object. + * @param array $actions An array of comment actions. Default actions include: + * 'Approve', 'Unapprove', 'Edit', 'Reply', 'Spam', + * 'Delete', and 'Trash'. + * @param WP_Comment $comment The comment object. */ $actions = apply_filters( 'comment_row_actions', array_filter($actions), $comment ); @@ -578,26 +662,46 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { ( ( ('approve' == $action || 'unapprove' == $action) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | '; // Reply and quickedit need a hide-if-no-js span - if ( 'reply' == $action || 'quickedit' == $action ) + if ( 'reply' == $action || 'quickedit' == $action ) { $action .= ' hide-if-no-js'; + } + if ( 'view' === $action && '1' !== $comment->comment_approved ) { + $action .= ' hidden'; + } $actions_string .= "$sep$link"; } } - ?> -
    comment_ID) ) ); ?>> +
  • > comment_type || 'comment' == $comment->comment_type ) : ?> -
    -

    - ' . get_comment_author_link() . '', $comment_post_link.' '.$comment_link, ' ' . __( '[Pending]' ) . '' ); ?> -

    +
    +

    + ' . get_comment_author_link( $comment ) . '', + $comment_post_link, + '' . __( '[Pending]' ) . '' + ); + } else { + printf( + /* translators: 1: comment author, 2: notification if the comment is pending */ + __( 'From %1$s %2$s' ), + '' . get_comment_author_link( $comment ) . '', + '' . __( '[Pending]' ) . '' + ); + } + ?> +

    -
    - -

    $type", $comment_post_link." ".$comment_link ); ?>

    -

    +
    +

    + $type", + $comment_post_link, + '' . __( '[Pending]' ) . '' + ); + } else { + printf( + /* translators: 1: type of comment, 2: notification if the comment is pending */ + _x( '%1$s %2$s', 'dashboard' ), + "$type", + '' . __( '[Pending]' ) . '' + ); + } + ?> +

    +

    -

    +

    +

    +
    -
    +
  • '; - echo '

    '; + echo ''; echo '

    ' . __( 'No activity yet!' ) . '

    '; echo '
    '; } @@ -689,13 +815,22 @@ function wp_dashboard_recent_posts( $args ) { 'cache_results' => false, 'perm' => ( 'future' === $args['status'] ) ? 'editable' : 'readable', ); + + /** + * Filters the query arguments used for the Recent Posts widget. + * + * @since 4.2.0 + * + * @param array $query_args The arguments passed to WP_Query to produce the list of posts. + */ + $query_args = apply_filters( 'dashboard_recent_posts_query_args', $query_args ); $posts = new WP_Query( $query_args ); if ( $posts->have_posts() ) { echo '
    '; - echo '

    ' . $args['title'] . '

    '; + echo '

    ' . $args['title'] . '

    '; echo ''; @@ -758,6 +900,9 @@ function wp_dashboard_recent_comments( $total_items = 5 ) { $comments_query['status'] = 'approve'; while ( count( $comments ) < $total_items && $possible = get_comments( $comments_query ) ) { + if ( ! is_array( $possible ) ) { + break; + } foreach ( $possible as $comment ) { if ( ! current_user_can( 'read_post', $comment->comment_post_ID ) ) continue; @@ -771,15 +916,17 @@ function wp_dashboard_recent_comments( $total_items = 5 ) { if ( $comments ) { echo '
    '; - echo '

    ' . __( 'Comments' ) . '

    '; + echo '

    ' . __( 'Recent Comments' ) . '

    '; - echo '
    '; + echo '
      '; foreach ( $comments as $comment ) _wp_dashboard_recent_comments_row( $comment ); - echo '
    '; + echo ''; - if ( current_user_can('edit_posts') ) - _get_list_table('WP_Comments_List_Table')->views(); + if ( current_user_can( 'edit_posts' ) ) { + echo '

    ' . __( 'View more comments' ) . '

    '; + _get_list_table( 'WP_Comments_List_Table' )->views(); + } wp_comment_reply( -1, false, 'dashboard', false ); wp_comment_trashnotice(); @@ -811,18 +958,18 @@ function wp_dashboard_rss_output( $widget_id ) { * If $check_urls is empty, look for the rss feed url found in the dashboard * widget options of $widget_id. If cached, call $callback, a function that * echoes out output for this widget. If not cache, echo a "Loading..." stub - * which is later replaced by AJAX call (see top of /wp-admin/index.php) + * which is later replaced by Ajax call (see top of /wp-admin/index.php) * * @since 2.5.0 * * @param string $widget_id - * @param callback $callback + * @param callable $callback * @param array $check_urls RSS feeds * @return bool False on failure. True on success. */ function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = array() ) { $loading = '

    ' . __( 'Loading…' ) . '

    ' . __( 'This widget requires JavaScript.' ) . '

    '; - $doing_ajax = ( defined('DOING_AJAX') && DOING_AJAX ); + $doing_ajax = wp_doing_ajax(); if ( empty($check_urls) ) { $widgets = get_option( 'dashboard_widget_options' ); @@ -833,7 +980,8 @@ function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = ar $check_urls = array( $widgets[$widget_id]['url'] ); } - $cache_key = 'dash_' . md5( $widget_id ); + $locale = get_locale(); + $cache_key = 'dash_' . md5( $widget_id . '_' . $locale ); if ( false !== ( $output = get_transient( $cache_key ) ) ) { echo $output; return true; @@ -855,14 +1003,17 @@ function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = ar return true; } -/* Dashboard Widgets Controls */ +// +// Dashboard Widgets Controls +// -// Calls widget_control callback /** * Calls widget control callback. * * @since 2.5.0 * + * @global array $wp_dashboard_control_callbacks + * * @param int $widget_control_id Registered Widget ID. */ function wp_dashboard_trigger_widget_control( $widget_control_id = false ) { @@ -928,16 +1079,16 @@ function wp_dashboard_primary() { 'news' => array( /** - * Filter the primary link URL for the 'WordPress News' dashboard widget. + * Filters the primary link URL for the 'WordPress News' dashboard widget. * * @since 2.5.0 * * @param string $link The widget's primary link URL. */ - 'link' => apply_filters( 'dashboard_primary_link', __( 'http://wordpress.org/news/' ) ), + 'link' => apply_filters( 'dashboard_primary_link', __( 'https://wordpress.org/news/' ) ), /** - * Filter the primary feed URL for the 'WordPress News' dashboard widget. + * Filters the primary feed URL for the 'WordPress News' dashboard widget. * * @since 2.3.0 * @@ -946,7 +1097,7 @@ function wp_dashboard_primary() { 'url' => apply_filters( 'dashboard_primary_feed', __( 'http://wordpress.org/news/feed/' ) ), /** - * Filter the primary link title for the 'WordPress News' dashboard widget. + * Filters the primary link title for the 'WordPress News' dashboard widget. * * @since 2.3.0 * @@ -961,7 +1112,7 @@ function wp_dashboard_primary() { 'planet' => array( /** - * Filter the secondary link URL for the 'WordPress News' dashboard widget. + * Filters the secondary link URL for the 'WordPress News' dashboard widget. * * @since 2.3.0 * @@ -970,7 +1121,7 @@ function wp_dashboard_primary() { 'link' => apply_filters( 'dashboard_secondary_link', __( 'https://planet.wordpress.org/' ) ), /** - * Filter the secondary feed URL for the 'WordPress News' dashboard widget. + * Filters the secondary feed URL for the 'WordPress News' dashboard widget. * * @since 2.3.0 * @@ -979,21 +1130,29 @@ function wp_dashboard_primary() { 'url' => apply_filters( 'dashboard_secondary_feed', __( 'https://planet.wordpress.org/feed/' ) ), /** - * Filter the secondary link title for the 'WordPress News' dashboard widget. + * Filters the secondary link title for the 'WordPress News' dashboard widget. * * @since 2.3.0 * * @param string $title Title attribute for the widget's secondary link. */ 'title' => apply_filters( 'dashboard_secondary_title', __( 'Other WordPress News' ) ), - 'items' => 3, + + /** + * Filters the number of secondary link items for the 'WordPress News' dashboard widget. + * + * @since 4.4.0 + * + * @param string $items How many items to show in the secondary feed. + */ + 'items' => apply_filters( 'dashboard_secondary_items', 3 ), 'show_summary' => 0, 'show_author' => 0, 'show_date' => 0, ) ); - if ( ( ! is_multisite() && is_blog_admin() && current_user_can( 'install_plugins' ) ) || ( is_network_admin() && current_user_can( 'manage_network_plugins' ) && current_user_can( 'install_plugins' ) ) ) { + if ( ( ! defined( 'DISALLOW_FILE_MODS' ) || ! DISALLOW_FILE_MODS ) && ( ! is_multisite() && is_blog_admin() && current_user_can( 'install_plugins' ) ) || ( is_network_admin() && current_user_can( 'manage_network_plugins' ) && current_user_can( 'install_plugins' ) ) ) { $feeds['plugins'] = array( 'link' => '', 'url' => array( @@ -1019,7 +1178,7 @@ function wp_dashboard_primary() { * @param array $feeds Array of RSS feeds. */ function wp_dashboard_primary_output( $widget_id, $feeds ) { - foreach( $feeds as $type => $args ) { + foreach ( $feeds as $type => $args ) { $args['type'] = $type; echo '
    '; if ( $type === 'plugins' ) { @@ -1035,6 +1194,9 @@ function wp_dashboard_primary_output( $widget_id, $feeds ) { * Display plugins text for the WordPress news widget. * * @since 2.5.0 + * + * @param string $rss The RSS feed URL. + * @param array $args Array of arguments for this RSS feed. */ function wp_dashboard_plugins_output( $rss, $args = array() ) { // Plugin feeds plus link to install them @@ -1092,10 +1254,13 @@ function wp_dashboard_plugins_output( $rss, $args = array() ) { if ( !isset($items[$item_key]) ) continue; - $title = esc_html( $item->get_title() ); + $raw_title = $item->get_title(); $ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) . '&TB_iframe=true&width=600&height=800'; - echo "
  • " . __( 'Popular Plugin' ) . ": $title (" . __( 'Install' ) . ")
  • "; + echo '
  • ' . __( 'Popular Plugin' ) . ': ' . esc_html( $raw_title ) . + ' (' . __( 'Install' ) . ')
  • '; $feed->__destruct(); unset( $feed ); @@ -1107,12 +1272,12 @@ function wp_dashboard_plugins_output( $rss, $args = array() ) { /** * Display file upload quota on dashboard. * - * Runs on the activity_box_end hook in wp_dashboard_right_now(). + * Runs on the {@see 'activity_box_end'} hook in wp_dashboard_right_now(). * * @since 3.0.0 * * @return bool|null True if not multisite, user can't upload files, or the space check option is disabled. -*/ + */ function wp_dashboard_quota() { if ( !is_multisite() || !current_user_can( 'upload_files' ) || get_site_option( 'upload_space_check_disabled' ) ) return true; @@ -1129,7 +1294,7 @@ function wp_dashboard_quota() { $percentused = number_format( $percentused ); ?> -

    +

    • @@ -1139,10 +1304,10 @@ function wp_dashboard_quota() { number_format_i18n( $quota ) ); printf( - '%3$s', + '%2$s (%3$s)', esc_url( admin_url( 'upload.php' ) ), - __( 'Manage Uploads' ), - $text + $text, + __( 'Manage Uploads' ) ); ?>
    • %3$s', + '%2$s (%3$s)', esc_url( admin_url( 'upload.php' ) ), - __( 'Manage Uploads' ), - $text + $text, + __( 'Manage Uploads' ) ); ?>
    %s. Using an outdated browser makes your computer unsafe. For the best WordPress experience, please update your browser." ), esc_attr( $response['update_url'] ), esc_html( $response['name'] ) ); + /* translators: %s: browser name and link */ + $msg = sprintf( __( "It looks like you're using an insecure version of %s. Using an outdated browser makes your computer unsafe. For the best WordPress experience, please update your browser." ), + sprintf( '%s', esc_url( $response['update_url'] ), esc_html( $response['name'] ) ) + ); } else { - $msg = sprintf( __( "It looks like you're using an old version of %s. For the best WordPress experience, please update your browser." ), esc_attr( $response['update_url'] ), esc_html( $response['name'] ) ); + /* translators: %s: browser name and link */ + $msg = sprintf( __( "It looks like you're using an old version of %s. For the best WordPress experience, please update your browser." ), + sprintf( '%s', esc_url( $response['update_url'] ), esc_html( $response['name'] ) ) + ); } $browser_nag_class = ''; @@ -1186,17 +1356,17 @@ function wp_dashboard_browser_nag() { $notice .= "

    {$msg}

    "; $browsehappy = 'http://browsehappy.com/'; - $locale = get_locale(); + $locale = get_user_locale(); if ( 'en_US' !== $locale ) $browsehappy = add_query_arg( 'locale', $locale, $browsehappy ); $notice .= '

    ' . sprintf( __( 'Update %2$s or learn how to browse happy' ), esc_attr( $response['update_url'] ), esc_html( $response['name'] ), esc_url( $browsehappy ) ) . '

    '; - $notice .= '

    ' . __( 'Dismiss' ) . '

    '; + $notice .= '

    ' . __( 'Dismiss' ) . '

    '; $notice .= '
    '; } /** - * Filter the notice output for the 'Browse Happy' nag meta box. + * Filters the notice output for the 'Browse Happy' nag meta box. * * @since 3.2.0 * @@ -1206,6 +1376,12 @@ function wp_dashboard_browser_nag() { echo apply_filters( 'browse-happy-notice', $notice, $response ); } +/** + * @since 3.2.0 + * + * @param array $classes + * @return array + */ function dashboard_browser_nag_class( $classes ) { $response = wp_check_browser_version(); @@ -1229,11 +1405,9 @@ function wp_check_browser_version() { $key = md5( $_SERVER['HTTP_USER_AGENT'] ); if ( false === ($response = get_site_transient('browser_' . $key) ) ) { - global $wp_version; - $options = array( 'body' => array( 'useragent' => $_SERVER['HTTP_USER_AGENT'] ), - 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url() + 'user-agent' => 'WordPress/' . get_bloginfo( 'version' ) . '; ' . home_url() ); $response = wp_remote_post( 'http://api.wordpress.org/core/browse-happy/1.1/', $options ); @@ -1244,8 +1418,8 @@ function wp_check_browser_version() { /** * Response should be an array with: * 'name' - string - A user friendly browser name - * 'version' - string - The most recent version of the browser - * 'current_version' - string - The version of the browser the user is using + * 'version' - string - The version of the browser the user is using + * 'current_version' - string - The most recent version of the browser * 'upgrade' - boolean - Whether the browser needs an upgrade * 'insecure' - boolean - Whether the browser is deemed insecure * 'upgrade_url' - string - The url to visit to upgrade @@ -1276,12 +1450,12 @@ function wp_dashboard_empty() {} function wp_welcome_panel() { ?>
    -

    +

    -

    +

    @@ -1290,7 +1464,7 @@ function wp_welcome_panel() {
    -

    +

    • ' . __( 'Edit your front page' ) . '', get_edit_post_link( get_option( 'page_on_front' ) ) ); ?>
    • @@ -1307,7 +1481,7 @@ function wp_welcome_panel() {
    -

    +

    • ' . __( 'Turn comments on or off' ) . '', admin_url( 'options-discussion.php' ) ); ?>
    • -
    • ' . __( 'Learn more about getting started' ) . '', __( 'http://codex.wordpress.org/First_Steps_With_WordPress' ) ); ?>
    • +
    • ' . __( 'Learn more about getting started' ) . '', __( 'https://codex.wordpress.org/First_Steps_With_WordPress' ) ); ?>