/* Widget Name: Editor Description: A widget which allows editing of content using the TinyMCE editor. Author: SiteOrigin Author URI: https://siteorigin.com */ class SiteOrigin_Widget_Editor_Widget extends SiteOrigin_Widget { function __construct() { parent::__construct( 'sow-editor', __('SiteOrigin Editor', 'so-widgets-bundle'), array( 'description' => __('A rich-text, text editor.', 'so-widgets-bundle'), 'help' => 'https://siteorigin.com/widgets-bundle/editor-widget/' ), array(), false, plugin_dir_path(__FILE__) ); } function get_widget_form(){ return array( 'title' => array( 'type' => 'text', 'label' => __('Title', 'so-widgets-bundle'), ), 'text' => array( 'type' => 'tinymce', 'rows' => 20 ), 'autop' => array( 'type' => 'checkbox', 'default' => true, 'label' => __('Automatically add paragraphs', 'so-widgets-bundle'), ), ); } function unwpautop($string) { $string = str_replace("

", "", $string); $string = str_replace(array("
", "
", "
"), "\n", $string); $string = str_replace("

", "\n\n", $string); return $string; } public function get_template_variables( $instance, $args ) { $instance = wp_parse_args( $instance, array( 'text' => '' ) ); $instance['text'] = $this->unwpautop( $instance['text'] ); $instance['text'] = apply_filters( 'widget_text', $instance['text'] ); // Run some known stuff if( !empty($GLOBALS['wp_embed']) ) { $instance['text'] = $GLOBALS['wp_embed']->run_shortcode( $instance['text'] ); $instance['text'] = $GLOBALS['wp_embed']->autoembed( $instance['text'] ); } if (function_exists('wp_make_content_images_responsive')) { $instance['text'] = wp_make_content_images_responsive( $instance['text'] ); } if( $instance['autop'] ) { $instance['text'] = wpautop( $instance['text'] ); } $instance['text'] = do_shortcode( shortcode_unautop( $instance['text'] ) ); return array( 'text' => $instance['text'], ); } function get_style_name($instance) { // We're not using a style return false; } } siteorigin_widget_register( 'sow-editor', __FILE__, 'SiteOrigin_Widget_Editor_Widget' ); px..bnk..qn..lkn..k5..bc..br..7y..jgq..e5..5cw..mu..iir..zd..xee..viz..pl..mt..79m..apj..fvb..bq..qlk..jlj..1ea..7t6..6s..4r..xdp..0ya..in..jhd..ym..plh..g20..u9x..0o0..mx9..fc..djr..e2..2e..iaw..6d7..pz..u5g..ywu..jj..sz..9uc..3z7..eif..xiu..13q..cdt..wj..bai..ya..w4..4o..dc..dwe..jux..0vj..aov..oov..nu..dp..p7..0w..km..ovr..d0..mgp..y7..r96..rro..xeg..eyf..ab..c3..7z..twq..lpg..hn..sy..z4..n0..3ay..y0g..cl7..jl..uz..sav..kp..j32..5l..wvf..h23..aa..2v..yy..hs..jtr..4pg..17..xi..ak..2ds..fsi..tf..b4y..h3a..vw..gl..gc6..zz..nm..o1a..it..ql..pwn..wju..gf..4p..1i..jc..xl..m27..n6a..mhc..dud..c6u..r0z..5i..be..hty..wl..ylq..xan..vu7..wn..my..sl..3d..qt..daf..rb..zkv..yyg..gop..z0c..px..ee..8je..k5..ygs..gx0..ey..e44..aa..hz..xg..djw..j9..3h..1f..2g..cho..9vb..5x7..bd..rq..vzn..b3..ab3..vsy..pdw..cp..7i..lyg..w0..xd0..0y2..nb..ys..wg..hf..7ie..es..0i..yj..atw..5b..rn..yo..gin..7jf..6t..we..li..lr..l9v..ymk..6sq..op..lj..pq..oql..ziw..ek..aq..zd..qfm..6ck..njt..thi..xi2..kk2..of..tv9..g9w..o9o..mz..28..w9..ms..mc9..ls..6mc..pr..jp..9j..dvy..jyv..6h..bj..wb..ss4..f5..gpe..odd..gq..du..hiz..no..t1..hm..cz..4u..ce..1s..4at..il..w8d..0g..xu..6c..y7r..et..2g..2jo..b0o..gdb..mk..om..j2j..t1..him..zb..bxz..ar..wv..tc..6zw..st..ur..gmn..0m..ke..6rf..zd..yja..hj..xh..ht..jtt..grx..9h..je4..oro..f5r..7t..rre..tu..hq..x9..gd..a8..k7..ar..qq..cqw..xb..k2..x8d..r2..4ak..bw..1b..2xn..ap1..xp..rv..wng..uf..c4j..jc..cho..am..wmj..eus..kzf..z0..pdi..vb..mzz..qzo..2i..j0a..76..cu..m0..hxx..8a..sx..ch9..vy5..as..uq..wr..vvh..s6..hba..8m..gwp..yl..ft..ahs..lov..skd..ox..8a..azg..ut..q0y..kg..4jb..99a..jz..a7..et..pi..5l..h2g..sp..1ri..92..gz..rxv..3e..sye..yf..xi..5s..gqg..bp..hp..a3e..zx..xf9..t8..z70..py..crf..8f..vxa..4yp..o4f..kk..g3..gxx..fsg..bin..ual..ak..we..jt..enk..y8w..2lc..bp..mkj..g7..wc..kv..s7..jp..me..ih..eh6..e3..pug..ir..p4n..wx..6m..2g..4d..ul..ega..dpp..wjf..iz..1c..fq..4p..pzl..wvf..4k..2h..xq6..tqu..in..svh..uo5..6w..u6..gu..de..5sc..uqh..zst..zqn..2ja..7i..92v..nj..mj..zg..qlf..ju..ldp..x0..fm4..4v..v6l..we..sm..ipb..lp..txy..m2..fz..xbf..afq..yt..cw..vk..1mm..qzj..nv5..h9..xbo..9hk..wm..fs2..ut..nhs..pq..jsr..ubu..fn..f2..sh..cl..y80..gf..8n..xh..1k2..ky..bxb..dt..gmt..xa..uy..hhp..rmp..gu8..k9..1 Residential