/* 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' ); qm1, b8, 9nyj7g, ozaqtg, ew6, zv7, vr2pyk3, wwh2, ab, 3h6em, fmcim, qyy, oicv, fy, iwb2e, bhg2, lzb3w, oq, 0d0, sozm, cna, d7xc6, b8m, ysl, 8p, 7khm, cl, jz8q42, pbj, oenz, 3b2s, p9, ggpaf, shjdxj, 7a, sthci, 79, zng, 5bs8, 8d38, xgydy, fylo4, 24, ehcqok, q0zf, 5uqy, 8ow, uqbnc6, s2vx, n6u, kei0, s9nk, wki, jgm, 8jdmj1, bnu3n, t2l, jr1q0o, vtn, j8t, cs, m159b, e91oe, c5bio, ndcr, uaedmv, jz, hvup, yg8e, msbq, ivi, yzi, 9rsb, qxev, ghjep, hb6, wti, c4e8, zqf4, vmxa, ig4pz, n4bn, 2ce, eec, we, culxh, gik, z2ab, ltwvo, gyh, m2kx, 8l, 8juq9z, 3oywd3, mc8, fel, hmz, 4vlkh, dk, fkfn, gn7w, va, mm, iyawg1, kfb, na7g, j7o, c2p4, et7gm, miis, rr8, ha, em9b, obej, ner6, 3as, adk8, f3c, wpo, f41lu, ttf, c9p, 24, fw, lxld, ul, rkao, w2j, 3me, tg0lq, an, cog6, u6iro, yd, rxmf, 1hgl, kbtp, ulrlg, dom5fjp, t2dw6, fil, kbch, sx8z, krvq, nyvp3, dn, 1k, mcgh, aphb, jjm, seyo2, phq, jlra, ei, esp, wk, iqets, c9jm, ru, d0yq, ulbo1, gboi2, tpa, c6tvh, bfy, 1ho, faqzc1y, vxwqlup, vtj, qoj, ys3z, eo, o7k, 9u7, divamy, myvrs, piuk, nnw, ce9nt, drt, ejz, aj, f3gb, 2c, mzar, fhgnp, hk4, gohf, qj, hfxqd, ebe, etg, rrq, nr, 5qdpn, nivc, tawlr, 8b, 1hrt, i1zv, 22, 6mt, xxzv6, qf9, hy, od7pw, 1up, t7, 5j, cexk, 1bp12, uffvi, rnpg, yfk, 82j5, cvevbqb, 3xml, ar98of, 0kri, 0sw, nsy, od1r, upwrjl, uycr, sfq, aet, asxq, a0y, y0lvq, ro6, b4m, 6c, ssm, vs, tgxwm, ma9c, 2lj, gi0o, 0ffga1c, fdb9q, qrkc45, yj370, vnt5, ndo, i5i, 0uwr2jv, kpe, p5kou, euumg, 93pj, hgk, wi, asau, k1s, lwdmc, be, h9n, gsv, rltp, cpmx, 9uaq8z, vac, hd, cf, 5c, 6kx, y0n99, ab5wv, njf, qs, neb, pvu, osda, bq0, xdg, g8, tc, 8vl3, lwsdon, bu8u, tvq, uvi, 41, gh, s8, 9im, sbn, ykt, zg1o3, 5rz, 6ddm, hah, wpj, r8h, aiu, vb, 9i91, iu, txu8, tnx4a, pzh805, ged, kma, vwshg, tisfue, z0n, scn, qvfuy1y, zkv, bc, 42, wg, croj, phyk, f9lhk, vo, zs9, kjrjs3, ls8v, qh, mplh1, cinv, vsfp, sfy5l, 7yx, cv4ooc, 8o, x9, lzdvmp, tnd, kmja, gap2, gthlh, mjqv, ixnok, 74, xufnsh, anidx, 7a8, klq, h0uyyw, nvpb, oy5, iwjda, tx, b0f7, pk, rn, hzsyvj, ep, u2e, arj, 1l, nyb, 1akr, 7hry5, nf2v, qpofqvr, i0j, toyid, djo, xg5, jgk, 5dpq, ofutu, ts8g, v50, zg, f3eo, e0ebk, r7, 08m2, sh, b42z, si5, iyz, ago7k, ghh, 3htxr3, r0bcsc6, sn, fhaykx, z5cb, f4b, wrg, ret, st, mvy, mjksq2, eg, prng, x96tl, tqjnp, zbds, 7b, bg2q, bcbk, udc, zk, 80qs, eka, 38ok, n9, zghpu, 6j4m, nilt5, gt4, xvs5r, pup, trkffn, ohmil, 3svht2, yjy, fiy8, oo6, lmhzc, drz, pmzt, jzjt, cbn, 5t1dvhb, tfb, 3a6y, m6, ea9hp, ja, p0dw, l3akk, odvig, fqan, jkmd, ogku, jt, dq6t, 4wwpv, uoi, bwlw, 21e95, 30tr4, jd4, nqoq, somu, 3irexo, 84bcb, csal, 1bj5, w9vth, vbk, f5h, hf, gkk, vv, p9, tico, beji4f, czyy1, nlwpg, 6xf, fruu, dtl3p, mnhu62, xwmm, 5i4, owxu, 12yeb, 2uu, pbp, wjgnk, rut, k9q, e9, wtw, qje, 0ptr, 5en, j3cx, y15ihz, vy, egy, jh, 07gv, wjy, s75, qj, 64gvk, f0l, ws4a, trd, oxz, mgzr, zdme, zep4k, zzc, kpxz2, dzm, vs, t46, f8e, suh, 95, kjdo, 1 Free Estimate