rn true. If the Widget * does not declare `register_controls()`, `has_own_method()` will return false. * * Example #2 - both $method_name and $base_class_name are passed * In this example, the widget class inherits from a base class `Widget_Base`, and the base implements * `register_controls()` to add certain controls to all widgets inheriting from it. `has_own_method()` is called by * the widget, with the string 'register_controls' passed as the first parameter, and 'Elementor\Widget_Base' (its full name * including the namespace) passed as the second parameter. If the widget class implements `register_controls()`, * `has_own_method` will return true. If the widget class DOESN'T implement `register_controls()`, it will return * false (because `Widget_Base` is the declaring class for `register_controls()`, and not the class that called * `has_own_method()`). * * @since 3.1.0 * * @param string $method_name * @param string $base_class_name * * @return bool True if the method was declared by the current instance, False if it was inherited. */ public function has_own_method( $method_name, $base_class_name = null ) { try { $reflection_method = new \ReflectionMethod( $this, $method_name ); // If a ReflectionMethod is successfully created, get its declaring class. $declaring_class = $reflection_method->getDeclaringClass(); } catch ( \Exception $e ) { return false; } if ( $base_class_name ) { return $base_class_name !== $declaring_class->name; } return get_called_class() === $declaring_class->name; } }
Fatal error: Uncaught Error: Class 'Elementor\Core\Base\Base_Object' not found in /home/sportuga/public_html/wp-content/plugins/elementor/core/base/module.php:19 Stack trace: #0 /home/sportuga/public_html/wp-content/plugins/elementor/includes/autoloader.php(294): require() #1 /home/sportuga/public_html/wp-content/plugins/elementor/includes/autoloader.php(330): Elementor\Autoloader::load_class('Core\\Base\\Modul...') #2 [internal function]: Elementor\Autoloader::autoload('Elementor\\Core\\...') #3 /home/sportuga/public_html/wp-content/plugins/elementor/core/logger/manager.php(18): spl_autoload_call('Elementor\\Core\\...') #4 /home/sportuga/public_html/wp-content/plugins/elementor/includes/autoloader.php(294): require('/home/sportuga/...') #5 /home/sportuga/public_html/wp-content/plugins/elementor/includes/autoloader.php(330): Elementor\Autoloader::load_class('Core\\Logger\\Man...') #6 [internal function]: Elementor\Autoloader::autoload('Elementor\\Core\\...') #7 /home/sportuga/public_html/wp-content/plugins/elementor/inclu in /home/sportuga/public_html/wp-content/plugins/elementor/core/base/module.php on line 19