Smart Post Show Pro

  1. Home
  2. Docs
  3. Smart Post Show Pro
  4. Hooks: Actions and Filters

Hooks: Actions and Filters

1. How to Change plugin Name

add_filter( 'sp_post_carousel_post_type_labels', 'sp_show_change_menu_name' );
/**
 * Change plugin menu name.
 *
 * @param array $labels The labels.
 * @return string
 */
function sp_show_change_menu_name( $labels ) {
    unset( $labels['menu_name'] );
    $new_menu_name = array( 'menu_name' => __( 'My Plugin', 'smart-post-show' ) );
    return array_merge( $new_menu_name, $labels );
}