- Timestamp:
- 07/03/2021 09:13:48 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwenty/inc/template-tags.php
r49120 r51322 26 26 * Displays the site logo, either text or image. 27 27 * 28 * @param array $args Arguments for displaying the site logo either as an image or text. 29 * @param bool $echo Echo or return the HTML. 28 * @since Twenty Twenty 1.0 29 * 30 * @param array $args Arguments for displaying the site logo either as an image or text. 31 * @param bool $echo Echo or return the HTML. 30 32 * @return string Compiled HTML based on our arguments. 31 33 */ … … 51 53 * Filters the arguments for `twentytwenty_site_logo()`. 52 54 * 53 * @param array $args Parsed arguments. 54 * @param array $defaults Function's default arguments. 55 * @since Twenty Twenty 1.0 56 * 57 * @param array $args Parsed arguments. 58 * @param array $defaults Function's default arguments. 55 59 */ 56 60 $args = apply_filters( 'twentytwenty_site_logo_args', $args, $defaults ); … … 71 75 * Filters the arguments for `twentytwenty_site_logo()`. 72 76 * 77 * @since Twenty Twenty 1.0 78 * 73 79 * @param string $html Compiled HTML based on our arguments. 74 80 * @param array $args Parsed arguments. … … 89 95 * Displays the site description. 90 96 * 97 * @since Twenty Twenty 1.0 98 * 91 99 * @param bool $echo Echo or return the html. 92 100 * @return string The HTML to display. … … 108 116 * @since Twenty Twenty 1.0 109 117 * 110 * @param string $html 111 * @param string $description 112 * @param string $wrapper 118 * @param string $html The HTML to display. 119 * @param string $description Site description via `bloginfo()`. 120 * @param string $wrapper The format used in case you want to reuse it in a `sprintf()`. 113 121 */ 114 122 $html = apply_filters( 'twentytwenty_site_description', $html, $description, $wrapper ); … … 128 136 * Checks if the specified comment is written by the author of the post commented on. 129 137 * 138 * @since Twenty Twenty 1.0 139 * 130 140 * @param object $comment Comment data. 131 141 * @return bool … … 154 164 * makes it scroll to the wrong position on the page. 155 165 * 166 * @since Twenty Twenty 1.0 167 * 156 168 * @param string $link Link to the top of the page. 157 169 * @return string Link to the top of the page. … … 175 187 * If it's a single post, outputs the post meta values specified in the Customizer settings. 176 188 * 189 * @since Twenty Twenty 1.0 190 * 177 191 * @param int $post_id The ID of the post for which the post meta should be output. 178 192 * @param string $location Which post meta location to output – single or preview. … … 186 200 /** 187 201 * Filters the edit post link to add an icon and use the post meta structure. 202 * 203 * @since Twenty Twenty 1.0 188 204 * 189 205 * @param string $link Anchor tag for the edit link. … … 224 240 * Retrieves the post meta. 225 241 * 226 * @param int $post_id The ID of the post. 242 * @since Twenty Twenty 1.0 243 * 244 * @param int $post_id The ID of the post. 227 245 * @param string $location The location where the meta is shown. 228 246 */ … … 242 260 * @since Twenty Twenty 1.0 243 261 * 244 * @param array Array of post types 262 * @param array Array of post types. 245 263 */ 246 264 $disallowed_post_types = apply_filters( 'twentytwenty_disallowed_post_types_for_meta_output', array( 'page' ) ); … … 264 282 * 265 283 * @param array $args { 266 * @type string 'author'267 * @type string 'post-date'268 * @type string 'comments'269 * @type string 'sticky'284 * @type string $author 285 * @type string $post-date 286 * @type string $comments 287 * @type string $sticky 270 288 * } 271 289 */ … … 292 310 * 293 311 * @param array $args { 294 * @type string 'tags'312 * @type string $tags 295 313 * } 296 314 */ … … 500 518 * styling of sub levels in the fallback. Only applied if the match_menu_classes argument is set. 501 519 * 520 * @since Twenty Twenty 1.0 521 * 502 522 * @param string[] $css_class An array of CSS classes to be applied to each list item. 503 523 * @param WP_Post $page Page data object. … … 534 554 /** 535 555 * Adds a Sub Nav Toggle to the Expanded Menu and Mobile Menu. 556 * 557 * @since Twenty Twenty 1.0 536 558 * 537 559 * @param stdClass $args An object of wp_nav_menu() arguments. … … 580 602 /** 581 603 * Displays SVG icons in social links menu. 604 * 605 * @since Twenty Twenty 1.0 582 606 * 583 607 * @param string $item_output The menu item's starting HTML output. … … 610 634 * 611 635 * If we're missing JavaScript support, the HTML element will have a 'no-js' class. 636 * 637 * @since Twenty Twenty 1.0 612 638 */ 613 639 function twentytwenty_no_js_class() { … … 623 649 /** 624 650 * Adds conditional body classes. 651 * 652 * @since Twenty Twenty 1.0 625 653 * 626 654 * @param array $classes Classes added to the body tag. … … 725 753 * Filters the archive title and styles the word before the first colon. 726 754 * 755 * @since Twenty Twenty 1.0 756 * 727 757 * @param string $title Current archive title. 728 758 * @return string Current archive title. … … 730 760 function twentytwenty_get_the_archive_title( $title ) { 731 761 762 /** 763 * Filters the regular expression used to style the word before the first colon. 764 * 765 * @since Twenty Twenty 1.0 766 * 767 * @param array $regex An array of regular expression pattern and replacement. 768 */ 732 769 $regex = apply_filters( 733 770 'twentytwenty_get_the_archive_title_regex', … … 757 794 * Toggles animation duration in milliseconds. 758 795 * 796 * @since Twenty Twenty 1.0 797 * 759 798 * @return int Duration in milliseconds 760 799 */ … … 780 819 * but it is unique across the life of the PHP process. 781 820 * 821 * @since Twenty Twenty 1.0 822 * 782 823 * @see wp_unique_id() Themes requiring WordPress 5.0.3 and greater should use this instead. 783 824 *
Note: See TracChangeset
for help on using the changeset viewer.