From addc6652c43b9f7221bb524f599b8423d8e306fc Mon Sep 17 00:00:00 2001 From: narenin Date: Mon, 1 Jul 2024 14:52:33 +0530 Subject: [PATCH] Implemented Strict typcasting and performance improvement --- .../public_html/wp-content/themes/jobswp/content-list.php | 5 +++-- .../public_html/wp-content/themes/jobswp/inc/extras.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/jobs.wordpress.net/public_html/wp-content/themes/jobswp/content-list.php b/jobs.wordpress.net/public_html/wp-content/themes/jobswp/content-list.php index b200dadcf5..639753a436 100644 --- a/jobs.wordpress.net/public_html/wp-content/themes/jobswp/content-list.php +++ b/jobs.wordpress.net/public_html/wp-content/themes/jobswp/content-list.php @@ -6,16 +6,17 @@ foreach ( $posts as $post ) { $evenodd = abs( $evenodd - 1 ); + $post_id = get_the_ID(); echo '
'; echo '
' . get_the_date( 'M j' ) . '
'; echo ''; echo '
'; - echo jobswp_get_job_meta( get_the_ID(), 'jobtype' ); + echo jobswp_get_job_meta( $post_id, 'jobtype' ); echo '
'; echo '
'; - echo jobswp_get_job_meta( get_the_ID(), 'location' ); + echo jobswp_get_job_meta( $post_id, 'location' ); echo '
'; echo '
'; diff --git a/jobs.wordpress.net/public_html/wp-content/themes/jobswp/inc/extras.php b/jobs.wordpress.net/public_html/wp-content/themes/jobswp/inc/extras.php index 755bbb2bd7..1f417aa707 100644 --- a/jobs.wordpress.net/public_html/wp-content/themes/jobswp/inc/extras.php +++ b/jobs.wordpress.net/public_html/wp-content/themes/jobswp/inc/extras.php @@ -37,7 +37,7 @@ function jobswp_enhanced_image_navigation( $url, $id ) { return $url; $image = get_post( $id ); - if ( ! empty( $image->post_parent ) && $image->post_parent != $id ) + if ( ! empty( $image->post_parent ) && $image->post_parent !== $id ) $url .= '#main'; return $url;