Plugin Directory

Changeset 2236006


Ignore:
Timestamp:
01/30/2020 07:21:34 PM (6 years ago)
Author:
sparklit
Message:

Fixed editing widget in customize mode

Location:
adbutler/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • adbutler/trunk/adbutler.php

    r2161604 r2236006  
    55Plugin URI: https://wordpress.org/plugins/adbutler
    66Description: AdButler ad management system integration plugin. Simplify deployment of your ad zones with this highly effective manner of deploying your publishing needs
    7 Version: 1.25
     7Version: 1.26
    88Author: AdButler
    99Author URI: http://www.adbutler.com
     
    2323define( 'ADBUTLER_CACHEURL', ADBUTLER_URLPATH . 'cache/' );
    2424define( 'ADBUTLER_ADSERVE_URL','https://adbutler.com/external_request.spark');
    25 define( 'ADBUTLER_PLUGIN_VERSION', '1.25');
     25define( 'ADBUTLER_PLUGIN_VERSION', '1.26');
    2626
    2727
  • adbutler/trunk/includes/adbutler_plugin.class

    r2161604 r2236006  
    103103                $this,
    104104                'enqueue_blog_scripts'
    105             )
    106         );
    107         add_action(
    108             'admin_footer', array(
    109                 $this,
    110                 'setup_js_params'
    111105            )
    112106        );
     
    270264    public function enqueue_admin_scripts($hook)
    271265    {
    272         wp_enqueue_script(
     266        wp_register_script(
    273267            'adbutler_script', plugins_url("../js/adbutler.js", __FILE__), array(
    274                 'jquery-ui-button',
    275                 'jquery',
    276                 'jquery-ui-spinner',
    277             ), ADBUTLER_PLUGIN_VERSION, true
    278         );
    279 
    280         wp_enqueue_style('adbutler_css', plugins_url('../css/adbutler.css', __FILE__), [], ADBUTLER_PLUGIN_VERSION);
    281     }
    282 
    283     public function setup_js_params()
    284     {
     268            'jquery-ui-button',
     269            'jquery',
     270            'jquery-ui-spinner',
     271        ), ADBUTLER_PLUGIN_VERSION, true
     272        );
     273
    285274        $params = array(
    286275            'widgetID' => 'adbutler',
     
    290279
    291280        wp_localize_script('adbutler_script', 'adbutlerParams', $params);
     281
     282        wp_enqueue_script('adbutler_script');
     283
     284        wp_enqueue_style('adbutler_css', plugins_url('../css/adbutler.css', __FILE__), [], ADBUTLER_PLUGIN_VERSION);
    292285    }
    293286
  • adbutler/trunk/includes/adbutler_widget.class

    r2044052 r2236006  
    139139            <p title="Please select from one of the available zones to configure your advertisement placement.">
    140140                <label
    141                     for="<?php echo $this->get_field_id('zone'); ?>"><?php _e('Zone', 'spark_domain'); ?></label>
     141                        for="<?php echo $this->get_field_id('zone'); ?>"><?php _e('Zone', 'spark_domain'); ?></label>
    142142            <div id="adbutler_refresh_button"><input class="button button-secondary button-small" value="Refresh zones"
    143143                                                     onclick="adbutler.populate_zone_lists(true)"></div>
     
    157157               class="adbutler_type_wrap adbutler_type_fixed">
    158158                <label
    159                     for="<?php echo $this->get_field_id('type_fixed'); ?>"><?php _e('Type', 'spark_domain'); ?></label>
     159                        for="<?php echo $this->get_field_id('type_fixed'); ?>"><?php _e('Type', 'spark_domain'); ?></label>
    160160                <select class="adbutler_type_select widefat"
    161161                        id="<?php echo $this->get_field_id('type_fixed'); ?>"
     
    171171               class="adbutler_type_wrap adbutler_type_responsive" style="display:none;">
    172172                <label
    173                     for="<?php echo $this->get_field_id('type_responsive'); ?>"><?php _e('Type', 'spark_domain'); ?></label>
     173                        for="<?php echo $this->get_field_id('type_responsive'); ?>"><?php _e('Type', 'spark_domain'); ?></label>
    174174                <select class="adbutler_type_select widefat"
    175175                        id="<?php echo $this->get_field_id('type_responsive'); ?>"
     
    194194               title="Enter extra data to be passed along in your request. This requires configuration of your zones through AdButler.">
    195195                <label
    196                     for="<?php echo $this->get_field_id('extra_data'); ?>"><?php _e('Extra Data', 'spark_domain'); ?></label>
     196                        for="<?php echo $this->get_field_id('extra_data'); ?>"><?php _e('Extra Data', 'spark_domain'); ?></label>
    197197                <input id="<?php echo $this->get_field_id('extra_data'); ?>"
    198198                       name="<?php echo $this->get_field_name('extra_data'); ?>" class="widefat"
     
    215215        </div>
    216216
    217         <?php if ($instance): ?>
    218217        <script type="text/javascript">
    219218            jQuery(function () {
     219                adbutler.populate_zone_lists();
    220220                adbutler.update_all_lists();
    221221            });
    222222        </script>
    223     <?php endif;
     223        <?php
    224224    }
    225225
     
    233233    {
    234234        extract($args);
    235         echo $before_widget;
    236235        if (array_key_exists('adtag', $instance)) {
    237236            echo $instance['adtag'];
    238237        }
    239         echo $after_widget;
    240238    }
    241239}
    242    
  • adbutler/trunk/readme.txt

    r2161604 r2236006  
    2424= Special Considerations =
    2525
    26 The Adbutler Plugin communicates with the Adbutler servers under two circumstances.
     26The AdButler Plugin communicates with the AdButler servers under two circumstances.
    27271. When the AdButler Wordpress key is entered, a server to server call is made validating the key and storing basic adserving information for use in generating the tags.
    28281. During the creation and use of any widgets. At this point the widget makes a AJAX/jsonp call to the AdButler server requesting the current publishers and zones associated with the current account.
     
    6868
    6969== Changelog ==
     70*1.26 Fixed editing widget in customize mode
    7071*1.25 Fixed header bidding bug. Updated supported WordPress version.
    7172*1.22 Added Async Beta 1.1 tags. Updated supported WordPress version.
     
    8990*1.04 Fixed widgets on customize appearance page.
    9091*1.03 Fixed some connection issues.
    91 
    92 == Upgrade notice ==
    93 
    94 Async Beta 1.1 tags are now supported.
    95  
    96 
    97 
Note: See TracChangeset for help on using the changeset viewer.