Changeset 28449
- Timestamp:
- 05/16/2014 03:37:53 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/default-widgets.php
r28440 r28449 1107 1107 */ 1108 1108 function wp_widget_rss_form( $args, $inputs = null ) { 1109 1110 1109 $default_inputs = array( 'url' => true, 'title' => true, 'items' => true, 'show_summary' => true, 'show_author' => true, 'show_date' => true ); 1111 1110 $inputs = wp_parse_args( $inputs, $default_inputs ); 1112 extract( $args ); 1113 extract( $inputs, EXTR_SKIP ); 1114 1115 $number = esc_attr( $number ); 1116 $title = esc_attr( $title ); 1117 $url = esc_url( $url ); 1118 $items = (int) $items; 1119 if ( $items < 1 || 20 < $items ) 1111 1112 $number = esc_attr( $args['number'] ); 1113 $title = isset( $args['title'] ) ? esc_attr( $args['title'] ) : ''; 1114 $url = isset( $args['url'] ) ? esc_url( $args['url'] ) : ''; 1115 $items = isset( $args['items'] ) ? (int) $args['items'] : 0; 1116 if ( $items < 1 || 20 < $items ) { 1120 1117 $items = 10; 1121 $show_summary = (int) $show_summary; 1122 $show_author = (int) $show_author; 1123 $show_date = (int) $show_date; 1124 1125 if ( !empty($error) ) 1126 echo '<p class="widget-error"><strong>' . sprintf( __('RSS Error: %s'), $error) . '</strong></p>'; 1118 } 1119 $show_summary = isset( $args['show_summary'] ) ? (int) $args['show_summary'] : (int) $inputs['show_summary']; 1120 $show_author = isset( $args['show_author'] ) ? (int) $args['show_author'] : (int) $inputs['show_author']; 1121 $show_date = isset( $args['show_date'] ) ? (int) $args['show_date'] : (int) $inputs['show_date']; 1122 1123 if ( ! empty( $args['error'] ) ) { 1124 echo '<p class="widget-error"><strong>' . sprintf( __( 'RSS Error: %s' ), $args['error'] ) . '</strong></p>'; 1125 } 1127 1126 1128 1127 if ( $inputs['url'] ) :
Note: See TracChangeset
for help on using the changeset viewer.