Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_default_editor [ WordPress Function ]

wp_default_editor ( No parameters )
Returns:
  • (string) Either 'tinymce', or 'html', or 'test'
Defined at:



Find out which editor should be displayed by default.

Works out which of the two editors to display as the current editor for a user.

Source


<?php
function wp_default_editor() {
    
$r user_can_richedit() ? 'tinymce' 'html'// defaults
    
if ( $user wp_get_current_user() ) { // look for cookie
        
$ed get_user_setting('editor''tinymce');
        
$r = ( in_array($ed, array('tinymce''html''test') ) ) ? $ed $r;
    }
    return 
apply_filters'wp_default_editor'$r ); // filter
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics