Last active
December 13, 2023 13:25
-
-
Save tdmrhn/e6102f298566e8dd7ab2229cb4479f62 to your computer and use it in GitHub Desktop.
Blocksy Rename Product Reviews Extension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'init', function () { | |
global $wp_post_types; | |
if ( isset( $wp_post_types['blc-product-review'] ) ) { | |
$wp_post_types['blc-product-review']->label = 'Product Reviews'; | |
$wp_post_types['blc-product-review']->labels->name = 'Product Reviews'; | |
$wp_post_types['blc-product-review']->labels->singular_name = 'Product Review'; | |
$wp_post_types['blc-product-review']->labels->menu_name = 'Product Reviews'; | |
$wp_post_types['blc-product-review']->labels->all_items = 'All Product Reviews'; | |
$wp_post_types['blc-product-review']->labels->add_new = 'Add Product Reviews'; | |
$wp_post_types['blc-product-review']->labels->add_new_item = 'Add Product Review'; | |
$wp_post_types['blc-product-review']->labels->edit_item = 'Edit Product Review'; | |
$wp_post_types['blc-product-review']->labels->new_item = 'Product Review'; | |
$wp_post_types['blc-product-review']->labels->view_item = 'View Product Review'; | |
$wp_post_types['blc-product-review']->labels->search_items = 'Search Product Review'; | |
$wp_post_types['blc-product-review']->labels->not_found = 'No Product Review Found'; | |
$wp_post_types['blc-product-review']->labels->not_found_in_trash = 'No Product Review Found in Trash'; | |
// Update description | |
$post_type_object = get_post_type_object('blc-product-review'); | |
if ($post_type_object) { | |
$post_type_object->description = 'This post type is used for managing product reviews on the site.'; | |
} | |
} | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment