Skip to content

Instantly share code, notes, and snippets.

@rgadon107

rgadon107/Triggers.php

Last active Feb 8, 2018
Embed
What would you like to do?
Change contextual description for Click Open trigger Extra CSS Selectors custom field
<?php
// In '/Popup-Maker-release-1.7/classes/Triggers.php’, targeting lines 132 - 148.
// Target the following array element for change:
// $triggers[‘click_open’][‘fields’][‘general’][‘extra_selectors’][‘desc’];
// see lines 19 & 20 below.
/**
* Registers all known triggers when called.
*/
public function register_triggers() {
$triggers = apply_filters( 'pum_registered_triggers', array(
'click_open' => array(
'name' => __( 'Click Open', 'popup-maker' ),
'modal_title' => __( 'Click Trigger Settings', 'popup-maker' ),
'settings_column' => sprintf( '<strong>%1$s</strong>: %2$s', __( 'Extra Selectors', 'popup-maker' ), '{{data.extra_selectors}}' ),
'fields' => array(
'general' => array(
'extra_selectors' => array(
'label' => __( 'Extra CSS Selectors', 'popup-maker' ),
'desc' => __( '<p>' . 'Use this feature when you cannot modify attributes on the HTML element you want to set as a popup trigger. The field above accepts single or multiple CSS class and id attributes, or CSS selectors strung together. Separate multiple selectors using commas.' . '</p>' .
'<p><strong>' . 'Related article' . '<strong>' . ': ' . '<a href="http://docs.wppopupmaker.com/article/144-trigger-click-open?utm_source=plugin-page-popup-editor=&utm_medium=inline-doclink&utm_campaign=ContextualHelp&utm_content=extra-selectors\">' .
'Trigger: Click Open. Refer to ‘Method #2: Extra Selectors.’' . '</a></p>', 'popup-maker' ),
'placeholder' => __( '.my-class, #button2', 'popup-maker' ),
'doclink' => 'http://docs.wppopupmaker.com/article/147-getting-css-selectors?page-popup-editor=&utm_medium=inline-doclink&utm_campaign=ContextualHelp&utm_content=extra-selectors',
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.