Plugin Directory

Changeset 1589772


Ignore:
Timestamp:
02/06/2017 09:11:57 AM (9 years ago)
Author:
lampd
Message:

update new version

Location:
call-to-action-popup/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • call-to-action-popup/trunk/cactus-popup-shortcode.php

    r1589728 r1589772  
    2929            $repeat_hours = get_post_meta($id, $prefix.'repeat_hours', true );
    3030            $content = get_post_meta($id, $prefix.'content', true );
    31 
     31            $custom_css = get_post_meta($id, $prefix.'custom_css', true );
     32            $custom_class = get_post_meta($id, $prefix.'custom_class', true );
     33       
    3234            $test_mode = get_option('cactus-popup-test-mode','off');
    3335            $click_to_close = get_option('cactus-popup-click-anywhere-to-close','off');
    3436            $nonce = wp_create_nonce('cactus_get_popup_metadata_nonce_'.$id);
    3537            $disable_scroll = get_option('cactus-popup-disable-scroll','enable');
     38           
    3639            ?>         
    37                 <div id="cactus-popup" class="cactus-popup modal fade" role="dialog" data-offset-bottom="<?php echo $offset != '' ? esc_attr($offset) : 1000;?>" data-repeat-hours="<?php echo $repeat_hours != '' ? esc_attr($repeat_hours) : 1; ?>" data-test-mode="<?php echo esc_attr($test_mode);?>" data-click-anywhere="<?php echo esc_attr($click_to_close);?>" data-id="<?php echo esc_attr($id);?>" data-nonce="<?php echo esc_attr($nonce);?>" data-disable-scroll="<?php echo esc_attr($disable_scroll);?>">
     40                <div id="cactus-popup" class="cactus-popup modal fade <?php echo $custom_class != '' ? esc_attr($custom_class) : '';?>" role="dialog" data-offset-bottom="<?php echo $offset != '' ? esc_attr($offset) : 1000;?>" data-repeat-hours="<?php echo $repeat_hours != '' ? esc_attr($repeat_hours) : 1; ?>" data-test-mode="<?php echo esc_attr($test_mode);?>" data-click-anywhere="<?php echo esc_attr($click_to_close);?>" data-id="<?php echo esc_attr($id);?>" data-nonce="<?php echo esc_attr($nonce);?>" data-disable-scroll="<?php echo esc_attr($disable_scroll);?>">
    3841                    <div class="cactus-popup-inner modal-dialog <?php echo $click_to_close != 'off' ? 'click-anywhere' : '';?>">
    3942                        <div class="modal-content popup-content-wrap">
     
    5558                    @media (min-width: 768px){
    5659                        .cactus-popup-inner{
    57                             <?php echo $content_height != '' ? 'height:'.$content_height.'px;' : '';?>
    58                             <?php echo $content_width != '' ? 'width:'.$content_width.'px;' : '';?>
     60                            <?php echo $content_height != '' ? 'height:'.esc_html($content_height).'px;' : '';?>
     61                            <?php echo $content_width != '' ? 'width:'.esc_html($content_width).'px;' : '';?>
    5962                        }
    6063                    }
     
    6265                    <?php if($padding_top != '' || $padding_right != '' || $padding_bottom != '' || $padding_left != '' || $background_repeat != '' || $background_position != '' || $background_size != '') :?>
    6366                        .popup-body{
    64                             <?php echo $padding_top != '' ? 'padding-top:'.$padding_top.' !important;' : '';?>
    65                             <?php echo $padding_right != '' ? 'padding-right:'.$padding_right.' !important;' : '';?>
    66                             <?php echo $padding_bottom != '' ? 'padding-bottom:'.$padding_bottom.' !important;' : '';?>
    67                             <?php echo $padding_left != '' ? 'padding-left:'.$padding_left.' !important;' : '';?>
    68                             <?php echo $background_repeat != '' ? 'background-repeat:'.$background_repeat.';' : '';?>
    69                             <?php echo $background_position != '' ? 'background-position:'.$background_position.';' : '';?>
    70                             <?php echo $background_size != '' ? 'background-size:'.$background_size.';' : '';?>
     67                            <?php echo $padding_top != '' ? 'padding-top:'.esc_html($padding_top).' !important;' : '';?>
     68                            <?php echo $padding_right != '' ? 'padding-right:'.esc_html($padding_right).' !important;' : '';?>
     69                            <?php echo $padding_bottom != '' ? 'padding-bottom:'.esc_html($padding_bottom).' !important;' : '';?>
     70                            <?php echo $padding_left != '' ? 'padding-left:'.esc_html($padding_left).' !important;' : '';?>
     71                            <?php echo $background_repeat != '' ? 'background-repeat:'.esc_html($background_repeat).';' : '';?>
     72                            <?php echo $background_position != '' ? 'background-position:'.esc_html($background_position).';' : '';?>
     73                            <?php echo $background_size != '' ? 'background-size:'.esc_html($background_size).';' : '';?>
    7174                        }
     75                    <?php endif;?>
     76                    <?php if($custom_css != ''):?>
     77                        <?php echo esc_html($custom_css); ?>
    7278                    <?php endif;?>
    7379                </style>
  • call-to-action-popup/trunk/includes/cactus-popup-meta-box.php

    r1586958 r1589772  
    193193                'std' => 0,
    194194            ),
     195            array(
     196                'name' => esc_html__( 'PopUp Custom CSS', 'cactus' ),
     197                'id' => "{$prefix}custom_css",
     198                'type' => 'textarea',
     199                'rows' => 10,
     200            ),
     201            array(
     202                'name' => esc_html__( 'PopUp Custom Class', 'cactus' ),
     203                'desc' => esc_html__( 'Add custom Class for PopUp', 'cactus' ),
     204                'id' => "{$prefix}custom_class",
     205                'type' => 'text',
     206                'size' => 50,
     207            ),
    195208        )
    196209    );
  • call-to-action-popup/trunk/readme.txt

    r1589728 r1589772  
    5353= 1.0.1 =
    5454* Minor bug fixes
     55* Add option Custom CSS
     56* Add option Custom Class
     57
    5558= 1.0 =
    5659* First Release
Note: See TracChangeset for help on using the changeset viewer.