Plugin Directory

Changeset 1578806


Ignore:
Timestamp:
01/20/2017 03:46:33 PM (9 years ago)
Author:
tlaplugins
Message:

updates code for PHP 7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • text-link-ads/trunk/textlinkads.php

    r909993 r1578806  
    55Description: Allows many xml keys per plugin install. Text Link Ads sell ads on specific pages. Join the Text Link Ads marketplace.
    66Author: Text Link Ads
    7 Version: 3.9.13
     7Version: 4.0.0
    88Author URI: http://www.matomyseo.com/?ref=267085
    99*/
     
    442442        class textlinkads_Widget extends WP_Widget
    443443        {
    444             function textlinkads_Widget()
     444            function __construct()
    445445            {
    446446                parent::WP_Widget(false, $name = 'Text Link Ads');
     
    540540    var $ads;
    541541
    542     function textlinkadsObject()
     542    function __construct()
    543543    {
    544544        global $table_prefix;
     
    833833    function decode($str)
    834834    {
    835         if (!function_exists('html_entity_decode')) {
    836             function html_entity_decode($string)
    837             {
    838                // replace numeric entities
    839                $str = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\1"))', $str);
    840                $str = preg_replace('~&#([0-9]+);~e', 'chr(\1)', $str);
    841                // replace literal entities
    842                $transTable = get_html_translation_table(HTML_ENTITIES);
    843                $transTable = array_flip($transTable);
    844                return strtr($str, $transTable);
    845             }
    846         }
    847 
    848835        if (substr($str, 0, 1) == '[') {
    849836            $arr = json_decode($str, true);
Note: See TracChangeset for help on using the changeset viewer.