Changeset 57685 for trunk/src/wp-includes/comment-template.php
- Timestamp:
- 02/21/2024 07:24:12 PM (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment-template.php
r57648 r57685 1391 1391 * @since 1.5.0 1392 1392 * 1393 * @global WP_Query $wp_query WordPress Query object.1394 * @global WP_Post $post Global post object.1395 * @global wpdb $wpdb WordPress database abstraction object.1393 * @global WP_Query $wp_query WordPress Query object. 1394 * @global WP_Post $post Global post object. 1395 * @global wpdb $wpdb WordPress database abstraction object. 1396 1396 * @global int $id 1397 * @global WP_Comment $comment Global comment object.1397 * @global WP_Comment $comment Global comment object. 1398 1398 * @global string $user_login 1399 1399 * @global string $user_identity 1400 1400 * @global bool $overridden_cpage 1401 1401 * @global bool $withcomments 1402 * @global string $wp_stylesheet_path Path to current theme's stylesheet directory. 1403 * @global string $wp_template_path Path to current theme's template directory. 1402 1404 * 1403 1405 * @param string $file Optional. The file to load. Default '/comments.php'. … … 1406 1408 */ 1407 1409 function comments_template( $file = '/comments.php', $separate_comments = false ) { 1408 global $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_identity, $overridden_cpage ;1410 global $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_identity, $overridden_cpage, $wp_stylesheet_path, $wp_template_path; 1409 1411 1410 1412 if ( ! ( is_single() || is_page() || $withcomments ) || empty( $post ) ) { … … 1601 1603 } 1602 1604 1603 $stylesheet_path = get_stylesheet_directory(); 1604 $template_path = get_template_directory(); 1605 1606 $theme_template = $stylesheet_path . $file; 1605 $theme_template = trailingslashit( $wp_stylesheet_path ) . $file; 1607 1606 1608 1607 /** … … 1617 1616 if ( file_exists( $include ) ) { 1618 1617 require $include; 1619 } elseif ( file_exists( $template_path. $file ) ) {1620 require $template_path. $file;1618 } elseif ( file_exists( trailingslashit( $wp_template_path ) . $file ) ) { 1619 require trailingslashit( $wp_template_path ) . $file; 1621 1620 } else { // Backward compat code will be removed in a future release. 1622 1621 require ABSPATH . WPINC . '/theme-compat/comments.php';
Note: See TracChangeset
for help on using the changeset viewer.