Plugin Directory

Changeset 2567405


Ignore:
Timestamp:
07/19/2021 03:06:07 PM (5 years ago)
Author:
wpklangoo
Message:

Added extra logic in class-wp-widget-klangoo.php to be compatible with PHP 8 + updated README.txt

Location:
magnet/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • magnet/trunk/README.txt

    r2567404 r2567405  
    33Tags: Klangoo, Magnet, Related articles, Recommended articles, Summary, Personalization, Analytics, Semantic, Analysis, Entity, Entities, Names, In-text links, SEO, interlinking
    44Requires at least: 4.0
    5 Tested up to: 5.4
     5Tested up to: 5.7.2
    66Stable tag: trunk
    77License: GPLv2 or later
  • magnet/trunk/class-wp-widget-klangoo.php

    r1534359 r2567405  
    101101}
    102102
     103
     104function WP_Widget_Klangoo() {
     105    return register_widget('WP_Widget_Klangoo');
     106}
     107/**
     108 * Since create_function() was deprecated in php 7.2 and removed in php 8
     109 * We added this logic
     110*/
     111if(phpversion() >= '8.0.2') {
     112    add_action ('widgets_init', 'WP_Widget_Klangoo');
     113    return;
     114}
     115
    103116add_action( 'widgets_init', create_function( '', 'return register_widget( "WP_Widget_Klangoo" );' ) );
Note: See TracChangeset for help on using the changeset viewer.