Ich möchte Standard-WP-Editor ändern, um Folgendes zu tun:
Ich habe es wie folgt versucht:
false, 'wpautop'=> false, 'textarea_rows' =>5 ); wp_editor( $content, $editor_id, $settings);
?>
Und bei functions.php:
/** * Additional capabilities for profile user (Role: subscriber). * We will allow subscriber to post from frontend. * That's why these additional capabilities are required. */ function profile_user_caps() { return array( 'upload_files', // allow to use media uploader 'edit_posts', // allow to upload and attach files to post 'delete_posts', // allow to delete attachemnts ); } /** * Assign capabilities for subscriber role. */ add_action('init', 'subscriber_caps_as_profile_user'); // we might need to fire this function manually for once. function subscriber_caps_as_profile_user() { $role = get_role('subscriber'); $required_caps = profile_user_caps(); foreach ($required_caps as $cap) { $role->add_cap($cap); $role->add_cap($cap); } }
Jetzt kann ich den Media-Button sehen, aber wenn ich versuche, das Bild als Abonnent hochzuladen, sehe ich:
Sorry, you are not allowed to attach files to this post.
Und Design wurde gebrochen, wie zum Beispiel: Schließen Sie die Taste, um den Standardstil zu verlieren.
Irgendeine Idee oder ein Plugin?