qa
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
7 changed files
with
42 additions
and
4 deletions
| ... | @@ -18063,7 +18063,7 @@ ul.sf_date_field .sf-datepicker { | ... | @@ -18063,7 +18063,7 @@ ul.sf_date_field .sf-datepicker { |
| 18063 | } | 18063 | } |
| 18064 | .header.page .breadcrumb a { | 18064 | .header.page .breadcrumb a { |
| 18065 | text-decoration: none; | 18065 | text-decoration: none; |
| 18066 | text-transform: capitalize; | 18066 | text-transform: none; |
| 18067 | color: #fff; | 18067 | color: #fff; |
| 18068 | } | 18068 | } |
| 18069 | .header.page .breadcrumb span { | 18069 | .header.page .breadcrumb span { |
| ... | @@ -18444,7 +18444,7 @@ ul.sf_date_field .sf-datepicker { | ... | @@ -18444,7 +18444,7 @@ ul.sf_date_field .sf-datepicker { |
| 18444 | } | 18444 | } |
| 18445 | #full-width-page-wrapper .breadcrumb a { | 18445 | #full-width-page-wrapper .breadcrumb a { |
| 18446 | text-decoration: none; | 18446 | text-decoration: none; |
| 18447 | text-transform: capitalize; | 18447 | text-transform: none; |
| 18448 | } | 18448 | } |
| 18449 | #full-width-page-wrapper .breadcrumb span { | 18449 | #full-width-page-wrapper .breadcrumb span { |
| 18450 | margin: 0rem 0.625rem; | 18450 | margin: 0rem 0.625rem; | ... | ... |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
| ... | @@ -111,3 +111,41 @@ function delete_exclude_from_search() | ... | @@ -111,3 +111,41 @@ function delete_exclude_from_search() |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | } | 113 | } |
| 114 | |||
| 115 | add_action('init','update_tax_counts'); | ||
| 116 | function update_tax_counts() | ||
| 117 | { | ||
| 118 | if ($_GET['var'] =='update_tax_counts') { | ||
| 119 | |||
| 120 | include("wp-config.php"); | ||
| 121 | |||
| 122 | $conn = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD); | ||
| 123 | |||
| 124 | if (!mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD)) { die('Could not connect: ' . mysqli_error()); } | ||
| 125 | if (!mysqli_select_db($conn,DB_NAME)) { die('Could not connect: ' . mysqli_error()); } | ||
| 126 | |||
| 127 | $result = mysqli_query($conn, "SELECT term_taxonomy_id FROM ".$table_prefix."term_taxonomy"); | ||
| 128 | while ($row = mysqli_fetch_array($result)) { | ||
| 129 | $term_taxonomy_id = $row['term_taxonomy_id']; | ||
| 130 | echo "term_taxonomy_id: ".$term_taxonomy_id." count = "; | ||
| 131 | $countresult = mysqli_query($conn, "SELECT count(*) FROM ".$table_prefix."term_relationships WHERE term_taxonomy_id = '$term_taxonomy_id'"); | ||
| 132 | $countarray = mysqli_fetch_array($countresult); | ||
| 133 | $count = $countarray[0]; | ||
| 134 | echo $count."<br>"; | ||
| 135 | mysqli_query($conn, "UPDATE ".$table_prefix."term_taxonomy SET count = '$count' WHERE term_taxonomy_id = '$term_taxonomy_id'"); | ||
| 136 | } | ||
| 137 | |||
| 138 | $result = mysqli_query($conn, "SELECT ID FROM ".$table_prefix."posts"); | ||
| 139 | while ($row = mysqli_fetch_array($result)) { | ||
| 140 | $post_id = $row['ID']; | ||
| 141 | echo "post_id: ".$post_id." count = "; | ||
| 142 | $countresult = mysqli_query($conn, "SELECT count(*) FROM ".$table_prefix."comments WHERE comment_post_ID = '$post_id' AND comment_approved = 1"); | ||
| 143 | $countarray = mysqli_fetch_array($countresult); | ||
| 144 | $count = $countarray[0]; | ||
| 145 | echo $count."<br>"; | ||
| 146 | |||
| 147 | mysqli_query("UPDATE ".$table_prefix."posts SET comment_count = '$count' WHERE ID = '$post_id'"); | ||
| 148 | } | ||
| 149 | } | ||
| 150 | } | ||
| 151 | ... | ... |
| ... | @@ -267,7 +267,7 @@ padding-bottom: 0px; | ... | @@ -267,7 +267,7 @@ padding-bottom: 0px; |
| 267 | margin-bottom: 0.25rem; | 267 | margin-bottom: 0.25rem; |
| 268 | a{ | 268 | a{ |
| 269 | text-decoration: none; | 269 | text-decoration: none; |
| 270 | text-transform: capitalize; | 270 | text-transform: none; |
| 271 | } | 271 | } |
| 272 | span{ | 272 | span{ |
| 273 | margin: 0rem 0.625rem; | 273 | margin: 0rem 0.625rem; | ... | ... |
-
Please register or sign in to post a comment