关于函数。php
function disallowed_admin_pages() {
global $pagenow;
# Check current admin page.
if ( $pagenow == \'post.php\' && isset( $_GET[\'post\'] ) && $_GET[\'action\'] == \'edit\' && (get_post_type( $_GET[\'post\']) ==\'Post_type\' )) {
wp_redirect( admin_url( \'/edit.php?post_type=post_type&page=page_to_redirct&post=\'.$_GET[\'post\'] ) );
exit;
}
}
add_action( \'admin_init\', \'disallowed_admin_pages\' );
已在函数中创建page\\u to\\u重定向。php