Metabox seems to be setting the ep_mask as a string

Support Meta Box AIO Metabox seems to be setting the ep_mask as a string

  • This topic has 1 reply, 2 voices, and was last updated 2 days ago by PeterPeter.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #49511
    Emma ClareEmma Clare
    Participant

    Metabox seems to be setting the ep_mask as a string so I added this to fix it

    /**
    * Fix MetaBox CPTs that incorrectly set ep_mask as a string.
    */
    add_action( 'init', function() {
    global $wp_rewrite;

    foreach ( $wp_rewrite->extra_permastructs as $key => $struct ) {
    if ( isset( $struct['ep_mask'] ) && $struct['ep_mask'] === 'EP_PERMALINK' ) {
    $wp_rewrite->extra_permastructs[$key]['ep_mask'] = EP_PERMALINK;
    }
    }
    }, 20 ); // run after MetaBox CPTs (priority > 10)

    #49519
    PeterPeter
    Moderator

    Hello Emma,

    Thanks for reaching out and sharing the solution.

    Currently, MB Custom Post Type doesn't support the ep_mask setting. I will share this feedback with the dev team to support this setting for future development.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.