<?php | |
function delete_all_post_count_transients() { | |
$post_types = get_post_types(); | |
$years = get_all_possible_years(); | |
$months = get_all_possible_months(); | |
foreach ( $post_types as $post_type ) { | |
foreach ( $years as $year ) { | |
foreach ( $months as $month ) { | |
$transient_key = "km_post_count_{$post_type}_{$year}_{$month}"; | |
delete_transient( $transient_key ); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment