Support » Plugin: Genesis Responsive Slider » Deprecation warning on PHP 7.2

  • Resolved Anthony Hortin

    (@ahortin)


    Hi,

    I’ve been testing a client site on PHP 7.2 in preparation for their host (WP Engine) upgrading their PHP version soon. The Genesis Slider was showing a warning “Methods with the same name as their class will not be constructors in a future version of PHP” in plugin.php.

    class Genesis_SliderWidget extends WP_Widget on line 200 in plugin.php is using the function called Genesis_SliderWidget() as the constructor. This function name needs to change to __construct() instead.

    ie.
    On line 200,
    Change function Genesis_SliderWidget() {
    to
    Change function __construct() {

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Nick Cernis

    (@modernnerd)

    @ahortin It sounds like the site may be using an old version of the Genesis Slider plugin (as opposed to Genesis Responsive Slider).

    An old version of that plugin used to use the constructor you mention: https://plugins.trac.wordpress.org/browser/genesis-slider/tags/0.9.5/plugin.php#L199

    But no longer does: https://plugins.trac.wordpress.org/browser/genesis-slider/tags/0.9.7/plugin.php#L200

    The original Genesis Slider plugin is no longer available to download and will not receive further updates, but patching the plugin in the way you’ve done is a good way to avoid that warning.

    If your client would like to continue receiving plugin updates for their slider plugin, moving to an actively developed slider plugin in the future would be worth considering. https://wordpress.org/plugins/tags/wordpress-slider/

    Hi Nick,

    Thanks for getting back to me so quickly.

    It sounds like you’re right. This site has been around for a few years now and was actually developed by someone else. I just took over the support for them, a few years back. The slider version on the site is 0.9.6 so it had the older code, unfortunately.

    I’m presuming there would be more work involved than simply swapping over the plugin to this new supported version? It’s something I’ll definitely advise them to do.

    Thanks for your help.

    Plugin Support Nick Cernis

    (@modernnerd)

    You’re welcome, Anthony!

    I’m presuming there would be more work involved than simply swapping over the plugin to this new supported version?

    Swapping slider plugins typically involves setting up the new slider settings and may require some CSS adjustments. It’s not usually a huge amount of work but it’s not automatic either.

    Thanks for confirming that Nick. I kinda presumed this would be the case. I just wasn’t sure how close this new version was (in terms of options, etc.), compared to the older version of the plugin.

    Thanks again for your help with this and for replying so quickly.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.