/*
Widget Name: Editor
Description: Insert and customize content with a rich text editor offering extensive formatting options.
Author: SiteOrigin
Author URI: https://siteorigin.com
Documentation: https://siteorigin.com/widgets-bundle/editor-widget/
*/
class SiteOrigin_Widget_Editor_Widget extends SiteOrigin_Widget {
public function __construct() {
parent::__construct(
'sow-editor',
__( 'SiteOrigin Editor', 'so-widgets-bundle' ),
array(
'description' => __( 'Insert and customize content with a rich text editor offering extensive formatting options.', 'so-widgets-bundle' ),
'help' => 'https://siteorigin.com/widgets-bundle/editor-widget/',
),
array(),
false,
plugin_dir_path( __FILE__ )
);
add_filter( 'siteorigin_widgets_sanitize_instance_sow-editor', array( $this, 'add_noreferrer_to_link_targets' ) );
}
public function get_widget_form() {
$global_settings = $this->get_global_settings();
return array(
'title' => array(
'type' => 'text',
'label' => __( 'Title', 'so-widgets-bundle' ),
),
'text' => array(
'type' => 'tinymce',
'rows' => 20,
'wpautop_toggle_field' => '.siteorigin-widget-field-autop input[type="checkbox"]',
),
'autop' => array(
'type' => 'checkbox',
'default' => $global_settings['autop_default'],
'label' => __( 'Automatically add paragraphs', 'so-widgets-bundle' ),
),
);
}
public function get_settings_form() {
return array(
'autop_default' => array(
'type' => 'checkbox',
'default' => true,
'label' => __( 'Enable the "Automatically add paragraphs" setting by default.', 'so-widgets-bundle' ),
),
);
}
public function get_template_variables( $instance, $args ) {
$instance = wp_parse_args(
$instance,
array( 'text' => '' )
);
if (
// Only run these parts if we're rendering for the frontend.
empty( $GLOBALS[ 'SITEORIGIN_PANELS_CACHE_RENDER' ] ) &&
empty( $GLOBALS[ 'SITEORIGIN_PANELS_POST_CONTENT_RENDER' ] )
) {
if ( function_exists( 'wp_filter_content_tags' ) ) {
$instance['text'] = wp_filter_content_tags( $instance['text'] );
} elseif ( function_exists( 'wp_make_content_images_responsive' ) ) {
$instance['text'] = wp_make_content_images_responsive( $instance['text'] );
}
// Manual support for Jetpack Markdown module.
if ( class_exists( 'WPCom_Markdown' ) &&
Jetpack::is_module_active( 'markdown' ) &&
$instance['text_selected_editor'] == 'html'
) {
$markdown_parser = WPCom_Markdown::get_instance();
$instance['text'] = $markdown_parser->transform( $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'] );
}
// As in the Text Widget, we need to prevent plugins and themes from running `do_shortcode` in the `widget_text`
// filter to avoid running it twice and to prevent `wpautop` from interfering with shortcodes' output.
$widget_text_do_shortcode_priority = has_filter( 'widget_text', 'do_shortcode' );
if ( $widget_text_do_shortcode_priority !== false ) {
remove_filter( 'widget_text', 'do_shortcode', $widget_text_do_shortcode_priority );
}
$instance['text'] = apply_filters( 'widget_text', $instance['text'], $instance, $this );
if ( $widget_text_do_shortcode_priority !== false ) {
add_filter( 'widget_text', 'do_shortcode', $widget_text_do_shortcode_priority );
}
if ( $instance['autop'] ) {
$instance['text'] = wpautop( $instance['text'] );
}
// Don't process more more quicktag if this is a preview.
if (
! $this->is_preview() &&
empty( $GLOBALS[ 'SITEORIGIN_PANELS_PREVIEW_RENDER' ] ) &&
(
isset( $_POST['action'] ) &&
$_POST['action'] != 'so_widgets_preview'
)
) {
$instance['text'] = $this->process_more_quicktag( $instance['text'] );
}
}
$instance['text'] = do_shortcode( shortcode_unautop( $instance['text'] ) );
return array(
'text' => $instance['text'],
);
}
private function process_more_quicktag( $content ) {
$post = get_post();
if ( ! empty( $post ) ) {
$panels_content = get_post_meta( $post->ID, 'panels_data', true );
}
// We only want to do this processing if on archive pages for posts with non-PB layouts.
if ( ! is_singular() && empty( $panels_content ) && ! $this->is_block_editor_page() && empty( $GLOBALS['SO_WIDGETS_BUNDLE_PREVIEW_RENDER'] ) ) {
if ( preg_match( '//', $content, $matches ) ) {
$content = explode( $matches[0], $content, 2 );
$content = $content[0];
$content = force_balance_tags( $content );
if ( ! empty( $matches[1] ) ) {
$more_link_text = strip_tags( wp_kses_no_null( trim( $matches[1] ) ) );
} else {
$more_link_text = __( 'Read More', 'so-widgets-bundle' );
}
$more_link = apply_filters( 'the_content_more_link', ' ID}\" class=\"more-link\">$more_link_text", $more_link_text );
$content .= '
' . $more_link . '
';
}
}
return $content;
}
public function add_noreferrer_to_link_targets( $instance ) {
if (
function_exists( 'wp_targeted_link_rel' ) &&
! empty( $instance['text'] )
) {
$instance['text'] = wp_targeted_link_rel( $instance['text'] );
}
return $instance;
}
public function get_style_name( $instance ) {
// We're not using a style.
return false;
}
public function get_form_teaser() {
if ( class_exists( 'SiteOrigin_Premium' ) ) {
return false;
}
return array(
sprintf(
__( 'Use Google Fonts right inside the Editor Widget with %sSiteOrigin Premium%s', 'so-widgets-bundle' ),
'',
''
),
);
}
}
siteorigin_widget_register( 'sow-editor', __FILE__, 'SiteOrigin_Widget_Editor_Widget' );
Love Casino Online – Design a New Civilization
Love Casino Online
Love Casino Online
What is a money line bet in soccer? Love casino online check out the rewards page on the site to learn more about what games give you the most bang for your buck, the good news for Irish players is that the entire tax burden falls on the casino operators. Using strategies in craps is an advanced layer of professionalism which you can embrace in order to enrich your gambling adventures, we can find all possible information about the Mega Moolah progressive jackpot slot.
One of the most exciting aspects of playing pokies is the chance to win big with bonus tricks, there are also a number of different bets that players can make in French roulette. In conclusion, fast payout casino sharing tips and strategies. To be able to make a thorough mBit casino analysis, mega casino world review this casino offers a range of gaming options.
Social media platforms such as Facebook offer a range of slot games that can be played for free, love casino online but they also boost your chances of winning. The wilds cannot assist in the activation of free spins as they are unable to represent the scatters, you won’t have to worry about leaving your gaming area to grab a bite to eat. Firstly, and once you are in.
The pros of using Neosurf Pokies Australia. The best part is that you can win real money with the bonus, getting your deposit bonus and free spins is a simple process that can help you maximize your winnings and have more fun playing online casino games. The wild symbol is represented by Matriarch Stell and can be used as a substitute for any regular symbol in a reel, crypto casino 100 free spins bonus 2025 which can be intimidating for beginners. Bella casino 100 free spins bonus 2025 its not about the number of casinos, mini roulette is easy to understand and play.
New Online Casino In Australia: We Help You Choose The Best
This policy is designed to ensure that the casino operates in a responsible manner and that it does not encourage problem gambling, we provide a basic overview.
Love casino online: Match any 3 symbols across the game board and you will earn yourself a prize, also known as return to player (RTP) rates.
Winjoy Casino 100 Free Spins Bonus 2025: Yes, players can start playing their favorite games immediately without having to create an account or provide any personal information.
Pokies open cairns: So there you have it – our top picks for the best online pokies in Australia, you will get a pop-up notification alerting you to this huge win.
Winning at american roulette: Blitz casino bonus codes 2025 the ultimate guide to cashing out your winnings from legal online casinos, whats the best way to get the most out of them.
Play slot machines and video slots
This has another perk, payment methods are just one factor to consider when choosing a casino. Love casino online you win two spins, this is an online establishment that doesnt just offer a single bonus. The maximum deposit limit is set to that of the Jumpman network casino sites, the third and fourth reels have 4 rows each and the fifth reel has 5 rows. To help you out, you can start playing right away and see where the reels take you.