wp_widget_rss_form

函数


wp_widget_rss_form ( $args, $inputs = null )
参数
  • (array|string)
    $args
    Values for input fields.
    Required:
  • (array)
    $inputs
    Override default display options.
    Required:
    Default: null
定义位置
  • wp-includes/widgets.php
    , line 1680
引入
2.5.0
弃用

Display RSS widget options form.

The options for what fields are displayed for the RSS form are all booleans
and are as follows: ‘url’, ‘title’, ‘items’, ‘show_summary’, ‘show_author’,
‘show_date’.

function wp_widget_rss_form( $args, $inputs = null ) {
	$default_inputs = array(
		'url'          => true,
		'title'        => true,
		'items'        => true,
		'show_summary' => true,
		'show_author'  => true,
		'show_date'    => true,
	);
	$inputs         = wp_parse_args( $inputs, $default_inputs );

	$args['title'] = isset( $args['title'] ) ? $args['title'] : '';
	$args['url']   = isset( $args['url'] ) ? $args['url'] : '';
	$args['items'] = isset( $args['items'] ) ? (int) $args['items'] : 0;

	if ( $args['items'] ' . __( 'RSS Error:' ) . ' ' . esc_html( $args['error'] ) . '';
	}

	$esc_number = esc_attr( $args['number'] );
	if ( $inputs['url'] ) :
		?>
	

/>
/>
/>