Forum Replies Created

Viewing 1 replies (of 1 total)
  • We ran into this issue too, it turned out it was related to a new feature introduced in 4.3 that allows customization of the “Featued Image” labels for a specified post type.

    If you are using the “post_type_labels_post” filters somewhere in your code (usually to give the default post types a custom name), make sure you add these newly added labels, or the metabox will not be displayed:

    // Change default post labels
    add_filter( 'post_type_labels_post', function( $old_labels ) {
    
      $labels = new stdClass;
    
      $labels->name = __( 'News', 'namespace' );
      $labels->singular_name = __( 'News item', 'namespace' );
      $labels->add_new = __( 'New news item', 'namespace' );
      $labels->add_new_item = __( 'Add news item', 'namespace' );
      $labels->edit_item = __( 'Edit news item', 'namespace' );
      $labels->new_item = __( 'New news item', 'namespace' );
      $labels->view_item = __( 'View news item', 'namespace' );
      $labels->search_items = __( 'Search news items', 'namespace' );
      $labels->not_found = __( 'No news items found', 'namespace' );
      $labels->not_found_in_trash = __( 'No news items found in trash', 'namespace' );
      $labels->name_admin_bar = __( 'New news item', 'namespace' );
      $labels->all_items = __( 'All news items', 'namespace' );
    
      // Newly add in WP 4.3:
      $labels->featured_image = __( 'Featured image', 'namespace' );
      $labels->set_featured_image = __( 'Set featured image', 'namespace' );
      $labels->remove_featured_image = __( 'Remove featured image', 'namespace' );
      $labels->use_featured_image = __( 'Use as featured image', 'namespace' );
    
      return $labels;
    
    } );

    (edit: added remove_featured_image and use_featured_image)

Viewing 1 replies (of 1 total)