Changeset 32589
- Timestamp:
- 05/24/2015 09:27:12 PM (10 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/default-filters.php
r32161 r32589 383 383 add_filter( 'nav_menu_item_id', '_nav_menu_item_id_use_once', 10, 2 ); 384 384 385 // Widgets 386 add_action( 'init', 'wp_widgets_init', 1 ); 387 385 388 // Admin Bar 386 389 // Don't remove. Wrong way to disable. -
trunk/src/wp-includes/default-widgets.php
r31886 r32589 19 19 } 20 20 21 /** 22 * @param array $args 23 * @param array $instance 24 */ 21 25 public function widget( $args, $instance ) { 22 26 … … 68 72 } 69 73 74 /** 75 * @param array $new_instance 76 * @param array $old_instance 77 * @return array 78 */ 70 79 public function update( $new_instance, $old_instance ) { 71 80 $instance = $old_instance; … … 82 91 } 83 92 93 /** 94 * @param array $instance 95 */ 84 96 public function form( $instance ) { 85 97 //Defaults … … 119 131 } 120 132 133 /** 134 * @param array $args 135 * @param array $instance 136 */ 121 137 public function widget( $args, $instance ) { 122 123 138 $show_description = isset($instance['description']) ? $instance['description'] : false; 124 139 $show_name = isset($instance['name']) ? $instance['name'] : false; … … 152 167 } 153 168 169 /** 170 * @param array $new_instance 171 * @param array $old_instance 172 * @return array 173 */ 154 174 public function update( $new_instance, $old_instance ) { 155 175 $new_instance = (array) $new_instance; … … 170 190 } 171 191 192 /** 193 * @param array $instance 194 */ 172 195 public function form( $instance ) { 173 196 … … 228 251 } 229 252 253 /** 254 * @param array $args 255 * @param array $instance 256 */ 230 257 public function widget( $args, $instance ) { 231 232 258 /** This filter is documented in wp-includes/default-widgets.php */ 233 259 $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base ); … … 244 270 } 245 271 272 /** 273 * @param array $instance 274 */ 246 275 public function form( $instance ) { 247 276 $instance = wp_parse_args( (array) $instance, array( 'title' => '') ); … … 252 281 } 253 282 283 /** 284 * @param array $new_instance 285 * @param array $old_instance 286 * @return array 287 */ 254 288 public function update( $new_instance, $old_instance ) { 255 289 $instance = $old_instance; … … 273 307 } 274 308 309 /** 310 * @param array $args 311 * @param array $instance 312 */ 275 313 public function widget( $args, $instance ) { 276 314 $c = ! empty( $instance['count'] ) ? '1' : '0'; … … 355 393 } 356 394 395 /** 396 * @param array $new_instance 397 * @param array $old_instance 398 * @return array 399 */ 357 400 public function update( $new_instance, $old_instance ) { 358 401 $instance = $old_instance; … … 365 408 } 366 409 410 /** 411 * @param array $instance 412 */ 367 413 public function form( $instance ) { 368 414 $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'count' => 0, 'dropdown' => '') ); … … 395 441 } 396 442 443 /** 444 * @param array $args 445 * @param array $instance 446 */ 397 447 public function widget( $args, $instance ) { 398 399 448 /** This filter is documented in wp-includes/default-widgets.php */ 400 449 $title = apply_filters( 'widget_title', empty($instance['title']) ? __( 'Meta' ) : $instance['title'], $instance, $this->id_base ); … … 431 480 } 432 481 482 /** 483 * @param array $new_instance 484 * @param array $old_instance 485 * @return array 486 */ 433 487 public function update( $new_instance, $old_instance ) { 434 488 $instance = $old_instance; … … 438 492 } 439 493 494 /** 495 * @param array $instance 496 */ 440 497 public function form( $instance ) { 441 498 $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) ); … … 459 516 } 460 517 518 /** 519 * @param array $args 520 * @param array $instance 521 */ 461 522 public function widget( $args, $instance ) { 462 463 523 /** This filter is documented in wp-includes/default-widgets.php */ 464 524 $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base ); … … 474 534 } 475 535 536 /** 537 * @param array $new_instance 538 * @param array $old_instance 539 * @return array 540 */ 476 541 public function update( $new_instance, $old_instance ) { 477 542 $instance = $old_instance; … … 481 546 } 482 547 548 /** 549 * @param array $instance 550 */ 483 551 public function form( $instance ) { 484 552 $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) ); … … 504 572 } 505 573 574 /** 575 * @param array $args 576 * @param array $instance 577 */ 506 578 public function widget( $args, $instance ) { 507 508 579 /** This filter is documented in wp-includes/default-widgets.php */ 509 580 $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base ); … … 527 598 } 528 599 600 /** 601 * @param array $new_instance 602 * @param array $old_instance 603 * @return array 604 */ 529 605 public function update( $new_instance, $old_instance ) { 530 606 $instance = $old_instance; … … 538 614 } 539 615 616 /** 617 * @param array $instance 618 */ 540 619 public function form( $instance ) { 541 620 $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'text' => '' ) ); … … 565 644 } 566 645 646 /** 647 * @param array $args 648 * @param array $instance 649 */ 567 650 public function widget( $args, $instance ) { 568 569 651 /** This filter is documented in wp-includes/default-widgets.php */ 570 652 $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Categories' ) : $instance['title'], $instance, $this->id_base ); … … 645 727 } 646 728 729 /** 730 * @param array $new_instance 731 * @param array $old_instance 732 * @return array 733 */ 647 734 public function update( $new_instance, $old_instance ) { 648 735 $instance = $old_instance; … … 655 742 } 656 743 744 /** 745 * @param array $instance 746 */ 657 747 public function form( $instance ) { 658 748 //Defaults … … 696 786 } 697 787 698 public function widget($args, $instance) { 788 /** 789 * @param array $args 790 * @param array $instance 791 */ 792 public function widget( $args, $instance ) { 699 793 $cache = array(); 700 794 if ( ! $this->is_preview() ) { … … 774 868 } 775 869 870 /** 871 * @param array $new_instance 872 * @param array $old_instance 873 * @return array 874 */ 776 875 public function update( $new_instance, $old_instance ) { 777 876 $instance = $old_instance; … … 792 891 } 793 892 893 /** 894 * @param array $instance 895 */ 794 896 public function form( $instance ) { 795 897 $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : ''; … … 830 932 831 933 public function recent_comments_style() { 832 833 934 /** 834 935 * Filter the Recent Comments default widget styles. … … 851 952 } 852 953 954 /** 955 * @global array $comments 956 * @global object $comment 957 * 958 * @param array $args 959 * @param array $instance 960 */ 853 961 public function widget( $args, $instance ) { 854 962 global $comments, $comment; … … 928 1036 } 929 1037 1038 /** 1039 * @param array $new_instance 1040 * @param array $old_instance 1041 * @return array 1042 */ 930 1043 public function update( $new_instance, $old_instance ) { 931 1044 $instance = $old_instance; … … 941 1054 } 942 1055 1056 /** 1057 * @param array $instance 1058 */ 943 1059 public function form( $instance ) { 944 1060 $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : ''; … … 967 1083 } 968 1084 969 public function widget($args, $instance) { 970 1085 /** 1086 * @param array $args 1087 * @param array $instance 1088 */ 1089 public function widget( $args, $instance ) { 971 1090 if ( isset($instance['error']) && $instance['error'] ) 972 1091 return; … … 1020 1139 } 1021 1140 1022 public function update($new_instance, $old_instance) { 1141 /** 1142 * @param array $new_instance 1143 * @param array $old_instance 1144 * @return array 1145 */ 1146 public function update( $new_instance, $old_instance ) { 1023 1147 $testurl = ( isset( $new_instance['url'] ) && ( !isset( $old_instance['url'] ) || ( $new_instance['url'] != $old_instance['url'] ) ) ); 1024 1148 return wp_widget_rss_process( $new_instance, $testurl ); 1025 1149 } 1026 1150 1027 public function form($instance) { 1028 1029 if ( empty($instance) ) 1151 /** 1152 * @param array $instance 1153 */ 1154 public function form( $instance ) { 1155 if ( empty( $instance ) ) { 1030 1156 $instance = array( 'title' => '', 'url' => '', 'items' => 10, 'error' => false, 'show_summary' => 0, 'show_author' => 0, 'show_date' => 0 ); 1157 } 1031 1158 $instance['number'] = $this->number; 1032 1159 … … 1262 1389 } 1263 1390 1391 /** 1392 * @param array $args 1393 * @param array $instance 1394 */ 1264 1395 public function widget( $args, $instance ) { 1265 1396 $current_taxonomy = $this->_get_current_taxonomy($instance); … … 1302 1433 } 1303 1434 1435 /** 1436 * @param array $new_instance 1437 * @param array $old_instance 1438 * @return array 1439 */ 1304 1440 public function update( $new_instance, $old_instance ) { 1305 1441 $instance = array(); … … 1309 1445 } 1310 1446 1447 /** 1448 * @param array $instance 1449 */ 1311 1450 public function form( $instance ) { 1312 1451 $current_taxonomy = $this->_get_current_taxonomy($instance); … … 1346 1485 } 1347 1486 1348 public function widget($args, $instance) { 1487 /** 1488 * @param array $args 1489 * @param array $instance 1490 */ 1491 public function widget( $args, $instance ) { 1349 1492 // Get menu 1350 1493 $nav_menu = ! empty( $instance['nav_menu'] ) ? wp_get_nav_menu_object( $instance['nav_menu'] ) : false; … … 1385 1528 } 1386 1529 1530 /** 1531 * @param array $new_instance 1532 * @param array $old_instance 1533 * @return array 1534 */ 1387 1535 public function update( $new_instance, $old_instance ) { 1388 1536 $instance = array(); … … 1396 1544 } 1397 1545 1546 /** 1547 * @param array $instance 1548 */ 1398 1549 public function form( $instance ) { 1399 1550 $title = isset( $instance['title'] ) ? $instance['title'] : ''; … … 1476 1627 do_action( 'widgets_init' ); 1477 1628 } 1478 1479 add_action('init', 'wp_widgets_init', 1);
Note: See TracChangeset
for help on using the changeset viewer.