Passing arguments into ‘init’ function
The one thing you are missing is the use of use (http://php.net/manual/en/functions.anonymous.php example #3) You code will look something like //define post type name $pt_name=”post”; //remove default wysiwyg editor add_action(‘init’, function() use ($pt_name) { $post_type = $pt_name; remove_post_type_support( $post_type, ‘editor’); }, 100); This will let PHP know what is the currect scope to use when … Read more