芝麻web文件管理V1.00
编辑当前文件:/home4/randall/public_html/sl/wp-content/plugins/trx_socials/widgets/widgets.php
1 ? sprintf( '-%d', $widgets[$args['widget_id']] ) : ''; $args['widget_id'] = $id; } if ( ! empty( $args['before_widget'] ) ) { $args['before_widget'] = str_replace( array('%1$s', '%2$s'), array($id, $class), $args['before_widget'] ); } return $args; } } // Widget class //-------------------------------------------------------------------- if ( ! class_exists( 'TRX_Socials_Widget' ) ) { class TRX_Socials_Widget extends WP_Widget { function __construct( $class, $title, $params ) { parent::__construct($class, $title, $params); } // Show one field in the widget's form function show_field( $params = array() ) { $params = array_merge( array( 'type' => 'text', // Field's type 'name' => '', // Field's name 'title' => '', // Title 'description' => '', // Description 'class' => '', // Additional classes 'class_button' => '', // Additional classes for button in mediamanager 'multiple' => false, // Allow select multiple images 'rows' => 5, // Number of rows in textarea 'options' => array(), // Options for select, checklist, radio, switch 'params' => array(), // Additional params for icons, etc. 'label' => '', // Alternative label for checkbox 'value' => '' // Field's value ), $params ); ?>
>
0) { foreach ($params['options'] as $slug => $name) { echo '
' . esc_html($name) . '
'; } } ?>
0) { ?>
"> $name) { ?>
/>
>
/>
$name) { ?>
>
value="" />
' : '
' . esc_html( basename( $img ) ) . '
'; ?>
</textarea>