user_can_richedit [ WordPress Function ]
user_can_richedit ( No parameters )
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: user_can_edit_post, user_can_edit_user, user_can_create_post, user_can_edit_post_date, user_can
Whether the user should have a WYSIWIG editor.
Checks that the user requires a WYSIWIG editor and that the editor is supported in the users browser.
Source
<?php
function user_can_richedit() {
global $wp_rich_edit, $is_gecko, $is_opera, $is_safari, $is_chrome, $is_IE;
if ( !isset($wp_rich_edit) ) {
$wp_rich_edit = false;
if ( get_user_option( 'rich_editing' ) == 'true' || ! is_user_logged_in() ) { // default to 'true' for logged out users
if ( $is_safari ) {
if ( wp_is_mobile() || false !== strpos( $_SERVER['HTTP_USER_AGENT'], '; Silk/' ) )
$wp_rich_edit = ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval( $match[1] ) >= 534 );
else
$wp_rich_edit = true;
} elseif ( $is_gecko || $is_opera || $is_chrome || $is_IE ) {
$wp_rich_edit = true;
}
}
}
return apply_filters('user_can_richedit', $wp_rich_edit);
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- user_can_richedit Wordpress hook details -- Adam Brown, BYU ...
Applied to the calculation of whether the user's browser has rich editing capabilities, and whether the user wants to use the rich editor, in the user_can_richedit ...
adambrown.info - #18626 (Update user_can_richedit to allow TinyMCE with iOS5 ...
At this moment I updated my TinyMCE to 3.4.5 so it got contentEditable support for iOS5. This is not enough because you need to change user_can_richedit().
core.trac.wordpress.org - user_can_richedit (WordPress Function) - WPSeek.com
WordPress lookup for user_can_richedit, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - PHPXRef 0.7 : WordPress : Function Reference: user_can_richedit()
Function and Method Cross Reference. user_can_richedit(). Defined at: /wp- includes/general-template.php -> line 1738. Referenced 4 times: ...
phpxref.ftwr.co.uk