Ticket #7661: 7661.r8933.diff
File 7661.r8933.diff, 3.8 KB (added by , 16 years ago) |
---|
-
widgets.php
575 575 echo '</div>'; 576 576 echo $after_widget; 577 577 } 578 578 579 function wp_widget_calendar_control() { 579 580 $options = $newoptions = get_option('widget_calendar'); 580 581 if ( $_POST["calendar-submit"] ) { … … 931 932 wp_cache_add('widget_recent_entries', ob_get_flush(), 'widget'); 932 933 } 933 934 935 /** 936 * Remove recent entries widget items cache. 937 * 938 * @since unknown 939 */ 934 940 function wp_flush_widget_recent_entries() { 935 941 wp_cache_delete('widget_recent_entries', 'widget'); 936 942 } … … 993 999 <?php 994 1000 } 995 1001 1002 /** 1003 * Remove the cache for recent comments widget. 1004 * 1005 * @since unknown 1006 */ 996 1007 function wp_delete_recent_comments_cache() { 997 1008 wp_cache_delete( 'recent_comments', 'widget' ); 998 1009 } … … 1024 1035 <?php 1025 1036 } 1026 1037 1038 /** 1039 * Display the style for recent comments widget. 1040 * 1041 * @since unknown 1042 */ 1027 1043 function wp_widget_recent_comments_style() { 1028 1044 ?> 1029 1045 <style type="text/css">.recentcomments a{display:inline !important;padding: 0 !important;margin: 0 !important;}</style> … … 1237 1253 wp_widget_rss_form( compact( 'number', 'title', 'url', 'items', 'error', 'show_summary', 'show_author', 'show_date' ) ); 1238 1254 } 1239 1255 1256 /** 1257 * Display RSS widget options form. 1258 * 1259 * The options for what fields are displayed for the RSS form are all booleans 1260 * and are as follows: 'url', 'title', 'items', 'show_summary', 'show_author', 1261 * 'show_date'. 1262 * 1263 * @since unknown 1264 * 1265 * @param array|string $args Values for input fields. 1266 * @param array $inputs Override default display options. 1267 */ 1240 1268 function wp_widget_rss_form( $args, $inputs = null ) { 1241 1269 $default_inputs = array( 'url' => true, 'title' => true, 'items' => true, 'show_summary' => true, 'show_author' => true, 'show_date' => true ); 1242 1270 $inputs = wp_parse_args( $inputs, $default_inputs ); … … 1309 1337 endforeach; 1310 1338 } 1311 1339 1312 // Expects unescaped data 1340 /** 1341 * Process RSS feed widget data and optionally retrieve feed items. 1342 * 1343 * The feed widget can not have more than 20 items or it will reset back to the 1344 * default, which is 10. 1345 * 1346 * The resulting array has the feed title, feed url, feed link (from channel), 1347 * feed items, error (if any), and whether to show summary, author, and date. 1348 * All respectively in the order of the array elements. 1349 * 1350 * @since unknown 1351 * 1352 * @param array $widget_rss RSS widget feed data. Expects unescaped data. 1353 * @param bool $check_feed Optional, default is true. Whether to check feed for errors. 1354 * @return array 1355 */ 1313 1356 function wp_widget_rss_process( $widget_rss, $check_feed = true ) { 1314 1357 $items = (int) $widget_rss['items']; 1315 1358 if ( $items < 1 || 20 < $items ) … … 1338 1381 return compact( 'title', 'url', 'link', 'items', 'error', 'show_summary', 'show_author', 'show_date' ); 1339 1382 } 1340 1383 1384 /** 1385 * Register RSS widget to allow multiple RSS widgets. 1386 * 1387 * @since unknown 1388 */ 1341 1389 function wp_widget_rss_register() { 1342 1390 if ( !$options = get_option('widget_rss') ) 1343 1391 $options = array(); … … 1362 1410 } 1363 1411 } 1364 1412 1413 /** 1414 * Display tag cloud WordPress widget. 1415 * 1416 * @since unknown 1417 * 1418 * @param array $args Widget arguments. 1419 */ 1365 1420 function wp_widget_tag_cloud($args) { 1366 1421 extract($args); 1367 1422 $options = get_option('widget_tag_cloud'); … … 1373 1428 echo $after_widget; 1374 1429 } 1375 1430 1431 /** 1432 * Manage WordPress Tag Cloud widget options. 1433 * 1434 * Displays management form for changing the tag cloud widget title. 1435 * 1436 * @since unknown 1437 */ 1376 1438 function wp_widget_tag_cloud_control() { 1377 1439 $options = $newoptions = get_option('widget_tag_cloud'); 1378 1440 … … 1394 1456 <?php 1395 1457 } 1396 1458 1459 /** 1460 * Register all of the default WordPress widgets. 1461 * 1462 * Calls 'widgets_init' action after all of the WordPress widgets have been 1463 * registered. 1464 * 1465 * @since unknown 1466 */ 1397 1467 function wp_widgets_init() { 1398 1468 if ( !is_blog_installed() ) 1399 1469 return;