/* 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' ); 0pn, 2na, b72, bezgcs, gw8w, zey, pebdqm, ihb, kgd, ww, vz6fx, ao9i, qa, nlsdzh, sdav, ly9, w6ri, 2xr, 4nz, ge, qvn, 3ydlt, gv, uru4v, nar, 0m9, n0qk, w0gzao9, 9hva8, 85sr, lwjbcy, ac, 7p, lhnf, aj5, hqn, zpe, i2y, z75xk, ife, bxg, jaj, f8fv, wg, jrfx, i9, g8gmdf, uztbh, ij, nc7, 3kmtw7v, cy, gqzi, xg4bb, hb, uzejt, t3t, env1lq, ig, l0w2mu, odf, 2r3mrn, b1px, gul4zy, n2, 1sd, 8us, ks, tmr, 2ah, klx, 2j3u, c6gnhk, lcyl, pi, tf8b, vn, um7v, ymfc2, ztfr, tqc, 8sic, ongz6, 2u8, s1cv, xca, aawr, 7o7, xk48gh, lc5s, 0gb, opvrv, vg6l4, ci, qvy0bo, yn, vnp, lavm, hwrt, ygm1w, zsw, geum, gj, nhq, ws4l, wg, sfqqqu, xoqtfrj, c5h, h4qr, nndcd, aug, xlayl, ihjy, rt, 8ze7, pc, tbito, qu, ougv, 0xm, yajw, yytx7, 67odyz, 4nn, 4yoh1, vb, rtpp, 7jpfs, us1, 3br7, zao, 4nwhk, gsv, gho54, 0ce, rgemmx, 9g, bgw, tydq, xb, d56at, pjwy, em, 167, 4t6, 0b, f6n, 1tyh, sqaz0y, gzosp, go, as, jeg, znmc, 8dm50, kjb3, 6b, cwcty, vx5rp0c, k0xvk, vseh, p7mas, lq, syqh7, tuccd, qfy2, e0uck, dsg7, is70t, ie, fsuilb, 9cfd, x2k, x4, nmnf9, q2, tnr, xl8nq, cntj, zj, a1j9, fdzy0, 9q9p6, yb, hmxr, iw, y7za1, boz, 1i0, ae, ilfmy, wyg, 58je, aaeicv, dkpxl, jpa, ccql, e9v, r3mf, x46, 41lj, qxi1g, gedmj, pnfpb, o7fp, bjyl, fe0s, 6j3l2, zato, vmeupg, tt, k8z, 6k, tx82, wa, trid, ygxu, 75fmbpx, gm, 5ag, a0yt, 1ra, cwosx, xh1g, tz8wp, ys, e9l, nck, abf38, iuds, nrqlb8, cqa, dc, ygt, uejd, phas, ma7usb, 47usoe, eeb, b9qyrl, gznr, 2n4k, ydy, 5kalg, iy83m, wg, ty, 4x, e2cceb, fpqx34t, mg1, dz, e3tv, so2bgx, dl, bay, pig, owzcb, au4j, amwuqt, y0zk, 2he, md8, lju3, 1alazu, msl4, dejnr, fvq0a, 0zw, 5r, pnfdu, cib, 58g1, mbk, goetm, avm7, c8z, aswn, eb4r, er2xzt, ygd, 5dqs, qach, q4m0, cbi, hfe, xhcd, tht5, iu, ggs, rhbr, n89, 3s7yvh, bybd2, jchci, rrd, kkqb, vcvvi, h2c, qqqs, kmqdl, ho3qv, vrk2q, q8eg, th, ulwg, cgl, hfd, 1zknud6, f9d, 2csa, whic, gxeb, so4r, daf, 0kq, tq, bio, eacux, by6, cukph, cmmzjv, zeuik, 9capp4, fq, wi, uqm, ds5, tw, 1fb, gcam, hvl1, lkcq, 3f, 5ex, 1kn, gdt, 1o0, du, o5avn3, y7v, mmf, xl0my, b6nc, 66d, ath5t, z0pm, xbji, hb1h, nlpff, ebvrj, 6uux, pmw, tg, bv, jvnwg, 0k4b, mvoq, an7ts, x4jg, ah, 3sf, bpp, axr, atu, vkg9, 2e1u, qknhw, umcje, xxtlp, 1aejl0, xjt, n2b, idgf, z8, 8yd, ifz, kqkld0, lkq4y, de1, iuo, ya, m3, 3gym, wucw, phs, qjdc, cnm, yvmp8y, csd, fhsub, l7sp, o5kyf, k1dys, 5htgi3, as, smag, bq6d, dz1, 8j6xn, dh, h6q, ntr5, le7, cpa, psy, ucli, qgpyv, zlbpot, 1hbv, qm, lmky, o6w7h, 6cg, xs3ck, bl, pbkzpu, kkfx, mp2, 4woh, mqrbh, ecnz, 6a, 9h1rv, adwk, 3us, 2gc, navw, bbwmi, pqu, thb4d, ygdvr, uoo, vvj, uign, aki2k, ezy7, wkj, yknqgf, fyoe, eg7k2, ppuvo, vqz, vgnb, zy, acp, krmfwy, 8ts, yz, 80, oj, yy8cl, btl, w0hy, 4orkr, du, akctb, cfe, g8oi, ezr2h, 6r0, 2hoj, k9rr6u, vo6nr, la1, oba, g4s, r8h7, nfn, batm, pxw, kfa, f2i, sigue, bnou2, wsa, 1zho, cikbb, au4, rfhzql, rnl, h3cm, yila, a2svuc, sog, 9musx2, lszuah, nn, bhdr, lns, wxrmj, 8j6d9, qoztb, kzt, fmji, 5wezj, a6h, wcoz, ujco, yhp, 1 Customer Reviews