/var/www/wordpress/wp-admin/includes/admin.php
/var/www/wordpress/wp-admin/includes/bookmark.php
/var/www/wordpress/wp-admin/includes/class-ftp-pure.php
/var/www/wordpress/wp-admin/includes/class-ftp-sockets.php
/var/www/wordpress/wp-admin/includes/class-ftp.php
/var/www/wordpress/wp-admin/includes/class-pclzip.php
/var/www/wordpress/wp-admin/includes/class-wp-filesystem-base.php
/var/www/wordpress/wp-admin/includes/class-wp-filesystem-direct.php
/var/www/wordpress/wp-admin/includes/class-wp-filesystem-ftpext.php
/var/www/wordpress/wp-admin/includes/class-wp-filesystem-ftpsockets.php
/var/www/wordpress/wp-admin/includes/class-wp-filesystem-ssh2.php
/var/www/wordpress/wp-admin/includes/class-wp-importer.php
/var/www/wordpress/wp-admin/includes/class-wp-upgrader.php
/var/www/wordpress/wp-admin/includes/comment.php
/var/www/wordpress/wp-admin/includes/continents-cities.php
/var/www/wordpress/wp-admin/includes/dashboard.php
/var/www/wordpress/wp-admin/includes/deprecated.php
/var/www/wordpress/wp-admin/includes/export.php
/var/www/wordpress/wp-admin/includes/file.php
/var/www/wordpress/wp-admin/includes/image-edit.php
/var/www/wordpress/wp-admin/includes/image.php
/var/www/wordpress/wp-admin/includes/import.php
/var/www/wordpress/wp-admin/includes/manifest.php
/var/www/wordpress/wp-admin/includes/media.php
/var/www/wordpress/wp-admin/includes/meta-boxes.php
/var/www/wordpress/wp-admin/includes/misc.php
/var/www/wordpress/wp-admin/includes/ms-deprecated.php
/var/www/wordpress/wp-admin/includes/ms.php
/var/www/wordpress/wp-admin/includes/nav-menu.php
/var/www/wordpress/wp-admin/includes/plugin-install.php
/var/www/wordpress/wp-admin/includes/plugin.php
/var/www/wordpress/wp-admin/includes/post.php
/var/www/wordpress/wp-admin/includes/schema.php
/var/www/wordpress/wp-admin/includes/taxonomy.php
/var/www/wordpress/wp-admin/includes/template.php
/var/www/wordpress/wp-admin/includes/theme-install.php
/var/www/wordpress/wp-admin/includes/theme.php
/var/www/wordpress/wp-admin/includes/update-core.php
/var/www/wordpress/wp-admin/includes/update.php
/var/www/wordpress/wp-admin/includes/upgrade.php
/var/www/wordpress/wp-admin/includes/user.php
/var/www/wordpress/wp-admin/includes/widgets.php
/var/www/wordpress/wp-admin/js/revisions-js.php
/var/www/wordpress/wp-admin/maint/repair.php
/var/www/wordpress/wp-admin/admin-ajax.php
/var/www/wordpress/wp-admin/admin-footer.php
/var/www/wordpress/wp-admin/admin-functions.php
/var/www/wordpress/wp-admin/admin-header.php
/var/www/wordpress/wp-admin/admin-post.php
/var/www/wordpress/wp-admin/admin.php
/var/www/wordpress/wp-admin/async-upload.php
/var/www/wordpress/wp-admin/comment.php
/var/www/wordpress/wp-admin/custom-background.php
/var/www/wordpress/wp-admin/custom-header.php
/var/www/wordpress/wp-admin/edit-attachment-rows.php
/var/www/wordpress/wp-admin/edit-comments.php
/var/www/wordpress/wp-admin/edit-form-advanced.php
/var/www/wordpress/wp-admin/edit-form-comment.php
/var/www/wordpress/wp-admin/edit-link-categories.php
/var/www/wordpress/wp-admin/edit-link-category-form.php
/var/www/wordpress/wp-admin/edit-link-form.php
/var/www/wordpress/wp-admin/edit-post-rows.php
/var/www/wordpress/wp-admin/edit-tag-form.php
/var/www/wordpress/wp-admin/edit-tags.php
/var/www/wordpress/wp-admin/edit.php
/var/www/wordpress/wp-admin/export.php
/var/www/wordpress/wp-admin/gears-manifest.php
/var/www/wordpress/wp-admin/import.php
/var/www/wordpress/wp-admin/index-extra.php
/var/www/wordpress/wp-admin/index.php
/var/www/wordpress/wp-admin/install-helper.php
/var/www/wordpress/wp-admin/install.php
/var/www/wordpress/wp-admin/link-add.php
/var/www/wordpress/wp-admin/link-category.php
/var/www/wordpress/wp-admin/link-manager.php
/var/www/wordpress/wp-admin/link-parse-opml.php
/var/www/wordpress/wp-admin/link.php
/var/www/wordpress/wp-admin/load-scripts.php
/var/www/wordpress/wp-admin/load-styles.php
/var/www/wordpress/wp-admin/media-new.php
/var/www/wordpress/wp-admin/media-upload.php
/var/www/wordpress/wp-admin/media.php
/var/www/wordpress/wp-admin/menu-header.php
/var/www/wordpress/wp-admin/menu.php
/var/www/wordpress/wp-admin/moderation.php
/var/www/wordpress/wp-admin/ms-admin.php
/var/www/wordpress/wp-admin/ms-delete-site.php
/var/www/wordpress/wp-admin/ms-edit.php
/var/www/wordpress/wp-admin/ms-options.php
/var/www/wordpress/wp-admin/ms-sites.php
/var/www/wordpress/wp-admin/ms-themes.php
/var/www/wordpress/wp-admin/ms-upgrade-network.php
/var/www/wordpress/wp-admin/ms-users.php
/var/www/wordpress/wp-admin/my-sites.php
/var/www/wordpress/wp-admin/nav-menus.php
/var/www/wordpress/wp-admin/network.php
/var/www/wordpress/wp-admin/options-discussion.php
/var/www/wordpress/wp-admin/options-general.php
/var/www/wordpress/wp-admin/options-head.php
/var/www/wordpress/wp-admin/options-media.php
/var/www/wordpress/wp-admin/options-permalink.php
/var/www/wordpress/wp-admin/options-privacy.php
/var/www/wordpress/wp-admin/options-reading.php
/var/www/wordpress/wp-admin/options-writing.php
/var/www/wordpress/wp-admin/options.php
/var/www/wordpress/wp-admin/plugin-editor.php
/var/www/wordpress/wp-admin/plugin-install.php
/var/www/wordpress/wp-admin/plugins.php
/var/www/wordpress/wp-admin/post-new.php
/var/www/wordpress/wp-admin/post.php
/var/www/wordpress/wp-admin/press-this.php
/var/www/wordpress/wp-admin/profile.php
/var/www/wordpress/wp-admin/revision.php
/var/www/wordpress/wp-admin/setup-config.php
/var/www/wordpress/wp-admin/sidebar.php
/var/www/wordpress/wp-admin/theme-editor.php
/var/www/wordpress/wp-admin/theme-install.php
/var/www/wordpress/wp-admin/themes.php
/var/www/wordpress/wp-admin/tools.php
/var/www/wordpress/wp-admin/update-core.php
/var/www/wordpress/wp-admin/update.php
/var/www/wordpress/wp-admin/upgrade-functions.php
/var/www/wordpress/wp-admin/upgrade.php
/var/www/wordpress/wp-admin/upload.php
/var/www/wordpress/wp-admin/user-edit.php
/var/www/wordpress/wp-admin/user-new.php
/var/www/wordpress/wp-admin/users.php
/var/www/wordpress/wp-admin/widgets.php
/var/www/wordpress/wp-content/languages/ru_RU.php
/var/www/wordpress/wp-content/plugins/akismet/akismet.php
/var/www/wordpress/wp-content/plugins/rh/rh.php
/var/www/wordpress/wp-content/plugins/hello.php
/var/www/wordpress/wp-content/plugins/index.php
/var/www/wordpress/wp-content/themes/twentyten/404.php
/var/www/wordpress/wp-content/themes/twentyten/archive.php
/var/www/wordpress/wp-content/themes/twentyten/attachment.php
/var/www/wordpress/wp-content/themes/twentyten/author.php
/var/www/wordpress/wp-content/themes/twentyten/category.php
/var/www/wordpress/wp-content/themes/twentyten/comments.php
/var/www/wordpress/wp-content/themes/twentyten/footer.php
/var/www/wordpress/wp-content/themes/twentyten/functions.php
#CodeDescriptions
1<?php
2/**
3 * TwentyTen functions and definitions
4 *
5 * Sets up the theme and provides some helper functions. Some helper functions
6 * are used in the theme as custom template tags. Others are attached to action and
7 * filter hooks in WordPress to change core functionality.
8 *
9 * The first function, twentyten_setup(), sets up the theme by registering support
10 * for various features in WordPress, such as post thumbnails, navigation menus, and the like.
11 *
12 * When using a child theme (see http://codex.wordpress.org/Theme_Development and
13 * http://codex.wordpress.org/Child_Themes), you can override certain functions
14 * (those wrapped in a function_exists() call) by defining them first in your child theme's
15 * functions.php file. The child theme's functions.php file is included before the parent
16 * theme's file, so the child theme functions would be used.
17 *
18 * Functions that are not pluggable (not wrapped in function_exists()) are instead attached
19 * to a filter or action hook. The hook can be removed by using remove_action() or
20 * remove_filter() and you can attach your own function to the hook.
21 *
22 * We can remove the parent theme's hook only after it is attached, which means we need to
23 * wait until setting up the child theme:
24 *
25 * <code>
26 * add_action( 'after_setup_theme', 'my_child_theme_setup' );
27 * function my_child_theme_setup() {
28 * // We are providing our own filter for excerpt_length (or using the unfiltered value)
29 * remove_filter( 'excerpt_length', 'twentyten_excerpt_length' );
30 * ...
31 * }
32 * </code>
33 *
34 * For more information on hooks, actions, and filters, see http://codex.wordpress.org/Plugin_API.
35 *
36 * @package WordPress
37 * @subpackage Twenty_Ten
38 * @since Twenty Ten 1.0
39 */
40
41/**
42 * Set the content width based on the theme's design and stylesheet.
43 *
44 * Used to set the width of images and content. Should be equal to the width the theme
45 * is designed for, generally via the style.css stylesheet.
46 */
47if ( ! isset( $content_width ) )
48 $content_width = 640;
49
50/** Tell WordPress to run twentyten_setup() when the 'after_setup_theme' hook is run. */
51add_action( 'after_setup_theme', 'twentyten_setup' );
52
53if ( ! function_exists( 'twentyten_setup' ) ):
54/**
55 * Sets up theme defaults and registers support for various WordPress features.
56 *
57 * Note that this function is hooked into the after_setup_theme hook, which runs
58 * before the init hook. The init hook is too late for some features, such as indicating
59 * support post thumbnails.
60 *
61 * To override twentyten_setup() in a child theme, add your own twentyten_setup to your child theme's
62 * functions.php file.
63 *
64 * @uses add_theme_support() To add support for post thumbnails and automatic feed links.
65 * @uses register_nav_menus() To add support for navigation menus.
66 * @uses add_custom_background() To add support for a custom background.
67 * @uses add_editor_style() To style the visual editor.
68 * @uses load_theme_textdomain() For translation/localization support.
69 * @uses add_custom_image_header() To add support for a custom header.
70 * @uses register_default_headers() To register the default custom header images provided with the theme.
71 * @uses set_post_thumbnail_size() To set a custom post thumbnail size.
72 *
73 * @since Twenty Ten 1.0
74 */
75function twentyten_setup() {
76
77 // This theme styles the visual editor with editor-style.css to match the theme style.
78 add_editor_style();
79
80 // This theme uses post thumbnails
81 add_theme_support( 'post-thumbnails' );
82
83 // Add default posts and comments RSS feed links to head
84 add_theme_support( 'automatic-feed-links' );
85
86 // Make theme available for translation
87 // Translations can be filed in the /languages/ directory
88 load_theme_textdomain( 'twentyten', TEMPLATEPATH . '/languages' );
89
90 $locale = get_locale();
91 $locale_file = TEMPLATEPATH . "/languages/$locale.php";
92 if ( is_readable( $locale_file ) )
93 require_once( $locale_file );//Arbitrary code inclusion
94
95 // This theme uses wp_nav_menu() in one location.
96 register_nav_menus( array(
97 'primary' => __( 'Primary Navigation', 'twentyten' ),
98 ) );
99
100 // This theme allows users to set a custom background
101 add_custom_background();
102
103 // Your changeable header business starts here
104 define( 'HEADER_TEXTCOLOR', '' );
105 // No CSS, just IMG call. The %s is a placeholder for the theme template directory URI.
106 define( 'HEADER_IMAGE', '%s/images/headers/path.jpg' );
107
108 // The height and width of your custom header. You can hook into the theme's own filters to change these values.
109 // Add a filter to twentyten_header_image_width and twentyten_header_image_height to change these values.
110 define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width', 940 ) );
111 define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height', 198 ) );
112
113 // We'll be using post thumbnails for custom header images on posts and pages.
114 // We want them to be 940 pixels wide by 198 pixels tall.
115 // Larger images will be auto-cropped to fit, smaller ones will be ignored. See header.php.
116 set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true );
117
118 // Don't support text inside the header image.
119 define( 'NO_HEADER_TEXT', true );
120
121 // Add a way for the custom header to be styled in the admin panel that controls
122 // custom headers. See twentyten_admin_header_style(), below.
123 add_custom_image_header( '', 'twentyten_admin_header_style' );
124
125 // ... and thus ends the changeable header business.
126
127 // Default custom headers packaged with the theme. %s is a placeholder for the theme template directory URI.
128 register_default_headers( array(
129 'berries' => array(
130 'url' => '%s/images/headers/berries.jpg',
131 'thumbnail_url' => '%s/images/headers/berries-thumbnail.jpg',
132 /* translators: header image description */
133 'description' => __( 'Berries', 'twentyten' )
134 ),
135 'cherryblossom' => array(
136 'url' => '%s/images/headers/cherryblossoms.jpg',
137 'thumbnail_url' => '%s/images/headers/cherryblossoms-thumbnail.jpg',
138 /* translators: header image description */
139 'description' => __( 'Cherry Blossoms', 'twentyten' )
140 ),
141 'concave' => array(
142 'url' => '%s/images/headers/concave.jpg',
143 'thumbnail_url' => '%s/images/headers/concave-thumbnail.jpg',
144 /* translators: header image description */
145 'description' => __( 'Concave', 'twentyten' )
146 ),
147 'fern' => array(
148 'url' => '%s/images/headers/fern.jpg',
149 'thumbnail_url' => '%s/images/headers/fern-thumbnail.jpg',
150 /* translators: header image description */
151 'description' => __( 'Fern', 'twentyten' )
152 ),
153 'forestfloor' => array(
154 'url' => '%s/images/headers/forestfloor.jpg',
155 'thumbnail_url' => '%s/images/headers/forestfloor-thumbnail.jpg',
156 /* translators: header image description */
157 'description' => __( 'Forest Floor', 'twentyten' )
158 ),
159 'inkwell' => array(
160 'url' => '%s/images/headers/inkwell.jpg',
161 'thumbnail_url' => '%s/images/headers/inkwell-thumbnail.jpg',
162 /* translators: header image description */
163 'description' => __( 'Inkwell', 'twentyten' )
164 ),
165 'path' => array(
166 'url' => '%s/images/headers/path.jpg',
167 'thumbnail_url' => '%s/images/headers/path-thumbnail.jpg',
168 /* translators: header image description */
169 'description' => __( 'Path', 'twentyten' )
170 ),
171 'sunset' => array(
172 'url' => '%s/images/headers/sunset.jpg',
173 'thumbnail_url' => '%s/images/headers/sunset-thumbnail.jpg',
174 /* translators: header image description */
175 'description' => __( 'Sunset', 'twentyten' )
176 )
177 ) );
178}
179endif;
180
181if ( ! function_exists( 'twentyten_admin_header_style' ) ) :
182/**
183 * Styles the header image displayed on the Appearance > Header admin panel.
184 *
185 * Referenced via add_custom_image_header() in twentyten_setup().
186 *
187 * @since Twenty Ten 1.0
188 */
189function twentyten_admin_header_style() {
190?>
191<style type="text/css">
192/* Shows the same border as on front end */
193#headimg {
194 border-bottom: 1px solid #000;
195 border-top: 4px solid #000;
196}
197/* If NO_HEADER_TEXT is false, you would style the text with these selectors:
198 #headimg #name { }
199 #headimg #desc { }
200*/
201</style>
202<?php
203}
204endif;
205
206/**
207 * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link.
208 *
209 * To override this in a child theme, remove the filter and optionally add
210 * your own function tied to the wp_page_menu_args filter hook.
211 *
212 * @since Twenty Ten 1.0
213 */
214function twentyten_page_menu_args( $args ) {
215 $args['show_home'] = true;
216 return $args;
217}
218add_filter( 'wp_page_menu_args', 'twentyten_page_menu_args' );
219
220/**
221 * Sets the post excerpt length to 40 characters.
222 *
223 * To override this length in a child theme, remove the filter and add your own
224 * function tied to the excerpt_length filter hook.
225 *
226 * @since Twenty Ten 1.0
227 * @return int
228 */
229function twentyten_excerpt_length( $length ) {
230 return 40;
231}
232add_filter( 'excerpt_length', 'twentyten_excerpt_length' );
233
234/**
235 * Returns a "Continue Reading" link for excerpts
236 *
237 * @since Twenty Ten 1.0
238 * @return string "Continue Reading" link
239 */
240function twentyten_continue_reading_link() {
241 return ' <a href="'. get_permalink() . '">' . __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) . '</a>';
242}
243
244/**
245 * Replaces "[...]" (appended to automatically generated excerpts) with an ellipsis and twentyten_continue_reading_link().
246 *
247 * To override this in a child theme, remove the filter and add your own
248 * function tied to the excerpt_more filter hook.
249 *
250 * @since Twenty Ten 1.0
251 * @return string An ellipsis
252 */
253function twentyten_auto_excerpt_more( $more ) {
254 return ' …' . twentyten_continue_reading_link();
255}
256add_filter( 'excerpt_more', 'twentyten_auto_excerpt_more' );
257
258/**
259 * Adds a pretty "Continue Reading" link to custom post excerpts.
260 *
261 * To override this link in a child theme, remove the filter and add your own
262 * function tied to the get_the_excerpt filter hook.
263 *
264 * @since Twenty Ten 1.0
265 * @return string Excerpt with a pretty "Continue Reading" link
266 */
267function twentyten_custom_excerpt_more( $output ) {
268 if ( has_excerpt() && ! is_attachment() ) {
269 $output .= twentyten_continue_reading_link();
270 }
271 return $output;
272}
273add_filter( 'get_the_excerpt', 'twentyten_custom_excerpt_more' );
274
275/**
276 * Remove inline styles printed when the gallery shortcode is used.
277 *
278 * Galleries are styled by the theme in Twenty Ten's style.css.
279 *
280 * @since Twenty Ten 1.0
281 * @return string The gallery style filter, with the styles themselves removed.
282 */
283function twentyten_remove_gallery_css( $css ) {
284 return preg_replace( "#<style type='text/css'>(.*?)</style>#s", '', $css );
285}
286add_filter( 'gallery_style', 'twentyten_remove_gallery_css' );
287
288if ( ! function_exists( 'twentyten_comment' ) ) :
289/**
290 * Template for comments and pingbacks.
291 *
292 * To override this walker in a child theme without modifying the comments template
293 * simply create your own twentyten_comment(), and that function will be used instead.
294 *
295 * Used as a callback by wp_list_comments() for displaying the comments.
296 *
297 * @since Twenty Ten 1.0
298 */
299function twentyten_comment( $comment, $args, $depth ) {
300 $GLOBALS['comment'] = $comment;
301 switch ( $comment->comment_type ) :
302 case '' :
303 ?>
304 <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
305 <div id="comment-<?php comment_ID(); ?>">
306 <div class="comment-author vcard">
307 <?php echo get_avatar( $comment, 40 ); ?>
308 <?php printf( __( '%s <span class="says">says:</span>', 'twentyten' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?>
309 </div><!-- .comment-author .vcard -->
310 <?php if ( $comment->comment_approved == '0' ) : ?>
311 <em><?php _e( 'Your comment is awaiting moderation.', 'twentyten' ); ?></em>
312 <br />
313 <?php endif; ?>
314
315 <div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
316 <?php
317 /* translators: 1: date, 2: time */
318 printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' );
319 ?>
320 </div><!-- .comment-meta .commentmetadata -->
321
322 <div class="comment-body"><?php comment_text(); ?></div>
323
324 <div class="reply">
325 <?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
326 </div><!-- .reply -->
327 </div><!-- #comment-## -->
328
329 <?php
330 break;
331 case 'pingback' :
332 case 'trackback' :
333 ?>
334 <li class="post pingback">
335 <p><?php _e( 'Pingback:', 'twentyten' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __('(Edit)', 'twentyten'), ' ' ); ?></p>
336 <?php
337 break;
338 endswitch;
339}
340endif;
341
342/**
343 * Register widgetized areas, including two sidebars and four widget-ready columns in the footer.
344 *
345 * To override twentyten_widgets_init() in a child theme, remove the action hook and add your own
346 * function tied to the init hook.
347 *
348 * @since Twenty Ten 1.0
349 * @uses register_sidebar
350 */
351function twentyten_widgets_init() {
352 // Area 1, located at the top of the sidebar.
353 register_sidebar( array(
354 'name' => __( 'Primary Widget Area', 'twentyten' ),
355 'id' => 'primary-widget-area',
356 'description' => __( 'The primary widget area', 'twentyten' ),
357 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
358 'after_widget' => '</li>',
359 'before_title' => '<h3 class="widget-title">',
360 'after_title' => '</h3>',
361 ) );
362
363 // Area 2, located below the Primary Widget Area in the sidebar. Empty by default.
364 register_sidebar( array(
365 'name' => __( 'Secondary Widget Area', 'twentyten' ),
366 'id' => 'secondary-widget-area',
367 'description' => __( 'The secondary widget area', 'twentyten' ),
368 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
369 'after_widget' => '</li>',
370 'before_title' => '<h3 class="widget-title">',
371 'after_title' => '</h3>',
372 ) );
373
374 // Area 3, located in the footer. Empty by default.
375 register_sidebar( array(
376 'name' => __( 'First Footer Widget Area', 'twentyten' ),
377 'id' => 'first-footer-widget-area',
378 'description' => __( 'The first footer widget area', 'twentyten' ),
379 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
380 'after_widget' => '</li>',
381 'before_title' => '<h3 class="widget-title">',
382 'after_title' => '</h3>',
383 ) );
384
385 // Area 4, located in the footer. Empty by default.
386 register_sidebar( array(
387 'name' => __( 'Second Footer Widget Area', 'twentyten' ),
388 'id' => 'second-footer-widget-area',
389 'description' => __( 'The second footer widget area', 'twentyten' ),
390 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
391 'after_widget' => '</li>',
392 'before_title' => '<h3 class="widget-title">',
393 'after_title' => '</h3>',
394 ) );
395
396 // Area 5, located in the footer. Empty by default.
397 register_sidebar( array(
398 'name' => __( 'Third Footer Widget Area', 'twentyten' ),
399 'id' => 'third-footer-widget-area',
400 'description' => __( 'The third footer widget area', 'twentyten' ),
401 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
402 'after_widget' => '</li>',
403 'before_title' => '<h3 class="widget-title">',
404 'after_title' => '</h3>',
405 ) );
406
407 // Area 6, located in the footer. Empty by default.
408 register_sidebar( array(
409 'name' => __( 'Fourth Footer Widget Area', 'twentyten' ),
410 'id' => 'fourth-footer-widget-area',
411 'description' => __( 'The fourth footer widget area', 'twentyten' ),
412 'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
413 'after_widget' => '</li>',
414 'before_title' => '<h3 class="widget-title">',
415 'after_title' => '</h3>',
416 ) );
417}
418/** Register sidebars by running twentyten_widgets_init() on the widgets_init hook. */
419add_action( 'widgets_init', 'twentyten_widgets_init' );
420
421/**
422 * Removes the default styles that are packaged with the Recent Comments widget.
423 *
424 * To override this in a child theme, remove the filter and optionally add your own
425 * function tied to the widgets_init action hook.
426 *
427 * @since Twenty Ten 1.0
428 */
429function twentyten_remove_recent_comments_style() {
430 global $wp_widget_factory;
431 remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );
432}
433add_action( 'widgets_init', 'twentyten_remove_recent_comments_style' );
434
435if ( ! function_exists( 'twentyten_posted_on' ) ) :
436/**
437 * Prints HTML with meta information for the current post—date/time and author.
438 *
439 * @since Twenty Ten 1.0
440 */
441function twentyten_posted_on() {
442 printf( __( '<span class="%1$s">Posted on</span> %2$s <span class="meta-sep">by</span> %3$s', 'twentyten' ),
443 'meta-prep meta-prep-author',
444 sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>',
445 get_permalink(),
446 esc_attr( get_the_time() ),
447 get_the_date()
448 ),
449 sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',
450 get_author_posts_url( get_the_author_meta( 'ID' ) ),
451 sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
452 get_the_author()
453 )
454 );
455}
456endif;
457
458if ( ! function_exists( 'twentyten_posted_in' ) ) :
459/**
460 * Prints HTML with meta information for the current post (category, tags and permalink).
461 *
462 * @since Twenty Ten 1.0
463 */
464function twentyten_posted_in() {
465 // Retrieves tag list of current post, separated by commas.
466 $tag_list = get_the_tag_list( '', ', ' );
467 if ( $tag_list ) {
468 $posted_in = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' );
469 } elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) {
470 $posted_in = __( 'This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' );
471 } else {
472 $posted_in = __( 'Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.', 'twentyten' );
473 }
474 // Prints the string, replacing the placeholders.
475 printf(
476 $posted_in,
477 get_the_category_list( ', ' ),
478 $tag_list,
479 get_permalink(),
480 the_title_attribute( 'echo=0' )
481 );
482}
483endif;
484
/var/www/wordpress/wp-content/themes/twentyten/header.php
/var/www/wordpress/wp-content/themes/twentyten/index.php
/var/www/wordpress/wp-content/themes/twentyten/loop.php
/var/www/wordpress/wp-content/themes/twentyten/onecolumn-page.php
/var/www/wordpress/wp-content/themes/twentyten/page.php
/var/www/wordpress/wp-content/themes/twentyten/search.php
/var/www/wordpress/wp-content/themes/twentyten/sidebar-footer.php
/var/www/wordpress/wp-content/themes/twentyten/sidebar.php
/var/www/wordpress/wp-content/themes/twentyten/single.php
/var/www/wordpress/wp-content/themes/twentyten/tag.php
/var/www/wordpress/wp-content/themes/index.php
/var/www/wordpress/wp-content/index.php
/var/www/wordpress/wp-includes/js/tinymce/langs/wp-langs.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/JSON.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/Logger.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/EnchantSpell.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpell.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpellShell.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/classes/SpellChecker.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/includes/general.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/config.php
/var/www/wordpress/wp-includes/js/tinymce/plugins/spellchecker/rpc.php
/var/www/wordpress/wp-includes/js/tinymce/wp-mce-help.php
/var/www/wordpress/wp-includes/js/tinymce/wp-tinymce.php
/var/www/wordpress/wp-includes/pomo/entry.php
/var/www/wordpress/wp-includes/pomo/mo.php
/var/www/wordpress/wp-includes/pomo/po.php
/var/www/wordpress/wp-includes/pomo/streams.php
/var/www/wordpress/wp-includes/pomo/translations.php
/var/www/wordpress/wp-includes/Text/Diff/Engine/native.php
/var/www/wordpress/wp-includes/Text/Diff/Engine/shell.php
/var/www/wordpress/wp-includes/Text/Diff/Engine/string.php
/var/www/wordpress/wp-includes/Text/Diff/Engine/xdiff.php
/var/www/wordpress/wp-includes/Text/Diff/Renderer/inline.php
/var/www/wordpress/wp-includes/Text/Diff/Renderer.php
/var/www/wordpress/wp-includes/Text/Diff.php
/var/www/wordpress/wp-includes/theme-compat/comments-popup.php
/var/www/wordpress/wp-includes/theme-compat/comments.php
/var/www/wordpress/wp-includes/theme-compat/footer.php
/var/www/wordpress/wp-includes/theme-compat/header.php
/var/www/wordpress/wp-includes/theme-compat/sidebar.php
/var/www/wordpress/wp-includes/atomlib.php
/var/www/wordpress/wp-includes/author-template.php
/var/www/wordpress/wp-includes/bookmark-template.php
/var/www/wordpress/wp-includes/bookmark.php
/var/www/wordpress/wp-includes/cache.php
/var/www/wordpress/wp-includes/canonical.php
/var/www/wordpress/wp-includes/capabilities.php
/var/www/wordpress/wp-includes/category-template.php
/var/www/wordpress/wp-includes/category.php
/var/www/wordpress/wp-includes/class-feed.php
/var/www/wordpress/wp-includes/class-http.php
/var/www/wordpress/wp-includes/class-IXR.php
/var/www/wordpress/wp-includes/class-json.php
/var/www/wordpress/wp-includes/class-oembed.php
/var/www/wordpress/wp-includes/class-phpass.php
/var/www/wordpress/wp-includes/class-phpmailer.php
/var/www/wordpress/wp-includes/class-pop3.php
/var/www/wordpress/wp-includes/class-simplepie.php
/var/www/wordpress/wp-includes/class-smtp.php
/var/www/wordpress/wp-includes/class-snoopy.php
/var/www/wordpress/wp-includes/class.wp-dependencies.php
/var/www/wordpress/wp-includes/class.wp-scripts.php
/var/www/wordpress/wp-includes/class.wp-styles.php
/var/www/wordpress/wp-includes/classes.php
/var/www/wordpress/wp-includes/comment-template.php
/var/www/wordpress/wp-includes/comment.php
/var/www/wordpress/wp-includes/compat.php
/var/www/wordpress/wp-includes/cron.php
/var/www/wordpress/wp-includes/default-constants.php
/var/www/wordpress/wp-includes/default-embeds.php
/var/www/wordpress/wp-includes/default-filters.php
/var/www/wordpress/wp-includes/default-widgets.php
/var/www/wordpress/wp-includes/deprecated.php
/var/www/wordpress/wp-includes/feed-atom-comments.php
/var/www/wordpress/wp-includes/feed-atom.php
/var/www/wordpress/wp-includes/feed-rdf.php
/var/www/wordpress/wp-includes/feed-rss.php
/var/www/wordpress/wp-includes/feed-rss2-comments.php
/var/www/wordpress/wp-includes/feed-rss2.php
/var/www/wordpress/wp-includes/feed.php
/var/www/wordpress/wp-includes/formatting.php
/var/www/wordpress/wp-includes/functions.php
/var/www/wordpress/wp-includes/functions.wp-scripts.php
/var/www/wordpress/wp-includes/functions.wp-styles.php
/var/www/wordpress/wp-includes/general-template.php
/var/www/wordpress/wp-includes/http.php
/var/www/wordpress/wp-includes/kses.php
/var/www/wordpress/wp-includes/l10n.php
/var/www/wordpress/wp-includes/link-template.php
/var/www/wordpress/wp-includes/load.php
/var/www/wordpress/wp-includes/locale.php
/var/www/wordpress/wp-includes/media.php
/var/www/wordpress/wp-includes/meta.php
/var/www/wordpress/wp-includes/ms-blogs.php
/var/www/wordpress/wp-includes/ms-default-constants.php
/var/www/wordpress/wp-includes/ms-default-filters.php
/var/www/wordpress/wp-includes/ms-deprecated.php
/var/www/wordpress/wp-includes/ms-files.php
/var/www/wordpress/wp-includes/ms-functions.php
/var/www/wordpress/wp-includes/ms-load.php
/var/www/wordpress/wp-includes/ms-settings.php
/var/www/wordpress/wp-includes/nav-menu-template.php
/var/www/wordpress/wp-includes/nav-menu.php
/var/www/wordpress/wp-includes/pluggable-deprecated.php
/var/www/wordpress/wp-includes/pluggable.php
/var/www/wordpress/wp-includes/plugin.php
/var/www/wordpress/wp-includes/post-template.php
/var/www/wordpress/wp-includes/post-thumbnail-template.php
/var/www/wordpress/wp-includes/post.php
/var/www/wordpress/wp-includes/query.php
/var/www/wordpress/wp-includes/registration-functions.php
/var/www/wordpress/wp-includes/registration.php
/var/www/wordpress/wp-includes/rewrite.php
/var/www/wordpress/wp-includes/rss-functions.php
/var/www/wordpress/wp-includes/rss.php
/var/www/wordpress/wp-includes/script-loader.php
/var/www/wordpress/wp-includes/shortcodes.php
/var/www/wordpress/wp-includes/taxonomy.php
/var/www/wordpress/wp-includes/template-loader.php
/var/www/wordpress/wp-includes/theme.php
/var/www/wordpress/wp-includes/update.php
/var/www/wordpress/wp-includes/user.php
/var/www/wordpress/wp-includes/vars.php
/var/www/wordpress/wp-includes/version.php
/var/www/wordpress/wp-includes/widgets.php
/var/www/wordpress/wp-includes/wp-db.php
/var/www/wordpress/wp-includes/wp-diff.php
/var/www/wordpress/index.php
/var/www/wordpress/wp-activate.php
/var/www/wordpress/wp-app.php
/var/www/wordpress/wp-atom.php
/var/www/wordpress/wp-blog-header.php
/var/www/wordpress/wp-comments-post.php
/var/www/wordpress/wp-commentsrss2.php
/var/www/wordpress/wp-config-sample.php
/var/www/wordpress/wp-cron.php
/var/www/wordpress/wp-feed.php
/var/www/wordpress/wp-links-opml.php
/var/www/wordpress/wp-load.php
/var/www/wordpress/wp-login.php
/var/www/wordpress/wp-mail.php
/var/www/wordpress/wp-pass.php
/var/www/wordpress/wp-rdf.php
/var/www/wordpress/wp-register.php
/var/www/wordpress/wp-rss.php
/var/www/wordpress/wp-rss2.php
/var/www/wordpress/wp-settings.php
/var/www/wordpress/wp-signup.php
/var/www/wordpress/wp-trackback.php
/var/www/wordpress/xmlrpc.php