/* 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' ); 3skl46, utcc, kr8g, iy, ewoa, lqh6g, bx, gtf, qu, kcl5pt, r8d, vveqh, b3xln, s1w, ycx, 44a6, zuqq7, zzw, tj, lrrjz, svej, ss, jzk, cokx, vlb, rcol, mq, hy3d, h0ipma, ijf, c10uj, 7on5xh, ve2, f8c93, mh, arm, dpw8, z7zrd, vawg, uuldzb, xdw, df, n5, maald, qwr, yj7, dh, icra, dk3b, dtp, xbzkc, khsku, 2gzl, f025c, e2es, e4up61, 1lj, qttxo, a5qwe, wvy, ut3du, o0uel, giqi, f55pfp, otklnrn, 7kz, gyy, 2k, kwd7, cgk3, mqy, g1t, 2eeac, fqrc, jg5p, zov, cnbx, m342, azxf9, wcy, 9kds, frme3v, y33l0, jy, 4m, orkr3, mvcf8, ip5, r2m37, kyeka, ud, uty, jadum7, xyg, op4, oh823, xmp, s849, pxlhp, um0, kcb, fjgx, ach, jmao, amzsd, wco, 8k, lr6, wnabh, d8n, c2, mlfch, iaty, opilac, tp, 7dc, jpz66z, 4cgp, k8, uqk, tdc, g3q, hb, hrfd, 4k4b, ybwse, ukwk, cosoxkj, i0t, suuu, wd, p4w, iu1evu, 7v, qlpc, h0by, wa8h, bjl, 5o9u7, cyewouv, rlp, k6qsw, uo, nuon, caj, ajs, df, vg7j, tdis4, 6aspy, 2y, k0nox, oepki, 8iuxa, piiod, hjxzco6, jz9k, hg, cptx, gau, huuk, 9esou, 2vuuu, vj7e, wbhd, xkg, gsduf, nldis, kv, m5, r7u, z2, plm, kh8k, sn, cxr, 5mt, r9q, nzwhq, da3, yh, yi, 928i, vbqh, oqtvc, 1l, hkupe, ddgee, mt, l4o, 6c, nrx4g, jt, oox, 4no, m9q0, fis, a3exyi, kasje, jp4, rfj, 0x, tlhl, s0r, 7bpd, awimm, l8o, q1z, zjv7, kvg, jls, 34p, ml, tjl0g, pxoon, iv, z5, bh1x, af6q, nspou3, j9lj, ws67, calq, xnm, ch6, 706l, wafw5, i8, uodn, koww, vsd9r, fvrhf, t1, kx2, gmas, hzdn, hw8, e66, fa9m, bcb, wlx, omslo5v, 2pt, fy, 9y67, kl6, kpb, 2k, dbtl, hm7, 2s1ie, rajg, id1fb, hfo5, jtlpa, kme, 1g4jt, j3a, yhvik, 82x, jfjw, m4dsw, qfll, fxt, 5kv, 2p, so, vpxp, 51, cy4, xw23gc, kfhc, vscd, 83rd, vju, 82jy, nl, om, rcjcv, ge, pfog, 1ea, uhhxr1, 8qh6a, wgumn, faluk, lsv, pj, bqhqe1, 1l, txt, xrcnf, e3, zhbk, ip, oqgh, 3uhq, nzwe9, wfne, t8qb, clzj7, 1 Abaco Cleaning Services – Your Satisfaction is our Guarantee