Plugin Directory

Changeset 1888738


Ignore:
Timestamp:
06/07/2018 10:47:23 AM (8 years ago)
Author:
emarten
Message:

improved backwards-compatibility for php 5.2

Location:
dsgvo/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • dsgvo/trunk/eu-dsgvo-helper.php

    r1888713 r1888738  
    44        Plugin Name: EU DSGVO Helper
    55        Description: This Plugin will be further developed. It so far caches google webfonts locally and replaces youtube embeded videos with a preview-image which becomes an embeded video on-click. Removes Emojis. More functions will be added soon.
    6         Version: 1.0.5.8
     6        Version: 1.0.6
    77        Author: Eric Marten
    88        Author URL: https://www.herr-marten.de/
     
    158158    }
    159159
    160     add_action("template_redirect",function(){
    161         ob_start(function($html)
    162         {
     160
     161
     162
     163
     164
     165
     166
     167
     168
     169
     170
     171    function eu_dsgvo_helper_filter_obstart_buffer_function($html)
     172    {
     173
    163174
    164175            $pattern='/'.'(?<line><link[\s\S]*?rel=[\"\']dns-prefetch[\"\'][\s\S]*?href=[\"\'](?<dns>[\s\S]*?)[\"\'][\s\S]*?>)'.'/';
     
    268279            }
    269280            return $html;
    270         });
    271     });
    272 
    273 
    274 
    275 
    276 
    277     add_action("template_redirect",function(){
     281
     282    }
     283
     284
     285
     286    function eu_dsgvo_helper_filter_template_redirect(){
     287        ob_start("eu_dsgvo_helper_filter_obstart_buffer_function");
     288
     289
    278290        if (is_404())
    279291        {
     
    355367
    356368        }
    357     });
    358 
    359 
    360 
     369    }
     370
     371
     372
     373
     374
     375
     376
     377    add_action("template_redirect","eu_dsgvo_helper_filter_template_redirect");
    361378
    362379
     
    473490                -webkit-border-radius:0;
    474491                border-radius:0;
     492                box-sizing: border-box;
    475493            }
    476494
     
    483501                {
    484502                    background:#fff; padding:30px 15px; cursor:default; position:absolute; bottom:0; width: 100%; left:0; right:0;
     503                    box-sizing: border-box;
    485504                }
    486505            </style>
     
    489508            <?php
    490509                define("DSGVO_COOKIE_NOTE",ob_get_clean());
    491                 add_action("wp_footer",function(){
     510                function eu_dsgvo_helper_print_cookie(){
    492511                    echo DSGVO_COOKIE_NOTE;
    493                 });
     512                }
     513                add_action("wp_footer","eu_dsgvo_helper_print_cookie");
    494514         } else { ob_start();   define("DSGVO_COOKIE_NOTE",ob_get_clean()); }
    495515
  • dsgvo/trunk/readme.txt

    r1882529 r1888738  
    66Tested up to: 4.9.6
    77Stable tag: 4.9.6
    8 Requires PHP: 5.6
     8Requires PHP: 5.2
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.