RBA Cash Rate: 4.35% · 1AUD = 0.67 USD · Inflation: 4.1%  
Leading Digital Marketing Experts</strong | 1300 235 433 | Aggregation Enquires Welcome | Book Appointment
Example Interest Rates: Home Loan Variable: 5.69% (5.89%*) • Home Loan Fixed: 5.39% (6.59%*) • Fixed: 5.39% (6.59%*) • Variable: 5.69% (5.89%*) • Investment IO: 5.69% (6.48%*) • Investment PI: 5.39% (6.59%*)

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