RBA Cash Rate: 4.10% · 1AUD = 0.63 USD · Inflation: 2.4%  
Leading Digital Marketing Experts | 1300 235 433 | Aggregation Enquires Welcome | Book Appointment
Example Interest Rates: Home Loan Variable: 5.43% (6.02%*) • Home Loan Fixed: 4.99% (5.91%*) • Fixed: 4.99% (5.91%*) • Variable: 5.43% (6.02%*) • Investment IO: 5.59% (6.66%*) • Investment PI: 4.99% (5.91%*)

Force Rich WordPress Editor in WP Plugins

While building a plugin we wanted to force the rich editor for all users - even those that disabled it in their user options. While we used it in a plugin, it can obviously be used anywhere that the wp_editor is used.

1
<?php 
2
/*
3
 Overwrites user_can_richedit()
4
 @return bool
5
 http://www.beliefmedia.com/code/wp-snippets/force-rich-editor
6
*/
7
 
8
add_filter('user_can_richedit', 'beliefmedia_force_rich_editor', 999999);
9
wp_editor($content, $editor_id);
10
remove_filter('the_content', 'beliefmedia_force_rich_editor');
11
 
12
/*
13
 Overwrites user_can_richedit()
14
 @return bool
15
*/
16
 
17
function beliefmedia_force_rich_editor(){
18
  return true;
19
}

■ ■ ■

 
Download our complimentary 650-page guide on marketing for mortgage brokers. We'll show you exactly how we generate billions in volume for our clients.
Finance Guide, Cropped Top and Bottom
  Timezone: 1 · [ CHANGE ]

Like this article?

Share on Facebook
Share on Twitter
Share on Linkdin
Share on Pinterest

Leave a comment