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

Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813
PUM_CF7_Integration::editor_panel( object $args )

Render the popup tab.


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

Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813

Parameters Parameters

$args

(Required)


Top ↑

Source Source

File: includes/integrations/class-pum-cf7.php

	public static function editor_panel( $args ) {

		$settings = self::form_options( $args->id() ); ?>
        <h2><?php _e( 'Popup Settings', 'popup-maker' ); ?></h2>
        <p class="description"><?php _e( 'These settings control popups after successful form submissions.', 'popup-maker' ); ?></p>
        <table class="form-table">
            <tbody>
            <tr>
	            <th scope="row">
		            <label for="wpcf7-pum-closepopup"><?php _e( 'Close Popup', 'popup-maker' ); ?></label>
	            </th>
	            <td>
		            <input type="checkbox" id="wpcf7-pum-closepopup" name="wpcf7-pum[closepopup]" value="true" <?php checked( $settings['closepopup'], true ); ?> />
	            </td>
            </tr>
            <tr id="wpcf7-pum-closedelay-wrapper">
	            <th scope="row">
		            <label for="wpcf7-pum-closedelay"><?php _e( 'Delay', 'popup-maker' ); ?></label>
	            </th>
	            <td>
		            <?php if ( strlen( $settings['closedelay'] ) >= 3 ) {
			            $settings['closedelay'] = $settings['closedelay'] / 1000;
		            } ?>

		            <input type="number" id="wpcf7-pum-closedelay" min="0" step="1" name="wpcf7-pum[closedelay]" style="width: 100px;" value="<?php echo esc_attr( $settings['closedelay'] ); ?>" /><?php _e( 'seconds', 'popup-maker' ); ?>
	            </td>
            </tr>
            <tr>
                <th scope="row">
                    <label for="wpcf7-pum-openpopup"><?php _e( 'Open Popup', 'popup-maker' ); ?></label>
                </th>
                <td>
                    <input type="checkbox" id="wpcf7-pum-openpopup" name="wpcf7-pum[openpopup]" value="true" <?php checked( $settings['openpopup'], true ); ?> />
                </td>
            </tr>
            <tr id="wpcf7-pum-openpopup_id-wrapper">
                <th scope="row">
                    <label for="wpcf7-pum-openpopup_id"><?php _e( 'Popup', 'popup-maker' ); ?></label>
                </th>
                <td>
                    <select id="wpcf7-pum-openpopup_id" name="wpcf7-pum[openpopup_id]">
						<?php foreach ( self::get_popup_list() as $option ) { ?>
                            <option value="<?php echo esc_attr( $option['value'] ); ?>" <?php selected( $settings['openpopup_id'], $option['value'] ); ?>><?php echo $option['label']; ?></option>
						<?php } ?>
                    </select>
                </td>
            </tr>

            </tbody>
        </table>
        <script>
            (function ($) {
                var $open = $('#wpcf7-pum-openpopup'),
                    $close = $('#wpcf7-pum-closepopup'),
                    $popup_id_wrapper = $('#wpcf7-pum-openpopup_id-wrapper'),
                    $delay_wrapper = $('#wpcf7-pum-closedelay-wrapper');

                function check_open() {
                    if ($open.is(':checked')) {
                        $popup_id_wrapper.show();
                    } else {
                        $popup_id_wrapper.hide();
                    }
                }

                function check_close() {
                    if ($close.is(':checked')) {
                        $delay_wrapper.show();
                    } else {
                        $delay_wrapper.hide();
                    }
                }

                check_open();
                check_close();

                $open.on('click', check_open);
                $close.on('click', check_close);
            }(jQuery));
        </script>
		<?php
	}


Top ↑

User Contributed Notes User Contributed Notes

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