WordPress.org

Make WordPress Core

Changeset 25298


Ignore:
Timestamp:
09/07/2013 06:16:09 PM (8 years ago)
Author:
SergeyBiryukov
Message:

Avoid PHP notices when configuring the Incoming Links dashboard widget. fixes #25250.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/dashboard.php

    r25091 r25298  
    10961096        $_POST['widget-rss'][$number] = wp_unslash( $_POST['widget-rss'][$number] );
    10971097        $widget_options[$widget_id] = wp_widget_rss_process( $_POST['widget-rss'][$number] );
     1098        $widget_options[$widget_id]['number'] = $number;
    10981099        // title is optional. If black, fill it if possible
    10991100        if ( !$widget_options[$widget_id]['title'] && isset($_POST['widget-rss'][$number]['title']) ) {
  • trunk/src/wp-includes/default-widgets.php

    r25049 r25298  
    930930    $inputs = wp_parse_args( $inputs, $default_inputs );
    931931    extract( $args );
    932     extract( $inputs, EXTR_SKIP);
     932    extract( $inputs, EXTR_SKIP );
    933933
    934934    $number = esc_attr( $number );
     
    10011001    if ( $items < 1 || 20 < $items )
    10021002        $items = 10;
    1003     $url           = esc_url_raw(strip_tags( $widget_rss['url'] ));
    1004     $title         = trim(strip_tags( $widget_rss['title'] ));
    1005     $show_summary  = isset($widget_rss['show_summary']) ? (int) $widget_rss['show_summary'] : 0;
    1006     $show_author   = isset($widget_rss['show_author']) ? (int) $widget_rss['show_author'] :0;
    1007     $show_date     = isset($widget_rss['show_date']) ? (int) $widget_rss['show_date'] : 0;
     1003    $url           = esc_url_raw( strip_tags( $widget_rss['url'] ) );
     1004    $title         = isset( $widget_rss['title'] ) ? trim( strip_tags( $widget_rss['title'] ) ) : '';
     1005    $show_summary  = isset( $widget_rss['show_summary'] ) ? (int) $widget_rss['show_summary'] : 0;
     1006    $show_author   = isset( $widget_rss['show_author'] ) ? (int) $widget_rss['show_author'] :0;
     1007    $show_date     = isset( $widget_rss['show_date'] ) ? (int) $widget_rss['show_date'] : 0;
    10081008
    10091009    if ( $check_feed ) {
Note: See TracChangeset for help on using the changeset viewer.