), strtolower( $this->settings( 'name' ) ) ) . '">'; $controls_delete = ''; $controls_full = $controls_move . $controls_add . $controls_edit . $controls_clone . $controls_delete; $editAccess = vc_user_access_check_shortcode_edit( $this->shortcode ); $allAccess = vc_user_access_check_shortcode_all( $this->shortcode ); if ( ! empty( $controls ) ) { if ( is_string( $controls ) ) { $controls = array( $controls ); } $controls_string = $controls_start; foreach ( $controls as $control ) { $control_var = 'controls_' . $control; if ( ( $editAccess && 'edit' == $control ) || $allAccess ) { if ( isset( ${$control_var} ) ) { $controls_string .= ${$control_var}; } } } return $controls_string . $controls_end; } if ( $allAccess ) { return $controls_start . $controls_full . $controls_end; } elseif ( $editAccess ) { return $controls_start . $controls_edit . $controls_end; } return $controls_start . $controls_end; } /** * @param $atts * @param null $content * * @return string */ public function contentAdmin( $atts, $content = null ) { $width = $el_class = ''; $atts = shortcode_atts( $this->predefined_atts, $atts ); extract( $atts ); $this->atts = $atts; $output = ''; for ( $i = 0; $i < count( $width ); $i ++ ) { $output .= '
mainHtmlBlockParams( $width, $i ) . '>'; if ( $this->backened_editor_prepend_controls ) { $output .= $this->getColumnControls( $this->settings( 'controls' ) ); } $output .= '
'; if ( isset( $this->settings['custom_markup'] ) && '' !== $this->settings['custom_markup'] ) { $markup = $this->settings['custom_markup']; $output .= $this->customMarkup( $markup ); } else { $output .= $this->outputTitle( $this->settings['name'] ); $output .= '
containerHtmlBlockParams( $width, $i ) . '>'; $output .= do_shortcode( shortcode_unautop( $content ) ); $output .= '
'; $output .= $this->paramsHtmlHolders( $atts ); } $output .= '
'; if ( $this->backened_editor_prepend_controls ) { $output .= $this->getColumnControls( 'add', 'bottom-controls' ); } $output .= '
'; } return $output; } /** * @param $title * * @return string */ protected function outputTitle( $title ) { $icon = $this->settings( 'icon' ); if ( filter_var( $icon, FILTER_VALIDATE_URL ) ) { $icon = ''; } $params = array( 'icon' => $icon, 'is_container' => $this->settings( 'is_container' ), 'title' => $title, ); return '

' . $this->getIcon( $params ) . '

'; } public function getBackendEditorChildControlsElementCssClass() { return 'vc_element-name'; } } } if ( ! class_exists( 'WPBakeryShortCodeFishBones' ) ) { /** * Class WPBakeryShortCodeFishBones */ class WPBakeryShortCodeFishBones extends WPBakeryShortCode { /** * @var bool */ protected $shortcode_class = false; /** * @param $settings */ public function __construct( $settings ) { if ( ! $settings ) { throw new Exception( 'Element must have settings to register' ); } $this->settings = $settings; $this->shortcode = $this->settings['base']; $this->addAction( 'admin_init', 'hookAdmin' ); if ( ! shortcode_exists( $this->shortcode ) ) { add_shortcode( $this->shortcode, array( $this, 'render', ) ); } } public function hookAdmin() { $this->enqueueAssets(); $this->addAction( 'admin_init', 'enqueueAssets' ); if ( vc_is_page_editable() ) { // fix for page editable $this->addAction( 'wp_head', 'printIconStyles' ); } $this->addAction( 'admin_head', 'printIconStyles' ); // fe+be $this->addAction( 'admin_print_scripts-post.php', 'enqueueAssets' ); $this->addAction( 'admin_print_scripts-post-new.php', 'enqueueAssets' ); } /** * @return WPBakeryShortCodeFishBones */ public function shortcodeClass() { // _deprecated_function( '\WPBakeryShortCodeFishBones::shortcodeClass', '4.9 (will be removed in 4.11)' ); if ( false !== $this->shortcode_class ) { return $this->shortcode_class; } require_once vc_path_dir( 'SHORTCODES_DIR', 'wordpress-widgets.php' ); $class_name = $this->settings( 'php_class_name' ) ? $this->settings( 'php_class_name' ) : 'WPBakeryShortCode_' . $this->settings( 'base' ); $autoloaded_dependencies = VcShortcodeAutoloader::getInstance()->includeClass( $class_name ); if ( ! $autoloaded_dependencies ) { $file = vc_path_dir( 'SHORTCODES_DIR', str_replace( '_', '-', $this->settings( 'base' ) ) . '.php' ); if ( is_file( $file ) ) { require_once( $file ); } } if ( class_exists( $class_name ) && is_subclass_of( $class_name, 'WPBakeryShortCode' ) ) { $this->shortcode_class = new $class_name( $this->settings ); } else { $this->shortcode_class = new WPBakeryShortCodeFishBones( $this->settings ); } return $this->shortcode_class; } /** * * * @since 4.9 * * @param $tag * * @return \WPBakeryShortCodeFishBones * @throws \Exception */ public static function getElementClass( $tag ) { $settings = WPBMap::getShortCode( $tag ); if ( empty( $settings ) ) { throw new Exception( 'Element must be mapped in system' ); } require_once vc_path_dir( 'SHORTCODES_DIR', 'wordpress-widgets.php' ); $class_name = ! empty( $settings['php_class_name'] ) ? $settings['php_class_name'] : 'WPBakeryShortCode_' . $settings['base']; $autoloaded_dependencies = VcShortcodeAutoloader::getInstance()->includeClass( $class_name ); if ( ! $autoloaded_dependencies ) { $file = vc_path_dir( 'SHORTCODES_DIR', str_replace( '_', '-', $settings['base'] ) . '.php' ); if ( is_file( $file ) ) { require_once( $file ); } } if ( class_exists( $class_name ) && is_subclass_of( $class_name, 'WPBakeryShortCode' ) ) { $shortcode_class = new $class_name( $settings ); } else { $shortcode_class = new WPBakeryShortCodeFishBones( $settings ); } return $shortcode_class; } /** * @param $atts * @param null $content * @param null $tag * * @return string */ public function render( $atts, $content = null, $tag = null ) { return $this->getElementClass( $tag )->output( $atts, $content ); } /** * This method is not used * * @param $atts * @param null $content * * @return string */ protected function content( $atts, $content = null ) { return ''; } /** * @param string $content * * @return string */ public function template( $content = '' ) { return $this->shortcodeClass()->contentAdmin( array(), $content ); } } } /** * @since 4.9 * * Class Vc_Shortcodes_Manager */ final class Vc_Shortcodes_Manager { private $shortcode_classes = array(); private $tag; /** * Core singleton class * @var self - pattern realization */ private static $_instance; /** * Get the instance of Vc_Shortcodes_Manager * * @return self */ public static function getInstance() { if ( ! ( self::$_instance instanceof self ) ) { self::$_instance = new self(); } return self::$_instance; } public function getTag() { return $this->tag; } public function setTag( $tag ) { $this->tag = $tag; return $this; } public function getElementClass( $tag ) { if ( isset( $this->shortcode_classes[ $tag ] ) ) { return $this->shortcode_classes[ $tag ]; } $settings = WPBMap::getShortCode( $tag ); if ( empty( $settings ) ) { throw new Exception( 'Element must be mapped in system' ); } require_once vc_path_dir( 'SHORTCODES_DIR', 'wordpress-widgets.php' ); $class_name = ! empty( $settings['php_class_name'] ) ? $settings['php_class_name'] : 'WPBakeryShortCode_' . $settings['base']; $autoloaded_dependencies = VcShortcodeAutoloader::getInstance()->includeClass( $class_name ); if ( ! $autoloaded_dependencies ) { $file = vc_path_dir( 'SHORTCODES_DIR', str_replace( '_', '-', $settings['base'] ) . '.php' ); if ( is_file( $file ) ) { require_once( $file ); } } if ( class_exists( $class_name ) && is_subclass_of( $class_name, 'WPBakeryShortCode' ) ) { $shortcode_class = new $class_name( $settings ); } else { $shortcode_class = new WPBakeryShortCodeFishBones( $settings ); } $this->shortcode_classes[ $tag ] = $shortcode_class; return $shortcode_class; } public function shortcodeClass() { return $this->getElementClass( $this->tag ); } /** * @param string $content * * @return string */ public function template( $content = '' ) { return $this->getElementClass( $this->tag )->contentAdmin( array(), $content ); } /** * @param $name * * @return null */ public function settings( $name ) { $settings = WPBMap::getShortCode( $this->tag ); return isset( $settings[ $name ] ) ? $settings[ $name ] : null; } /** * @param $atts * @param null $content * @param null $tag * * @return string */ public function render( $atts, $content = null, $tag = null ) { return $this->getElementClass( $this->tag )->output( $atts, $content ); } public function buildShortcodesAssets() { $elements = WPBMap::getAllShortCodes(); foreach ( $elements as $tag => $settings ) { $element_class = $this->getElementClass( $tag ); $element_class->enqueueAssets(); $element_class->printIconStyles(); } } public function buildShortcodesAssetsForEditable() { $elements = WPBMap::getAllShortCodes(); // @todo create pull to use only where it is set inside function. BC problem foreach ( $elements as $tag => $settings ) { $element_class = $this->getElementClass( $tag ); $element_class->printIconStyles(); } } }
Fatal error: Namespace declaration statement has to be the very first statement in the script in /home/wpgoigime/public_html/dorsonhomecare/wp-content/plugins/responsive-menu/vendor/composer/ClassLoader.php on line 13