From 4dc612084f57e1564758516a4082f2598164f263 Mon Sep 17 00:00:00 2001 From: Shreya Shrivastava Date: Thu, 26 Jun 2025 15:59:48 +0530 Subject: [PATCH 1/4] fix: switch nav labels according to order --- src/wp-content/themes/twentytwelve/functions.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/wp-content/themes/twentytwelve/functions.php b/src/wp-content/themes/twentytwelve/functions.php index b53a2d8090a52..7e0dbd044e576 100644 --- a/src/wp-content/themes/twentytwelve/functions.php +++ b/src/wp-content/themes/twentytwelve/functions.php @@ -415,10 +415,17 @@ function twentytwelve_content_nav( $html_id ) { global $wp_query; if ( $wp_query->max_num_pages > 1 ) : ?> + →', 'twentytwelve' ); + $old_posts_text = __( ' Older posts', 'twentytwelve' ); + ?> Date: Wed, 2 Jul 2025 17:48:19 +0530 Subject: [PATCH 2/4] refactor: switch nav labels while preserving DOM order --- .../themes/twentytwelve/functions.php | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/wp-content/themes/twentytwelve/functions.php b/src/wp-content/themes/twentytwelve/functions.php index 7e0dbd044e576..90fbf4ca9fd53 100644 --- a/src/wp-content/themes/twentytwelve/functions.php +++ b/src/wp-content/themes/twentytwelve/functions.php @@ -421,11 +421,29 @@ function twentytwelve_content_nav( $html_id ) { $new_posts_text = __( 'Newer posts ', 'twentytwelve' ); $old_posts_text = __( ' Older posts', 'twentytwelve' ); + + $prev_link = $is_desc ? get_next_posts_link( $old_posts_text ) : get_previous_posts_link( $old_posts_text ); + $next_link = $is_desc ? get_previous_posts_link( $new_posts_text ) : get_next_posts_link( $new_posts_text ); + + $allowed_html_tags = array( + 'a' => array( + 'href' => array(), + 'title' => array(), + ), + 'span' => array( + 'class' => array(), + ), + ) ?> Date: Thu, 24 Jul 2025 18:08:37 +0530 Subject: [PATCH 3/4] refactor: replace wp_kses with wp_kses_post --- src/wp-content/themes/twentytwelve/functions.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/wp-content/themes/twentytwelve/functions.php b/src/wp-content/themes/twentytwelve/functions.php index 95e8082443746..aa34c061ad8c1 100644 --- a/src/wp-content/themes/twentytwelve/functions.php +++ b/src/wp-content/themes/twentytwelve/functions.php @@ -424,25 +424,15 @@ function twentytwelve_content_nav( $html_id ) { $prev_link = $is_desc ? get_next_posts_link( $old_posts_text ) : get_previous_posts_link( $old_posts_text ); $next_link = $is_desc ? get_previous_posts_link( $new_posts_text ) : get_next_posts_link( $new_posts_text ); - - $allowed_html_tags = array( - 'a' => array( - 'href' => array(), - 'title' => array(), - ), - 'span' => array( - 'class' => array(), - ), - ) ?> Date: Wed, 15 Oct 2025 17:23:55 -0500 Subject: [PATCH 4/4] edit spacing --- src/wp-content/themes/twentytwelve/functions.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/wp-content/themes/twentytwelve/functions.php b/src/wp-content/themes/twentytwelve/functions.php index d086dffb8554f..5adfa43bd249a 100644 --- a/src/wp-content/themes/twentytwelve/functions.php +++ b/src/wp-content/themes/twentytwelve/functions.php @@ -414,8 +414,7 @@ function wp_get_list_item_separator() { function twentytwelve_content_nav( $html_id ) { global $wp_query; - if ( $wp_query->max_num_pages > 1 ) : ?> - max_num_pages > 1 ) : $order = get_query_var( 'order', 'DESC' ); $is_desc = ( 'DESC' === $order ); @@ -436,7 +435,7 @@ function twentytwelve_content_nav( $html_id ) {