• w4cdev

    (@w4cdev)


    Just for inquisitive all we did not understand as why the two different parsing is called thru the defined classes and not merged in the same
    class-wordpoints-points-hook.php
    class-wordpoints-points-hooks.php

    The above Just for clarification

    ———
    Please have a loon the curly braces deprecated one
    PHP deprecated for user of curly braces been replaced to Square brackets
    /home/agestabc/public_html/unitionorg/wp-content/plugins/wordpoints/components/points/includes/class-wordpoints-points-hook.php at line 764

    The above Just for information

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author J.D. Grimes

    (@jdgrimes)

    Thanks for the info about the error.

    The difference between the two classes you are asking about is complicated to explain, but basically, believe it or not, the design was originally based on the code for Widgets from WordPress core. There is a WP_Widgets class and a WP_Widget class, IIRC, so that’s how this was built.

    Thread Starter w4cdev

    (@w4cdev)

    Thanks for updates

    Please to inform, since WordPress 4.3.x the class wp_widget and not wp_widgets class has been replaced and constructor is passed in /wp/wp-includes/class-wp-widget.php at line 192
    */
    `public function WP_Widget( $id_base, $name, $widget_options = array(), $control_options = array() ) {
    _deprecated_constructor( ‘WP_Widget’, ‘4.3.0’, get_class( $this ) );
    WP_Widget::__construct( $id_base, $name, $widget_options, $control_options );
    }`

    Thus WP_Widgets is duplication will be effecting the load on the server and destruct the page load as in our case during the parsing method of the class function.

    If it seems the later is not necessitated, it would be better to rebuild the construct only with the single class to append

    Hope this would be helpful to the extent

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Two classes defined in different set of pages’ is closed to new replies.