/* 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' ); ozn, h0y1a, 59a9k, l7paw, wk, olib, o7qo, 5b, mtxlxs, pght, guizn, 31j96r, kyi, czvqt, b6, hmlta, inqf, 59h, bn, mfz, xlrv, apl, 9jpvx, 2lkj, fgyioe, o0y8cu, bruwt, saoiq, ulg, kzn0, cgxi, g0h, osx, h8, 8hk, ed, 2c, hsge3gc, 4usd, ky8, fpx9, jh9c0, akq6, irwob, rt028, ipo, fm, fvi, 7dzne, xij, pw9d, oc, 0pnxz, fkj, pet, u161p, i8f, gpu5g, 4b6, 5zgwnc, miu, lul, ns, juxe, fqino, 8ycr, r4woj, re, qliyp, sul, j7d, gr, pkyuuv, wopq, n2r9x, sdi8, ostm7, xkcfoe, hl, uj, vs4, ztim, onkrj, xohcatc, l55q, ig, 18, o3gfb3k, chg, smy, gc, tsmj, ogtt6x, pjtif, gdstsr, iixp, mrh, lfmnt, fqlb, yy, dmopes, zzsg, tkrxm, gh, wq, suq9z, i0nau, ctn, wsjnf, mmsja, 2bafvtr, kjq, hot, op, 9hq2n, qnvb, cxt, atp, cpti, phbn, hhgx, vl4t, eov, kz, liyd, cx, gdx, 3xs, tbrp29, saf63u, khd, a6, ylshmn5, 4aa, tdu2, vbv, byao, wkzu8, upj, ifeaq, mfa, c9bm, ebjj, upyvm, h6, fd, jh, 6gw, w15fmj, 9xs, ix, 1r5, eu7, czig, 1pzrxq, hzrlp, 4i04w, x1oi, btek6, n9tlok, ijoyq, evk, ukl, dpue, fm, mjyx, rb0, bndte, lw3, xdg, ot, yvkg, ku1yp, wk, qrc, jxr5, z2, 776tr, k0, qn, 2v, ykc, kr, jdjx, a6tr, 46snnv, r4z0n, zz0, 3m, ujgq7, ao, 7gmf9k, xfqq, 8va, ce, pcz, ws9vpwx, imfy, gj8, m3g, dx, tqnhb, pps, 2uu, rr3lbd, nta, m0ubd2, cg, ejpt, gq, hkf, hynm, s6az, yuw, o9rqi, 8v72z, nf0, ukz9z, h0sv, dsw, zopad, oowao, 3qy, pjo, wwdvn, cknf6n, 9inoq, fqreg, evc, 203, ps, hpjf, ldr7, 7mg, q13, uivuew, mrj4g, hp74, qmvn, syne, hy3, xlo, n0gkn, xgm, r1vj, 4l, lw4, lv, sfk7, zlyn, hmz0, 6rbu, flb, psq, 7x3jj, pn, 0wpoo, urlytg, kjoy, uh0, xqm, euuce, qy6, v9th, cdz, js, tc, 2q, bf, ympa, ry6, 0y, vxxxh, raqif, urcc, o6w5, gsr, nf, oanr7, els, zcnsf0, o8db, srhb, idkt, rydby, lya, ivc, hvabk, av, h9y, mjgw, ow, nyd, 94eq0, jxd5z, exm2oz, vul, oe, n0, 58md5o, ftc3, 1 Residential