Changeset 5432
- Timestamp:
- 04/29/2017 02:52:50 PM (9 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc
- Files:
-
- 7 edited
-
autocomplete.php (modified) (1 diff)
-
breadcrumb-trail.php (modified) (11 diffs)
-
extras.php (modified) (3 diffs)
-
loop-pagination.php (modified) (3 diffs)
-
search.php (modified) (1 diff)
-
template-tags.php (modified) (7 diffs)
-
user-content-voting.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/autocomplete.php
r3247 r5432 10 10 */ 11 11 class DevHub_Search_Form_Autocomplete { 12 13 12 14 13 public function __construct() { -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/breadcrumb-trail.php
r804 r5432 3 3 * Breadcrumb Trail - A breadcrumb menu script for WordPress. 4 4 * 5 * Breadcrumb Trail is a script for showing a breadcrumb trail for any type of page. It tries to 6 * anticipate any type of structure and display the best possible trail that matches your site's 7 * permalink structure. While not perfect, it attempts to fill in the gaps left by many other 5 * Breadcrumb Trail is a script for showing a breadcrumb trail for any type of page. It tries to 6 * anticipate any type of structure and display the best possible trail that matches your site's 7 * permalink structure. While not perfect, it attempts to fill in the gaps left by many other 8 8 * breadcrumb scripts. 9 9 * 10 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU 11 * General Public License as published by the Free Software Foundation; either version 2 of the License, 10 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU 11 * General Public License as published by the Free Software Foundation; either version 2 of the License, 12 12 * or (at your option) any later version. 13 13 * 14 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 14 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 15 15 * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 16 * … … 24 24 25 25 /** 26 * Shows a breadcrumb for all types of pages. This is a wrapper function for the Breadcrumb_Trail class, 26 * Shows a breadcrumb for all types of pages. This is a wrapper function for the Breadcrumb_Trail class, 27 27 * which should be used in theme templates. 28 28 * … … 207 207 208 208 /** 209 * Runs through the various WordPress conditional tags to check the current page being viewed. Once 209 * Runs through the various WordPress conditional tags to check the current page being viewed. Once 210 210 * a condition is met, a specific method is launched to add items to the $items array. 211 211 * … … 495 495 496 496 /** 497 * Adds a specific post's hierarchy to the items array. The hierarchy is determined by post type's 497 * Adds a specific post's hierarchy to the items array. The hierarchy is determined by post type's 498 498 * rewrite arguments and whether it has an archive page. 499 499 * … … 542 542 543 543 /** 544 * Gets post types by slug. This is needed because the get_post_types() function doesn't exactly 544 * Gets post types by slug. This is needed because the get_post_types() function doesn't exactly 545 545 * match the 'has_archive' argument when it's set as a string instead of a boolean. 546 546 * … … 596 596 597 597 /** 598 * Deals with the situation if the slug has a '/' between multiple strings. For 598 * Deals with the situation if the slug has a '/' between multiple strings. For 599 599 * example, "movies/genres" where "movies" is the post type archive. 600 600 */ … … 911 911 912 912 /** 913 * Get parent posts by path. Currently, this method only supports getting parents of the 'page' 914 * post type. The goal of this function is to create a clear path back to home given what would 913 * Get parent posts by path. Currently, this method only supports getting parents of the 'page' 914 * post type. The goal of this function is to create a clear path back to home given what would 915 915 * normally be a "ghost" directory. If any page matches the given path, it'll be added. 916 916 * … … 970 970 971 971 /** 972 * Searches for term parents of hierarchical taxonomies. This function is similar to the WordPress 972 * Searches for term parents of hierarchical taxonomies. This function is similar to the WordPress 973 973 * function get_category_parents() but handles any type of taxonomy. 974 974 * … … 1003 1003 /** 1004 1004 * Turns %tag% from permalink structures into usable links for the breadcrumb trail. This feels kind of 1005 * hackish for now because we're checking for specific %tag% examples and only doing it for the 'post' 1005 * hackish for now because we're checking for specific %tag% examples and only doing it for the 'post' 1006 1006 * post type. In the future, maybe it'll handle a wider variety of possibilities, especially for custom post 1007 1007 * types. … … 1084 1084 1085 1085 /** 1086 * Extends the Breadcrumb_Trail class for bbPress. Only use this if bbPress is in use. This should 1086 * Extends the Breadcrumb_Trail class for bbPress. Only use this if bbPress is in use. This should 1087 1087 * serve as an example for other plugin developers to build custom breadcrumb items. 1088 1088 * … … 1093 1093 1094 1094 /** 1095 * Runs through the various bbPress conditional tags to check the current page being viewed. Once 1095 * Runs through the various bbPress conditional tags to check the current page being viewed. Once 1096 1096 * a condition is met, add items to the $items array. 1097 1097 * -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/extras.php
r3281 r5432 156 156 $pagenum = trailingslashit( preg_replace( '/\?.*/', '', get_pagenum_link() ) ); 157 157 $pagination_base = $wp_rewrite->pagination_base; 158 158 159 159 $args['base'] = user_trailingslashit( $pagenum . "{$pagination_base}/%#%" ); 160 160 } … … 166 166 /** 167 167 * Removes 'page/1' from pagination links with a query string. 168 * 168 * 169 169 * @param string $page_links Page links HTML. 170 170 * @return string Page links HTML. … … 180 180 181 181 $query_string = preg_quote( $query_string[1], '#' ); 182 182 183 183 // Remove 'page/1' from the entire output since it's not needed. 184 184 $page_links = preg_replace( -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/loop-pagination.php
r554 r5432 3 3 * Loop Pagination - A WordPress script for creating paginated links on archive-type pages. 4 4 * 5 * The Loop Pagination script was designed to give theme authors a quick way to paginate archive-type 6 * (archive, search, and blog) pages without having to worry about which of the many plugins a user might 5 * The Loop Pagination script was designed to give theme authors a quick way to paginate archive-type 6 * (archive, search, and blog) pages without having to worry about which of the many plugins a user might 7 7 * possibly be using. Instead, they can simply build pagination right into their themes. 8 8 * 9 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU 10 * General Public License as published by the Free Software Foundation; either version 2 of the License, 9 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU 10 * General Public License as published by the Free Software Foundation; either version 2 of the License, 11 11 * or (at your option) any later version. 12 12 * 13 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 13 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 14 14 * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 15 * … … 23 23 24 24 /** 25 * Loop pagination function for paginating loops with multiple posts. This should be used on archive, blog, and 25 * Loop pagination function for paginating loops with multiple posts. This should be used on archive, blog, and 26 26 * search pages. It is not for singular views. 27 27 * … … 87 87 88 88 /* Remove 'page/1' from the entire output since it's not needed. */ 89 $page_links = preg_replace( 90 array( 89 $page_links = preg_replace( 90 array( 91 91 "#(href=['\"].*?){$pagination_base}/1(['\"])#", // 'page/1' 92 92 "#(href=['\"].*?){$pagination_base}/1/(['\"])#", // 'page/1/' 93 93 "#(href=['\"].*?)\?paged=1(['\"])#", // '?paged=1' 94 94 "#(href=['\"].*?)&\#038;paged=1(['\"])#" // '&paged=1' 95 ), 96 '$1$2', 97 $page_links 95 ), 96 '$1$2', 97 $page_links 98 98 ); 99 99 -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/search.php
r3281 r5432 88 88 // Fallback to parsed post types. 89 89 $query->set( 'post_type', DevHub\get_parsed_post_types() ); 90 } 90 } 91 91 } 92 92 -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php
r4581 r5432 76 76 /** 77 77 * Get contibuted notes ordered by vote 78 * 78 * 79 79 * By default only top level comments are returned. 80 * If child notes are included use wp_list_comments() or a custom walker for display. 80 * If child notes are included use wp_list_comments() or a custom walker for display. 81 81 * unapproved notes for the current user are included. 82 82 * … … 106 106 } 107 107 108 $args = wp_parse_args( $args, $defaults ); 108 $args = wp_parse_args( $args, $defaults ); 109 109 110 110 $comments = get_comments( $args ); 111 111 112 112 if ( ! $comments ) { 113 113 return; … … 145 145 <li id="comment-<?php comment_ID(); ?>" <?php comment_class( implode( ' ', $comment_class ) ); ?>> 146 146 <article id="div-comment-<?php comment_ID(); ?>" class="comment-body"> 147 <a href="#comment-content-<?php echo $comment->comment_ID; ?>" class="screen-reader-text"><?php _e( 'Skip to note content', 'wporg' ); ?></a> 147 <a href="#comment-content-<?php echo $comment->comment_ID; ?>" class="screen-reader-text"><?php _e( 'Skip to note content', 'wporg' ); ?></a> 148 148 <header class="comment-meta"> 149 149 <?php DevHub_User_Contributed_Notes_Voting::show_voting(); ?> … … 181 181 <a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>"> 182 182 <time datetime="<?php comment_time( 'c' ); ?>"> 183 <?php 183 <?php 184 184 printf( _x( '%1$s ago', '%1$s = human-readable time difference', 'wporg' ), 185 185 human_time_diff( get_comment_time( 'U' ), … … 1294 1294 * The (long) description is stored in the 'post_content' get_post_field. 1295 1295 * 1296 * @param null|WP_Post Optiona . The post.1296 * @param null|WP_Post Optional. The post. 1297 1297 * @return string 1298 1298 */ … … 1450 1450 1451 1451 /** 1452 * Displays a post type filter dropdown on taxonomy pages. 1453 * 1452 * Displays a post type filter dropdown on taxonomy pages. 1453 * 1454 1454 * @return string HTML filter form. 1455 1455 */ … … 1483 1483 $form .= "<input type='hidden' name='" . esc_attr( $taxonomy ) . "' value='" . esc_attr( $term ) . "'>"; 1484 1484 } 1485 1485 1486 1486 $form .= "<label for='archive-filter'>"; 1487 1487 $form .= __( 'Filter by type:', 'wporg' ) . ' '; -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/user-content-voting.php
r3786 r5432 299 299 $nonce = wp_create_nonce( 'user-note-vote-' . $comment_id ); 300 300 $disabled_str = __( 'Voting for this note is disabled', 'wporg' ); 301 $cancel_str = __( 'Click to cancel your vote', 'wporg' ); 301 $cancel_str = __( 'Click to cancel your vote', 'wporg' ); 302 302 $log_in_str = __( 'You must log in to vote on the helpfulness of this note', 'wporg' ); 303 303 $log_in_url = add_query_arg( 'redirect_to', urlencode( $comment_link ), 'https://login.wordpress.org' ); … … 312 312 $user_upvoted = self::has_user_upvoted_comment( $comment_id ); 313 313 if ( $can_vote ) { 314 $cancel = $user_upvoted ? '. ' . $cancel_str . '.' : ''; 314 $cancel = $user_upvoted ? '. ' . $cancel_str . '.' : ''; 315 315 $title = $user_upvoted ? 316 316 __( 'You have voted to indicate this note was helpful', 'wporg' ) . $cancel : … … 390 390 * 'difference' : The difference between upvotes and downvotes (upvotes - downvotes) 391 391 * 'like_percentage' : The percentage of total votes that upvoted 392 * 392 * 393 393 * @access public 394 394 *
Note: See TracChangeset
for help on using the changeset viewer.