HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
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: //proc/self/cwd/wp-content/plugins/extensive-vc-addon/widgets/widgets-functions.php
<?php

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

if ( ! function_exists( 'extensive_vc_include_widgets' ) ) {
	/**
	 * Include main widgets load file
	 */
	function extensive_vc_include_widgets() {
		
		foreach ( glob( EXTENSIVE_VC_SHORTCODES_ABS_PATH . '/*/widgets/load.php' ) as $widget_load ) {
			include_once $widget_load;
		}
		
		// Hook to include additional widgets
		do_action( 'extensive_vc_action_include_widgets_file' );
	}
	
	add_action( 'init', 'extensive_vc_include_widgets', 0 ); // permission 0 is set to be before widgets_init hook
}

if ( ! function_exists( 'extensive_vc_register_widgets' ) ) {
	/**
	 * Register all widgets
	 */
	function extensive_vc_register_widgets() {
		$widgets = apply_filters( 'extensive_vc_filter_register_widgets', $widgets = array() );
		
		if ( ! empty( $widgets ) ) {
			foreach ( $widgets as $widget ) {
				$isEnabled = extensive_vc_check_is_widget_enabled( $widget );
				
				if ( $isEnabled ) {
					register_widget( $widget );
				}
			}
		}
	}
	
	add_action( 'widgets_init', 'extensive_vc_register_widgets' );
}

if ( ! function_exists( 'extensive_vc_return_widgets_label_array' ) ) {
	/**
	 * Returns array of widgets label array
	 *
	 * @return array
	 */
	function extensive_vc_return_widgets_label_array() {
		$widgets         = apply_filters( 'extensive_vc_filter_widgets_list', $widgets = array() );
		$modifiedWidgets = array();
		
		if ( ! empty( $widgets ) ) {
			foreach ( $widgets as $widget ) {
				$removeStrings = str_replace( 'EVC', '', $widget );
				$optionValue   = ltrim( preg_replace( '/(?<!\ )[A-Z]/', ' $0', $removeStrings ) );
				
				$modifiedWidgets[ $widget ] = $optionValue;
			}
			
			ksort( $modifiedWidgets );
		}
		
		return $modifiedWidgets;
	}
}

if ( ! function_exists( 'extensive_vc_check_is_widget_enabled' ) ) {
	/**
	 * Check is widget enabled throw plugin option
	 *
	 * @param $widget string - widget class name
	 *
	 * @return boolean
	 */
	function extensive_vc_check_is_widget_enabled( $widget ) {
		$evcOptions = get_option( 'evc_options' );
		
		$optionValue = ! empty( $evcOptions ) && array_key_exists( $widget, $evcOptions ) ? $evcOptions[ $widget ] : '';
		$returnValue = $optionValue !== '' && intval( $optionValue ) === 1 ? false : true;
		
		return $returnValue;
	}
}