Plugin Directory

Changeset 2795104


Ignore:
Timestamp:
10/06/2022 12:12:39 PM (3 years ago)
Author:
taboolawordpress
Message:

Minor fixes and improvements.

Location:
taboola
Files:
19 added
4 edited

Legend:

Unmodified
Added
Removed
  • taboola/trunk/readme.txt

    r2795095 r2795104  
    6363== Changelog ==
    6464
     65= 1.0.13 =
     66* Minor fixes and improvements.
     67
    6568= 1.0.12 =
    6669* Minor fix for PHP 8.0.x
  • taboola/trunk/settings.php

    r2795095 r2795104  
    116116                <td>Publisher ID</td>
    117117                <td>
    118                     <input type="text" name="publisher_id" placeholder="publisher" value="<?php echo htmlspecialchars($settings->publisher_id) ?>"/>
     118                    <input type="text" name="publisher_id" placeholder="publisher" value="<?php echo !empty($settings->publisher_id) ? htmlspecialchars($settings->publisher_id) : '' ?>"/>
    119119                </td>
    120120                <td class='tooltip'>
     
    134134
    135135        <div class='checkbox'>
    136             <input id="first_bc_enabled" type="checkbox" <?php echo $settings->first_bc_enabled ? "checked='checked'" : "" ?> name="first_bc_enabled"/>
     136            <input id="first_bc_enabled" type="checkbox" <?php echo !empty($settings->first_bc_enabled) ? "checked='checked'" : "" ?> name="first_bc_enabled"/>
    137137            Below Article
    138138        </div>
     
    141141                <td>Widget ID</td>
    142142                <td>
    143                     <input type="text" value="<?php echo $settings->first_bc_widget_id ?>" name="first_bc_widget_id" placeholder="Widget ID" />
     143                    <input type="text" value="<?php echo !empty($settings->first_bc_widget_id) ? htmlspecialchars($settings->first_bc_widget_id) : '' ?>" name="first_bc_widget_id" placeholder="Widget ID" />
    144144                </td>
    145145                <td class='tooltip'>
     
    153153
    154154        <div class='checkbox'>
    155             <input id="second_bc_enabled" type="checkbox" <?php echo $settings->second_bc_enabled ? "checked='checked'" : "" ?> name="second_bc_enabled"/>
     155            <input id="second_bc_enabled" type="checkbox" <?php echo !empty($settings->second_bc_enabled) ? "checked='checked'" : "" ?> name="second_bc_enabled"/>
    156156            Below Article 2nd
    157157        </div>
     
    161161                <td>Widget ID</td>
    162162                <td>
    163                     <input type="text" value="<?php echo htmlspecialchars($settings->second_bc_widget_id) ?>" name="second_bc_widget_id" placeholder="Widget ID" />
     163                    <input type="text" value="<?php echo !empty($settings->second_bc_widget_id) ? htmlspecialchars($settings->second_bc_widget_id) : '' ?>" name="second_bc_widget_id" placeholder="Widget ID" />
    164164                </td>
    165165                <td class='tooltip'>
     
    172172        <hr style='border-bottom: 1px solid #fafafa;'>
    173173
    174         <?php $location_defined = (htmlspecialchars($settings->location_string) != ""); ?>
     174        <?php $location_defined = !empty($settings->location_string); ?>
    175175
    176176
     
    190190            <?php endif; ?>
    191191
    192                    
    193192            <tr>
    194193                <td>Location</td>
    195194                <td>
    196                     <input type="text" value="<?php echo htmlspecialchars($settings->location_string) ?>" name="location_string" placeholder="" />
     195                    <input type="text" value="<?php echo !empty($settings->location_string) ? htmlspecialchars($settings->location_string) : '' ?>" name="location_string" placeholder="" />
    197196                </td>
    198197                <td class='tooltip'>
     
    203202            <tr>
    204203                <td colspan="2"> <div class='checkbox'>
    205                         <input id="out_of_content_enabled" type="checkbox" <?php echo $settings->out_of_content_enabled ? "checked='checked'" : "" ?> name="out_of_content_enabled"/>
     204                        <input id="out_of_content_enabled" type="checkbox" <?php echo !empty($settings->out_of_content_enabled) ? "checked='checked'" : "" ?> name="out_of_content_enabled"/>
    206205                        Place widget after main content DOM element
    207206                    </div></td>
     
    212211
    213212            </tr>
    214 
    215213
    216214        </table>
     
    221219
    222220    <?php
    223         $logPublisher = ($settings->publisher_id == "") ? "wordpressplugin" : $settings->publisher_id;
     221        $logPublisher = empty($settings->publisher_id) ? "wordpressplugin" : $settings->publisher_id;
    224222        $userDetails = wp_get_current_user();
    225223        $detailsString = $userDetails->first_name." ".$userDetails->last_name;
  • taboola/trunk/simple_html_dom.php

    r2795095 r2795104  
    10341034        if ($str)
    10351035        {
    1036             if (preg_match("/^https:\/\//i",$str) || is_file($str))
     1036            if (preg_match("/^http:\/\//i",$str) || is_file($str))
    10371037            {
    10381038                $this->load_file($str);
     
    12221222        if (empty($charset))
    12231223        {
    1224             $el = $this->root->find('meta[https-equiv=Content-Type]',0, true);
     1224            $el = $this->root->find('meta[http-equiv=Content-Type]',0, true);
    12251225            if (!empty($el))
    12261226            {
  • taboola/trunk/taboola_widget.php

    r2795095 r2795104  
    44 * Plugin URI: https://developers.taboola.com/web-integrations/discuss
    55 * Description: Taboola
    6  * Version: 1.0.12
     6 * Version: 1.0.13
    77 * Author: Taboola
    88 */
     
    1414define ("TABOOLA_CONTENT_FORMAT_SCRIPT",'script');
    1515define ("TABOOLA_CONTENT_FORMAT_HTML",'html');
    16 define ("TABOOLA_PLUGIN_VERSION","1.0.12");
     16define ("TABOOLA_PLUGIN_VERSION","1.0.13");
    1717
    1818
     
    5959            }
    6060
    61             $this->should_place_tag_outside_of_content = $this->settings->out_of_content_enabled;
     61            //$this->should_place_tag_outside_of_content = $this->settings->out_of_content_enabled;
    6262
    6363            if (is_admin()) {
     
    255255
    256256            // tag is placed outside of content in order to allow "read more" functionality.
    257             }elseif ($this->should_place_tag_outside_of_content){
     257            }elseif ($this->settings->out_of_content_enabled){
    258258
    259259                $scriptWrapper = new JavaScriptWrapper("js_inject.min.js",array(
Note: See TracChangeset for help on using the changeset viewer.