From 84e0f1ac0f55126e38eab02724c01d8a6cb50bb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Ctewariharish=E2=80=9D?= <“harishwatson@gmail.com”> Date: Sat, 26 Jul 2025 12:29:10 +0530 Subject: [PATCH 1/5] Add test code --- README.md | 2 ++ src/wp-content/themes/twentytwentyfive/functions.php | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 028c0bd5b1f63..6c7eaa7a326d0 100644 --- a/README.md +++ b/README.md @@ -180,3 +180,5 @@ To generate a new password (recommended): 2. Click the Users menu on the left 3. Click the Edit link below the admin user 4. Scroll down and click 'Generate password'. Either use this password (recommended) or change it, then click 'Update User'. If you use the generated password be sure to save it somewhere (password manager, etc). + + diff --git a/src/wp-content/themes/twentytwentyfive/functions.php b/src/wp-content/themes/twentytwentyfive/functions.php index 3805c48052b8c..d2af8cd8dfd99 100644 --- a/src/wp-content/themes/twentytwentyfive/functions.php +++ b/src/wp-content/themes/twentytwentyfive/functions.php @@ -156,3 +156,11 @@ function twentytwentyfive_format_binding() { } } endif; + +function test_codrabbit() { + + $a = 10; + $b = 20 + $c = $a + $b + echo $c; +} From 708140d5c30aaa7aa56023ae2bd92b04c325b812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Ctewariharish=E2=80=9D?= <“harishwatson@gmail.com”> Date: Sat, 26 Jul 2025 12:36:57 +0530 Subject: [PATCH 2/5] Remove from readme --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 6c7eaa7a326d0..6468b58922ab5 100644 --- a/README.md +++ b/README.md @@ -181,4 +181,3 @@ To generate a new password (recommended): 3. Click the Edit link below the admin user 4. Scroll down and click 'Generate password'. Either use this password (recommended) or change it, then click 'Update User'. If you use the generated password be sure to save it somewhere (password manager, etc). - From 4f6e1a030b8fb4e0c5284f096fd0db3d6c1a2a47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Ctewariharish=E2=80=9D?= <“harishwatson@gmail.com”> Date: Sat, 26 Jul 2025 12:41:41 +0530 Subject: [PATCH 3/5] Git add . --- src/wp-content/themes/twentytwentyfive/functions.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/wp-content/themes/twentytwentyfive/functions.php b/src/wp-content/themes/twentytwentyfive/functions.php index d2af8cd8dfd99..1a270d01b01e2 100644 --- a/src/wp-content/themes/twentytwentyfive/functions.php +++ b/src/wp-content/themes/twentytwentyfive/functions.php @@ -164,3 +164,12 @@ function test_codrabbit() { $c = $a + $b echo $c; } + +function get_letest_article() { + + $args = array( + 'post_type' = 'post', + ); + $the_query = new WP_Query( $args ); + return $the_query; +} \ No newline at end of file From 85e89921831785ba0cec13d606888c0cf47ddd50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Ctewariharish=E2=80=9D?= <“harishwatson@gmail.com”> Date: Sat, 26 Jul 2025 12:51:31 +0530 Subject: [PATCH 4/5] Add custom function --- .../themes/twentytwentyfive/functions.php | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/wp-content/themes/twentytwentyfive/functions.php b/src/wp-content/themes/twentytwentyfive/functions.php index 1a270d01b01e2..f6ec07ab605e3 100644 --- a/src/wp-content/themes/twentytwentyfive/functions.php +++ b/src/wp-content/themes/twentytwentyfive/functions.php @@ -172,4 +172,24 @@ function get_letest_article() { ); $the_query = new WP_Query( $args ); return $the_query; +} + +function ie_get_custom_post() { + /** ++ * Retrieves the custom post. ++ * ++ * @since Twenty Twenty-Five 1.0 ++ * ++ * @return WP_Query|false Query object on success, false on failure. ++ */ + + $args = array( + 'post_type' => 'post', + 'post_per_page' => '2000', + 'post__not_in' => array('2', '5', '100') + ); + if($the_query->have_posts()) { ++ return $the_query; ++ } + return false; } \ No newline at end of file From 9eba1d681c0067993375f727bb5f93b7bbffba52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Ctewariharish=E2=80=9D?= <“harishwatson@gmail.com”> Date: Sat, 26 Jul 2025 13:14:28 +0530 Subject: [PATCH 5/5] update function --- .../themes/twentytwentyfive/functions.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/wp-content/themes/twentytwentyfive/functions.php b/src/wp-content/themes/twentytwentyfive/functions.php index f6ec07ab605e3..74cb9f9b638c9 100644 --- a/src/wp-content/themes/twentytwentyfive/functions.php +++ b/src/wp-content/themes/twentytwentyfive/functions.php @@ -192,4 +192,17 @@ function ie_get_custom_post() { + return $the_query; + } return false; -} \ No newline at end of file +} + +function ie_display_dynamic_message( $title ) { + /** + * Display message. + * + * @since Twenty Twenty-Five 1.0 + * + */ + + if(!empty($title)){ + printf( '