Ticket #5640: 5640.r8852.diff
File 5640.r8852.diff, 9.9 KB (added by , 16 years ago) |
---|
-
general-template.php
282 282 } 283 283 284 284 /** 285 * {@internal Missing Short Description}}285 * Display or retrieve page title for all areas of blog. 286 286 * 287 * {@internal Missing Long Description}} 287 * By default, the page title will display the separator before the page title, 288 * so that the blog title will be before the page title. This is not good for 289 * title display, since the blog title shows up on most tabs and not what is 290 * important, which is the page that the user is looking at. 288 291 * 292 * There are also SEO benefits to having the blog title after or to the 'right' 293 * or the page title. However, it is mostly common sense to have the blog title 294 * to the right with most browsers supporting tabs. You can achieve this by 295 * using the seplocation parameter and setting the value to 'right'. This change 296 * was introduced around 2.5.0, in case backwards compatibility of themes is 297 * important. 298 * 289 299 * @since 1.0.0 290 300 * 291 * @param unknown_type $sep 292 * @param unknown_type $display 293 * @return unknown 301 * @param string $sep Optional, default is '»'. How to separate the various items within the page title. 302 * @param bool $display Optional, default is true. Whether to display or retrieve title. 303 * @param string $seplocation Optional. Direction to display title, 'right'. 304 * @return string|null String on retrieve, null when displaying. 294 305 */ 295 306 function wp_title($sep = '»', $display = true, $seplocation = '') { 296 307 global $wpdb, $wp_locale, $wp_query; … … 398 409 } 399 410 400 411 /** 401 * {@internal Missing Short Description}}412 * Display or retrieve page title for post. 402 413 * 403 * {@internal Missing Long Description}} 414 * This is optimized for single.php template file for displaying the post title. 415 * Only useful for posts, does not support pages for example. 404 416 * 417 * It does not support placing the separator after the title, but by leaving the 418 * prefix parameter empty, you can set the title separator manually. The prefix 419 * does not automatically place a space between the prefix, so if there should 420 * be a space, the parameter value will need to have it at the end. 421 * 405 422 * @since 0.71 406 423 * @uses $wpdb 407 424 * 408 * @param unknown_type $prefix409 * @param unknown_type $display410 * @return unknown425 * @param string $prefix Optional. What to display before the title. 426 * @param bool $display Optional, default is true. Whether to display or retrieve title. 427 * @return string|null Title when retrieving, null when displaying or failure. 411 428 */ 412 429 function single_post_title($prefix = '', $display = true) { 413 430 global $wpdb; … … 428 445 } 429 446 430 447 /** 431 * {@internal Missing Short Description}}448 * Display or retrieve page title for category archive. 432 449 * 433 * {@internal Missing Long Description}} 450 * This is useful for category template file or files, because it is optimized 451 * for category page title and with less overhead than {@link wp_title()}. 434 452 * 453 * It does not support placing the separator after the title, but by leaving the 454 * prefix parameter empty, you can set the title separator manually. The prefix 455 * does not automatically place a space between the prefix, so if there should 456 * be a space, the parameter value will need to have it at the end. 457 * 435 458 * @since 0.71 436 459 * 437 * @param unknown_type $prefix438 * @param unknown_type $display439 * @return unknown460 * @param string $prefix Optional. What to display before the title. 461 * @param bool $display Optional, default is true. Whether to display or retrieve title. 462 * @return string|null Title when retrieving, null when displaying or failure. 440 463 */ 441 464 function single_cat_title($prefix = '', $display = true ) { 442 465 $cat = intval( get_query_var('cat') ); … … 454 477 } 455 478 456 479 /** 457 * {@internal Missing Short Description}}480 * Display or retrieve page title for tag post archive. 458 481 * 459 * {@internal Missing Long Description}} 482 * Useful for tag template files for displaying the tag page title. It has less 483 * overhead than {@link wp_title()}, because of its limited implementation. 460 484 * 485 * It does not support placing the separator after the title, but by leaving the 486 * prefix parameter empty, you can set the title separator manually. The prefix 487 * does not automatically place a space between the prefix, so if there should 488 * be a space, the parameter value will need to have it at the end. 489 * 461 490 * @since 2.3.0 462 491 * 463 * @param unknown_type $prefix464 * @param unknown_type $display465 * @return unknown492 * @param string $prefix Optional. What to display before the title. 493 * @param bool $display Optional, default is true. Whether to display or retrieve title. 494 * @return string|null Title when retrieving, null when displaying or failure. 466 495 */ 467 496 function single_tag_title($prefix = '', $display = true ) { 468 497 if ( !is_tag() ) … … 485 514 } 486 515 487 516 /** 488 * {@internal Missing Short Description}}517 * Display or retrieve page title for post archive based on date. 489 518 * 490 * {@internal Missing Long Description}} 519 * Useful for when the template only needs to display the month and year, if 520 * either are available. Optimized for just this purpose, so if it is all that 521 * is needed, should be better than {@link wp_title()}. 491 522 * 523 * It does not support placing the separator after the title, but by leaving the 524 * prefix parameter empty, you can set the title separator manually. The prefix 525 * does not automatically place a space between the prefix, so if there should 526 * be a space, the parameter value will need to have it at the end. 527 * 492 528 * @since 0.71 493 529 * 494 * @param unknown_type $prefix495 * @param unknown_type $display496 * @return unknown530 * @param string $prefix Optional. What to display before the title. 531 * @param bool $display Optional, default is true. Whether to display or retrieve title. 532 * @return string|null Title when retrieving, null when displaying or failure. 497 533 */ 498 534 function single_month_title($prefix = '', $display = true ) { 499 535 global $wp_locale; … … 521 557 } 522 558 523 559 /** 524 * {@internal Missing Short Description}}560 * Retrieve archive link content based on predefined or custom code. 525 561 * 526 * {@internal Missing Long Description}} 562 * The format can be one of four styles. The 'link' for head element, 'option' 563 * for use in the select element, 'html' for use in list (either ol or ul HTML 564 * elements). Custom content is also supported using the before and after 565 * parameters. 527 566 * 567 * The 'link' format uses the link HTML element with the <em>archives</em> 568 * relationship. The before and after parameters are not used. The text 569 * parameter is used to describe the link. 570 * 571 * The 'option' format uses the option HTML element for use in select element. 572 * The value is the url parameter and the before and after parameters are used 573 * between the text description. 574 * 575 * The 'html' format, which is the default, uses the li HTML element for use in 576 * the list HTML elements. The before parameter is before the link and the after 577 * parameter is after the closing link. 578 * 579 * The custom format uses the before parameter before the link ('a' HTML 580 * element) and the after parameter after the closing link tag. If the above 581 * three values for the format are not used, then custom format is assumed. 582 * 528 583 * @since 1.0.0 529 584 * @author Orien 530 585 * @link http://icecode.com/ link navigation hack by Orien 531 586 * 532 * @param unknown_type $url533 * @param unknown_type $text534 * @param unknown_type $format535 * @param unknown_type $before536 * @param unknown_type $after537 * @return unknown587 * @param string $url URL to archive. 588 * @param string $text Archive text description. 589 * @param string $format Optional, default is 'html'. Can be 'link', 'option', 'html', or custom. 590 * @param string $before Optional. 591 * @param string $after Optional. 592 * @return string HTML link content for archive. 538 593 */ 539 594 function get_archives_link($url, $text, $format = 'html', $before = '', $after = '') { 540 595 $text = wptexturize($text); … … 730 785 } 731 786 732 787 /** 733 * {@internal Missing Short Description}}788 * Get number of days since the start of the week. 734 789 * 735 * {@internal Missing Long Description}}736 *737 790 * @since 1.5.0 738 791 * @usedby get_calendar() 739 792 * 740 793 * @param int $num Number of day. 741 * @return int 794 * @return int Days since the start of the week. 742 795 */ 743 796 function calendar_week_mod($num) { 744 797 $base = 7; … … 962 1015 add_action( 'update_option_start_of_week', 'delete_get_calendar_cache' ); 963 1016 964 1017 /** 965 * {@internal Missing Short Description}}1018 * Display all of the allowed tags in HTML format with attributes. 966 1019 * 967 * {@internal Missing Long Description}} 1020 * This is useful for displaying in the comment area, which elements and 1021 * attributes are supported. As well as any plugins which want to display it. 968 1022 * 969 1023 * @since 1.0.1 970 1024 * @uses $allowedtags 971 1025 * 972 * @return unknown1026 * @return string HTML allowed tags entity encoded. 973 1027 */ 974 1028 function allowed_tags() { 975 1029 global $allowedtags; … … 1310 1364 } 1311 1365 1312 1366 /** 1313 * {@internal Missing Short Description}}1367 * Display visual editor forms: TinyMCE, or HTML, or both. 1314 1368 * 1315 * {@internal Missing Long Description}} 1369 * The amount of rows the text area will have for the content has to be between 1370 * 3 and 100 or will default at 12. There is only one option used for all users, 1371 * named 'default_post_edit_rows'. 1316 1372 * 1373 * If the user can not use the rich editor (TinyMCE), then the switch button 1374 * will not be displayed. 1375 * 1317 1376 * @since 2.1.0 1318 1377 * 1319 * @param unknown_type $content 1320 * @param unknown_type $id 1321 * @param unknown_type $prev_id 1378 * @param string $content Textarea content. 1379 * @param string $id HTML ID attribute value. 1380 * @param string $prev_id HTML ID name for switching back and forth between visual editors. 1381 * @param bool $media_buttons Optional, default is true. Whether to display media buttons. 1382 * @param int $tab_index Optional, default is 2. Tabindex for textarea element. 1322 1383 */ 1323 1384 function the_editor($content, $id = 'content', $prev_id = 'title', $media_buttons = true, $tab_index = 2) { 1324 1385 $rows = get_option('default_post_edit_rows');