refactor: rename unregister_post_type function
Renamed unregister_post_type to process_unregister_post_type to enhance readability and clarity regarding its purpose. This change ensures that the function's name better reflects its role in handling the unregistration process of the post type based on customizer settings. No change in functionality was introduced. Resolves ambiguity for future maintenance.
This commit is contained in:
parent
acdff85d5a
commit
1c631f5a47
1 changed files with 2 additions and 2 deletions
|
@ -1052,7 +1052,7 @@ function customize_register($wp_customize) {
|
|||
|
||||
add_action('customize_register', 'customize_register');
|
||||
|
||||
function unregister_post_type() {
|
||||
function process_unregister_post_type() {
|
||||
// Get the customizer setting
|
||||
$disable_posts = get_theme_mod('disable_posts', false);
|
||||
|
||||
|
@ -1062,7 +1062,7 @@ function unregister_post_type() {
|
|||
}
|
||||
}
|
||||
|
||||
add_action('init', 'unregister_post_type', 20);
|
||||
add_action('init', 'process_unregister_post_type', 20);
|
||||
|
||||
function remove_post_menu_item() {
|
||||
$disable_posts = get_theme_mod('disable_posts', false);
|
||||
|
|
Loading…
Reference in a new issue