$feeds = '(' .
trim( implode( '|',
$wp_rewrite->feeds
) ) . ')';
add_rewrite_rule( "{
$archive_slug}/feed/
$feeds/?$", "index.php?post_type=
$this->name" . '&feed=$matches[1]', 'top'
);
add_rewrite_rule( "{
$archive_slug}/
$feeds/?$", "index.php?post_type=
$this->name" . '&feed=$matches[1]', 'top'
);
} if ( $this->rewrite
['pages'
] ) { add_rewrite_rule( "{
$archive_slug}/{
$wp_rewrite->pagination_base
}/([0-9]{1,})/?$", "index.php?post_type=
$this->name" . '&paged=$matches[1]', 'top'
);
} } $permastruct_args =
$this->rewrite;
$permastruct_args['feed'
] =
$permastruct_args['feeds'
];
add_permastruct( $this->name, "{
$this->rewrite
['slug'
]}/%
$this->name%",
$permastruct_args );
} } /**
* Registers the post type meta box if a custom callback was specified.
*
* @since 4.6.0
*/
public function register_meta_boxes() { if ( $this->register_meta_box_cb
) { add_action( 'add_meta_boxes_' .
$this->name,
$this->register_meta_box_cb, 10, 1
);
}