- Timestamp:
- 09/25/2013 04:49:36 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyeleven/inc/widgets.php
r24131 r25625 1 1 <?php 2 2 /** 3 * Makes a custom Widget for displaying Aside, Link, Status, and Quote Posts available with Twenty Eleven3 * Widget For displaying post format posts 4 4 * 5 * Learn more: http://codex.wordpress.org/Widgets_API#Developing_Widgets 5 * Handles displaying Aside, Link, Status, and Quote Posts available with Twenty Eleven. 6 * 7 * @link http://codex.wordpress.org/Widgets_API#Developing_Widgets 6 8 * 7 9 * @package WordPress … … 13 15 /** 14 16 * Constructor 17 * 18 * @since Twenty Eleven 1.0 15 19 * 16 20 * @return void … … 29 33 * Outputs the HTML for this widget. 30 34 * 31 * @param array An array of standard parameters for widgets in this theme 32 * @param array An array of settings for this widget instance 33 * @return void Echoes its output 35 * @since Twenty Eleven 1.0 36 * 37 * @param array $args An array of standard parameters for widgets in this theme. 38 * @param array $instance An array of settings for this widget instance. 39 * @return void 34 40 **/ 35 41 function widget( $args, $instance ) { … … 50 56 extract( $args, EXTR_SKIP ); 51 57 58 //duplicate_hook 52 59 $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Ephemera', 'twentyeleven' ) : $instance['title'], $instance, $this->id_base); 53 60 … … 121 128 122 129 /** 130 * Update widget settings. 131 * 123 132 * Deals with the settings when they are saved by the admin. Here is 124 133 * where any validation should be dealt with. 134 * 135 * @since Twenty Eleven 1.0 125 136 **/ 126 137 function update( $new_instance, $old_instance ) { … … 137 148 } 138 149 150 /** 151 * Flush widget cache. 152 * 153 * @since Twenty Eleven 1.0 154 */ 139 155 function flush_widget_cache() { 140 156 wp_cache_delete( 'widget_twentyeleven_ephemera', 'widget' ); … … 142 158 143 159 /** 160 * Set up the widget form. 161 * 144 162 * Displays the form for this widget on the Widgets page of the WP Admin area. 163 * 164 * @since Twenty Eleven 1.0 145 165 **/ 146 166 function form( $instance ) {
Note: See TracChangeset
for help on using the changeset viewer.