. * @type array $uses_context (optional) Array of values to add to block `uses_context` needed by the source. * } * @return WP_Block_Bindings_Source|false Source when the registration was successful, or `false` on failure. */ function register_block_bindings_source( string $source_name, array $source_properties ) { return WP_Block_Bindings_Registry::get_instance()->register( $source_name, $source_properties ); } /** * Unregisters a block bindings source. * * @since 6.5.0 * * @param string $source_name Block bindings source name including namespace. * @return WP_Block_Bindings_Source|false The unregistered block bindings source on success and `false` otherwise. */ function unregister_block_bindings_source( string $source_name ) { return WP_Block_Bindings_Registry::get_instance()->unregister( $source_name ); } /** * Retrieves the list of all registered block bindings sources. * * @since 6.5.0 * * @return WP_Block_Bindings_Source[] The array of registered block bindings sources. */ function get_all_registered_block_bindings_sources() { return WP_Block_Bindings_Registry::get_instance()->get_all_registered(); } /** * Retrieves a registered block bindings source. * * @since 6.5.0 * * @param string $source_name The name of the source. * @return WP_Block_Bindings_Source|null The registered block bindings source, or `null` if it is not registered. */ function get_block_bindings_source( string $source_name ) { return WP_Block_Bindings_Registry::get_instance()->get_registered( $source_name ); } 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 /htdocs/wp-content/plugins/elementor/core/base/module.php:19 Stack trace: #0 /htdocs/wp-content/plugins/elementor/includes/autoloader.php(296): require() #1 /htdocs/wp-content/plugins/elementor/includes/autoloader.php(332): Elementor\Autoloader::load_class('Core\\Base\\Modul...') #2 /htdocs/wp-content/plugins/elementor/core/logger/manager.php(18): Elementor\Autoloader::autoload('Elementor\\Core\\...') #3 /htdocs/wp-content/plugins/elementor/includes/autoloader.php(296): require('/htdocs/wp-cont...') #4 /htdocs/wp-content/plugins/elementor/includes/autoloader.php(332): Elementor\Autoloader::load_class('Core\\Logger\\Man...') #5 /htdocs/wp-content/plugins/elementor/includes/plugin.php(871): Elementor\Autoloader::autoload('Elementor\\Core\\...') #6 /htdocs/wp-content/plugins/elementor/includes/plugin.php(630): Elementor\Plugin->__construct() #7 /htdocs/wp-content/plugins/elementor/includes/plugin.php(888): Elementor\Plugin::instance() #8 /htdocs/wp-content/plugins/elementor/elementor.php(58): require('/htdocs/wp-cont...') #9 /htdocs/wp-settings.php(517): include_once('/htdocs/wp-cont...') #10 /htdocs/wp-config.php(98): require_once('/htdocs/wp-sett...') #11 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #12 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #13 /htdocs/index.php(17): require('/htdocs/wp-blog...') #14 {main} thrown in /htdocs/wp-content/plugins/elementor/core/base/module.php on line 19