Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
PUM_Model_Popup::get_triggers()


Description Description


Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808

Return Return

(array)


Top ↑

Source Source

File: classes/Model/Popup.php

	public function get_triggers() {
		$triggers = $this->get_setting( 'triggers', array() );

		// Automatically add click trigger when on the front end.
		if ( ! is_admin() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
			$has_click_trigger = false;

			foreach ( $triggers as $trigger ) {
				if ( $trigger['type'] == 'click_open' ) {
					$has_click_trigger = true;
				}
			}

			if ( ! $has_click_trigger && apply_filters( 'pum_add_default_click_trigger', true, $this->ID ) ) {
				$triggers[] = array(
					'type'     => 'click_open',
					'settings' => array(
						'extra_selectors' => '',
						'cookie_name'     => null,
					),
				);
			}
		}

		return apply_filters( 'pum_popup_get_triggers', $triggers, $this->ID );
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.