HEX
Server: Apache/2.4.65 (Debian)
System: Linux web6 5.10.0-36-amd64 #1 SMP Debian 5.10.244-1 (2025-09-29) x86_64
User: innocamp (1028)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //home/hcp/public_html/wp-content/themes/jupiterx/lib/api/elementor/widgets/sidebar.php
<?php
/**
 * Handles overriding Elementor Sidebar widget.
 *
 * @package JupiterX\Framework\API\Elementor
 *
 * @since   1.0.0
 */

/**
 * The Jupiter Elementor's Custom Sidebar
 *
 * @since   1.0.0
 * @ignore
 *
 * @package JupiterX\Framework\API\Elementor
 */
class JupiterX_Elementor_Widget_Sidebar extends \Elementor\Widget_Sidebar {

	/**
	 * Render sidebar widget output on the frontend.
	 *
	 * Written in PHP and used to generate the final HTML.
	 *
	 * @since 1.0.0
	 * @access protected
	 */
	protected function render() {
		$sidebar = $this->get_settings_for_display( 'sidebar' );

		if ( empty( $sidebar ) ) {
			return;
		}

		echo jupiterx_widget_area( $sidebar ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
	}
}

add_action( 'elementor/element/sidebar/section_sidebar/before_section_end', 'jupiterx_elementor_sidebar_add_settings' );
/**
 * Add settings to Elementor Sidebar widget.
 *
 * @todo Find a proper way to add this to JupiterX_Elementor_Widget_Sidebar class.
 *
 * @since 1.4.0
 *
 * @param object $element The element object.
 */
function jupiterx_elementor_sidebar_add_settings( $element ) {

	$element->add_control(
		'jupiterx_location',
		[
			'label' => __( 'Location', 'jupiterx' ),
			'description' => __( 'Content inherits styles from <strong>Customizer > Sidebar</strong> and Footer from <strong>Customizer > Footer</strong>.', 'jupiterx' ),
			'type' => 'select',
			'options' => [
				'' => __( 'Default', 'jupiterx' ),
				'sidebar' => __( 'Content', 'jupiterx' ),
				'footer-widgets' => __( 'Footer', 'jupiterx' ),
			],
			'prefix_class' => 'jupiterx-',
		]
	);

};