-
AuthorSearch Results
-
April 23, 2025 at 1:10 pm #1481948
Topic: Custom Layout dynamic fields not updating
in forum Enfoldmcbusta
ParticipantHi!
I was trying to create a custom layout containing a section with a dynamic background (Custom Field Image) value: {wp_custom_field:_thumbnail_id}
It works OK for one post, but background image is being cached and displayed for all other posts as well.
I dag into the av_section code to find that attribute is being rendered nicely, but the dynamic CSS class (avia-section.av-m8303wih-f038c6badb9db50289ff3c9a39d18731) that defines section background does not update.
A quick workaround for this scenario:
// Force bg for secion as it does not update when dynamic avia element is used // Enfold forces CSS bg, but it is cached and does not update for different posts // although it is calculated OK for secion atts add_filter('avf_sc_section_before_close', function($output, $atts) { if (!$atts['src_dynamic'] ?? false || !$atts['src'] ?? false) return $output; $style_attr = ' style="background-image: url('. esc_url($atts['src']) .') !important;"'; return substr_replace($output, $style_attr, 4, 0); }, 999, 2);
March 26, 2025 at 4:12 am #1480171In reply to: Overlay on Columns
Hey nicolealbaek,
Thank you for the inquiry.
There is no overlay option for the Column element, but you can apply a background in the Styling > Background panel. For the gradient effect, you can use the Color Section element, toggle the Styling > Background Overlay > Enable Overlay? option, then apply the class name “av-custom-gradient-section” in the Advanced > Developer Settings > Custom CSS Class field. Add this code to override the default overlay color with a gradient.
#top #wrap_all .avia-section.av-custom-gradient-section { background-color: transparent; background-image: linear-gradient(180deg, #FFFFFF21 23%, #FFCBA4 93%); opacity: 1; transition: background 0.3s, border-radius 0.3s, opacity 0.3s; }
Best regards,
IsmaelMarch 5, 2025 at 5:48 pm #1478689In reply to: Enfold 7.0
<?php /*.. Plugin Name: Abstrakt Enfold Extensions Plugin URI: https://abstraktmg.com Description: Plugin for Abstrakt Marketing Group Designers Only Author: Nathaniel Riggins Author URI: https://abstraktmg.com Version: 2.0.5 License: Private */ if ( !defined('ABSPATH') ) { die('-1'); } if (!class_exists('AbstraktEnfoldExtensions')) { class AbstraktEnfoldExtensions { public string $plugin; private array $elements = array( 'accordion', 'aces', 'badges', 'billboard', 'bulletin', 'button', 'cards', 'carousel', 'crawl', 'cube', 'deck', 'fashion', 'glow', 'hero', 'marquee', 'material', 'panorama', 'paper', 'pricing', 'rotators', 'tabs', 'testimonials', 'triple', 'versa', 'wall', 'waves', ); private array $deletes = array( 'animate', 'blocks', 'intros', 'navi', 'neon', 'podcasts', 'posters', 'sticky', 'text', 'traveler', ); // Class construct function __construct() { $this->plugin = plugin_basename(__FILE__); add_action('wp_enqueue_scripts', array($this, 'load_scripts')); add_action('admin_enqueue_scripts', array($this, 'load_admin_scripts')); add_action('init', array($this, 'includeClasses')); add_action('avia_builder_mode', array($this, 'builder_set_debug')); add_action('admin_menu', array($this, 'amg_enfold_admin_menu')); add_action('admin_init', array($this, 'amg_enfold_admin_settings_init')); add_action('wp_footer', array($this, 'amg_enfold_popup')); add_action( 'init', array($this, 'add_all_image_sizes')); } function add_all_image_sizes() :void { ///// AUTO SIZES /// add_image_size( 'amg-auto-300', 300); add_image_size( 'amg-auto-500', 500); add_image_size( 'amg-auto-750', 750); add_image_size( 'amg-auto-1000', 1000); add_image_size( 'amg-auto-1250', 1250); add_image_size( 'amg-auto-1500', 1500); add_image_size( 'amg-auto-2000', 2000); add_image_size( 'amg-portrait-300', 300, 400, true ); add_image_size( 'amg-portrait-450', 450, 600, true ); add_image_size( 'amg-portrait-600', 600, 800, true ); add_image_size( 'amg-portrait-750', 750, 1000, true ); add_image_size( 'amg-landscape-320', 320, 180, true ); add_image_size( 'amg-landscape-480', 480, 270, true ); add_image_size( 'amg-landscape-720', 720, 405, true ); add_image_size( 'amg-landscape-960', 960, 540, true ); add_image_size( 'amg-landscape-1440', 1440, 810, true ); add_image_size( 'amg-landscape-1920', 1920, 1080, true ); } function builder_set_debug() { return "debug"; } public static function get_image_sizes() : array { return array( __( 'None', 'avia_framework' ) => '', __( 'Auto 300w', 'avia_framework' ) => 'amg-auto-300', __( 'Auto 500w', 'avia_framework' ) => 'amg-auto-500', __( 'Auto 750w', 'avia_framework' ) => 'amg-auto-750', __( 'Auto 1000w', 'avia_framework' ) => 'amg-auto-1000', __( 'Auto 1250w', 'avia_framework' ) => 'amg-auto-1250', __( 'Auto 1500w', 'avia_framework' ) => 'amg-auto-1500', __( 'Auto 2000w', 'avia_framework' ) => 'amg-auto-2000', __( 'Portrait 300w', 'avia_framework' ) => 'amg-portrait-300', __( 'Portrait 450w', 'avia_framework' ) => 'amg-portrait-450', __( 'Portrait 600w', 'avia_framework' ) => 'amg-portrait-600', __( 'Portrait 750w', 'avia_framework' ) => 'amg-portrait-750', __( 'Landscape 320w', 'avia_framework' ) => 'amg-landscape-320', __( 'Landscape 480w', 'avia_framework' ) => 'amg-landscape-480', __( 'Landscape 720w', 'avia_framework' ) => 'amg-landscape-720', __( 'Landscape 960w', 'avia_framework' ) => 'amg-landscape-960', __( 'Landscape 1440w', 'avia_framework' ) => 'amg-landscape-1440', __( 'Landscape 1920w', 'avia_framework' ) => 'amg-landscape-1920', ); } public static function get_plugin_version():string { $data = get_plugin_data(__FILE__); return $data['Version']; } public static function developMode():bool { return get_option('amg_enfold_developer_mode') == 'yes'; } public function includeClasses():void { $count = count($this->elements); for ($i = 0; $i < $count; $i++) { if (get_option("amg_enfold_extensions_{$this->elements[$i]}_active") == 'yes') { include plugin_dir_path( __FILE__ ) . "/enfold/{$this->elements[$i]}/{$this->elements[$i]}.php"; } } } public function load_admin_scripts():void { $ver = AbstraktEnfoldExtensions::get_plugin_version(); $developMode = AbstraktEnfoldExtensions::developMode(); $lastmodtime = $developMode ? rand(1, 999999999) : $ver; wp_enqueue_style('amg-admin-enfold', plugin_dir_url(__FILE__) . 'css/style.min.css', false, $lastmodtime); wp_enqueue_script('amg-admin-enfold-fontawesome', 'https://kit.fontawesome.com/ececabbde4.js', false, $lastmodtime); } public function load_scripts():void { $ver = AbstraktEnfoldExtensions::get_plugin_version(); $developMode = AbstraktEnfoldExtensions::developMode(); $lastmodtime = $developMode ? rand(1, 999999999) : $ver; wp_enqueue_style('amg-enfold-icons', plugin_dir_url(__FILE__) . 'css/uicons.min.css', array('avia-layout'), $lastmodtime); wp_enqueue_style( 'amg-css-animate', plugin_dir_url(__FILE__) . "css/animateCSS.min.css", array( 'avia-layout' ) ); wp_enqueue_style('amg-enfold', plugin_dir_url(__FILE__) . 'css/style.min.css', array('avia-layout'), $lastmodtime); wp_enqueue_style('amg-swiper', plugin_dir_url(__FILE__) . 'css/swiper.css', array('avia-layout'), $lastmodtime); wp_enqueue_script( 'amg-gsap', plugin_dir_url(__FILE__) . "js/gsap.min.js", array( 'amg-swiper' ), $lastmodtime, true ); wp_enqueue_script( 'amg-enfold', plugin_dir_url(__FILE__) . "js/script.min.js", array(), $lastmodtime ); wp_enqueue_script( 'amg-swiper', plugin_dir_url(__FILE__) . "js/swiper.js", array(), $lastmodtime ); } public static function get_duration_times():array { return array( __( 'None', 'avia_framework' ) => '', __( '0.1s', 'avia_framework' ) => 's100', __( '0.2s', 'avia_framework' ) => 's200', __( '0.3s', 'avia_framework' ) => 's300', __( '0.4s', 'avia_framework' ) => 's400', __( '0.5s', 'avia_framework' ) => 's500', __( '0.6s', 'avia_framework' ) => 's600', __( '0.7s', 'avia_framework' ) => 's700', __( '0.8s', 'avia_framework' ) => 's800', __( '0.9s', 'avia_framework' ) => 's900', __( '1s', 'avia_framework' ) => 's1000', __( '1.1s', 'avia_framework' ) => 's1100', __( '1.2s', 'avia_framework' ) => 's1200', __( '1.3s', 'avia_framework' ) => 's1300', __( '1.4s', 'avia_framework' ) => 's1400', __( '1.5s', 'avia_framework' ) => 's1500', __( '1.6s', 'avia_framework' ) => 's1600', __( '1.7s', 'avia_framework' ) => 's1700', __( '1.8s', 'avia_framework' ) => 's1800', __( '1.9s', 'avia_framework' ) => 's1900', __( '2s', 'avia_framework' ) => 's2000', __( '2.1s', 'avia_framework' ) => 's2100', __( '2.2s', 'avia_framework' ) => 's2200', __( '2.3s', 'avia_framework' ) => 's2300', __( '2.4s', 'avia_framework' ) => 's2400', __( '2.5s', 'avia_framework' ) => 's2500', __( '2.6s', 'avia_framework' ) => 's2600', __( '2.7s', 'avia_framework' ) => 's2700', __( '2.8s', 'avia_framework' ) => 's2800', __( '2.9s', 'avia_framework' ) => 's2900', __( '3s', 'avia_framework' ) => 's3000', ); } public static function get_delay_times():array { return array( __( 'None', 'avia_framework' ) => '', __( '0.1s', 'avia_framework' ) => 'd100', __( '0.2s', 'avia_framework' ) => 'd200', __( '0.3s', 'avia_framework' ) => 'd300', __( '0.4s', 'avia_framework' ) => 'd400', __( '0.5s', 'avia_framework' ) => 'd500', __( '0.6s', 'avia_framework' ) => 'd600', __( '0.7s', 'avia_framework' ) => 'd700', __( '0.8s', 'avia_framework' ) => 'd800', __( '0.9s', 'avia_framework' ) => 'd900', __( '1s', 'avia_framework' ) => 'd1000', __( '1.1s', 'avia_framework' ) => 'd1100', __( '1.2s', 'avia_framework' ) => 'd1200', __( '1.3s', 'avia_framework' ) => 'd1300', __( '1.4s', 'avia_framework' ) => 'd1400', __( '1.5s', 'avia_framework' ) => 'd1500', __( '1.6s', 'avia_framework' ) => 'd1600', __( '1.7s', 'avia_framework' ) => 'd1700', __( '1.8s', 'avia_framework' ) => 'd1800', __( '1.9s', 'avia_framework' ) => 'd1900', __( '2s', 'avia_framework' ) => 'd2000', __( '2.1s', 'avia_framework' ) => 'd2100', __( '2.2s', 'avia_framework' ) => 'd2200', __( '2.3s', 'avia_framework' ) => 'd2300', __( '2.4s', 'avia_framework' ) => 'd2400', __( '2.5s', 'avia_framework' ) => 'd2500', __( '2.6s', 'avia_framework' ) => 'd2600', __( '2.7s', 'avia_framework' ) => 'd2700', __( '2.8s', 'avia_framework' ) => 'd2800', __( '2.9s', 'avia_framework' ) => 'd2900', __( '3s', 'avia_framework' ) => 'd3000', ); } public static function get_slider_speeds():array { return array( __( '3s', 'avia_framework' ) => '3000', __( '4s', 'avia_framework' ) => '4000', __( '5s', 'avia_framework' ) => '5000', __( '6s', 'avia_framework' ) => '6000', __( '7s', 'avia_framework' ) => '7000', __( '8s', 'avia_framework' ) => '8000', __( '9s', 'avia_framework' ) => '9000', __( '10s', 'avia_framework' ) => '10000', __( '11s', 'avia_framework' ) => '11000', __( '12s', 'avia_framework' ) => '12000', __( '13s', 'avia_framework' ) => '13000', __( '14s', 'avia_framework' ) => '14000', __( '15s', 'avia_framework' ) => '15000', ); } public static function get_intro_animations():array { return array( array( __( 'None', 'avia_framework' ) => '', __( 'animate__bounce', 'avia_framework' ) => 'animate__animated animate__bounce', __( 'animate__flash', 'avia_framework' ) => 'animate__animated animate__flash', __( 'Back in down', 'avia_framework' ) => 'animate__animated animate__backInDown', __( 'Back in left', 'avia_framework' ) => 'animate__animated animate__backInLeft', __( 'Back in right', 'avia_framework' ) => 'animate__animated animate__backInRight', __( 'Back in up', 'avia_framework' ) => 'animate__animated animate__backInUp', __( 'Bounce in', 'avia_framework' ) => 'animate__animated animate__bounceIn', __( 'Bounce in down', 'avia_framework' ) => 'animate__animated animate__bounceInDown', __( 'Bounce in left', 'avia_framework' ) => 'animate__animated animate__bounceInLeft', __( 'Bounce in right', 'avia_framework' ) => 'animate__animated animate__bounceInRight', __( 'Bounce in up', 'avia_framework' ) => 'animate__animated animate__bounceInUp', __( 'Fade in', 'avia_framework' ) => 'animate__animated animate__fadeIn', __( 'Fade in bottom left', 'avia_framework' ) => 'animate__animated animate__fadeInBottomLeft', __( 'Fade in bottom right', 'avia_framework' ) => 'animate__animated animate__fadeInBottomRight', __( 'Fade in down', 'avia_framework' ) => 'animate__animated animate__fadeInDown', __( 'Fade down big', 'avia_framework' ) => 'animate__animated animate__fadeInDownBig', __( 'Fade in left', 'avia_framework' ) => 'animate__animated animate__fadeInLeft', __( 'Fade in left big', 'avia_framework' ) => 'animate__animated animate__fadeInLeftBig', __( 'Fade in right', 'avia_framework' ) => 'animate__animated animate__fadeInRight', __( 'Fade in right big', 'avia_framework' ) => 'animate__animated animate__fadeInRightBig', __( 'Fade in up', 'avia_framework' ) => 'animate__animated animate__fadeInUp', __( 'Fade in up big', 'avia_framework' ) => 'animate__animated animate__fadeInUpBig', __( 'Fade in top left', 'avia_framework' ) => 'animate__animated animate__fadeInTopLeft', __( 'Fade in top right', 'avia_framework' ) => 'animate__animated animate__fadeInTopRight', __( 'Flip', 'avia_framework' ) => 'animate__animated animate__flip', __( 'Flip X', 'avia_framework' ) => 'animate__animated animate__flipInX', __( 'Flip Y', 'avia_framework' ) => 'animate__animated animate__flipInY', __( 'Head Shake', 'avia_framework' ) => 'animate__animated animate__headShake', __( 'Heartbeat', 'avia_framework' ) => 'animate__animated animate__heartBeat', __( 'Hinge', 'avia_framework' ) => 'animate__animated animate__hinge', __( 'Jack In The Box', 'avia_framework' ) => 'animate__animated animate__jackInTheBox', __( 'Jello', 'avia_framework' ) => 'animate__animated animate__jello', __( 'Lightspeed in left', 'avia_framework' ) => 'animate__animated animate__lightSpeedInLeft', __( 'Lightspeed in right', 'avia_framework' ) => 'animate__animated animate__lightSpeedInRight', __( 'Mask', 'avia_framework' ) => 'animate__animated animate__pulse', __( 'Roll in', 'avia_framework' ) => 'animate__animated animate__rollIn', __( 'Rotate in', 'avia_framework' ) => 'animate__animated animate__rotateIn', __( 'Rotate down left', 'avia_framework' ) => 'animate__animated animate__rotateInDownLeft', __( 'Rotate in down right', 'avia_framework' ) => 'animate__animated animate__rotateInDownRight', __( 'Rotate in up left', 'avia_framework' ) => 'animate__animated animate__rotateInUpLeft', __( 'Rotate in up right', 'avia_framework' ) => 'animate__animated animate__rotateInUpRight', __( 'Rubber Band', 'avia_framework' ) => 'animate__animated animate__rubberBand', __( 'Shake X', 'avia_framework' ) => 'animate__animated animate__shakeX', __( 'Shake Y', 'avia_framework' ) => 'animate__animated animate__shakeY', __( 'Slide in', 'avia_framework' ) => 'animate__animated animate__slideInDown', __( 'Slide in left', 'avia_framework' ) => 'animate__animated animate__slideInLeft', __( 'Slide in right', 'avia_framework' ) => 'animate__animated animate__slideInRight', __( 'Slide in up', 'avia_framework' ) => 'animate__animated animate__slideInUp', __( 'Swing', 'avia_framework' ) => 'animate__animated animate__swing', __( 'Tada', 'avia_framework' ) => 'animate__animated animate__tada', __( 'Wobble', 'avia_framework' ) => 'animate__animated animate__wobble', __( 'Zoom in', 'avia_framework' ) => 'animate__animated animate__zoomIn', __( 'Zoom in down', 'avia_framework' ) => 'animate__animated animate__zoomInDown', __( 'Zoom in left', 'avia_framework' ) => 'animate__animated animate__zoomInLeft', __( 'Zoom in right', 'avia_framework' ) => 'animate__animated animate__zoomInRight', __( 'Zoom in up', 'avia_framework' ) => 'animate__animated animate__zoomInUp', ) ); } public static function get_button_links($type):array { $data = match ($type) { 'page' => get_pages(), default => get_posts(), }; $links = array(); foreach ($data as $link) { $links[__( $link->post_title, 'avia_framework' )] = $link->post_name; } return $links; } public static function get_full_percentage():array { $i = 1; $nums = array(); while ($i < 101) { $k = $i . '%'; $nums[$k] = $i . '%'; $i++; } return $nums; } public static function get_full_360():array { $i = 1; $nums = array(); while ($i < 361) { $k = $i; $nums[$k] = $i; $i++; } return $nums; } public static function create_button_link($atts, $b = 'button'):string { $link = ''; if (isset($atts[$b]) && $atts[$b] == 'yes') { switch ($atts[$b . '_link_type']) { case 'page': $link = home_url() . '/' . $atts[$b . '_page_link']; break; case 'post': $link .= home_url() . '/' . $atts[$b . '_post_link']; break; case 'custom': $link .= $atts[$b . '_custom_link']; break; default: } } return $link; } public static function get_seconds():array { return array( '1s' => '1s', '2s' => '2s', '3s' => '3s', '4s' => '4s', '5s' => '5s', '6s' => '6s', '7s' => '7s', '8s' => '8s', '9s' => '9s', '10s' => '10s', '11s' => '11s', '12s' => '12s', '13s' => '13s', '14s' => '14s', '15s' => '15s', '16s' => '16s', '17s' => '17s', '18s' => '18s', '19s' => '19s', '20s' => '20s', ); } public static function select_button_style():array { $arr = array ( __( 'Animated Gradient', 'avia_framework' ) => 'amg_1', __( 'Candied Colored 1', 'avia_framework' ) => 'amg_2', __( 'Candied Colored 2', 'avia_framework' ) => 'amg_3', __( 'Candied Colored 3', 'avia_framework' ) => 'amg_4', __( 'Candied Colored 4', 'avia_framework' ) => 'amg_5', __( 'Candied Colored 5', 'avia_framework' ) => 'amg_6', __( 'Candied Colored 6', 'avia_framework' ) => 'amg_7', __( 'Candied Colored 7', 'avia_framework' ) => 'amg_8', __( 'Candied Colored 8', 'avia_framework' ) => 'amg_9', __( 'Candied Colored 9', 'avia_framework' ) => 'amg_10', __( 'Candied Colored 10', 'avia_framework' ) => 'amg_11', __( 'Candied Colored 11', 'avia_framework' ) => 'amg_12', __( 'Candied Colored 12', 'avia_framework' ) => 'amg_13', __( 'Candied Colored 13', 'avia_framework' ) => 'amg_14', __( 'Candied Colored 14', 'avia_framework' ) => 'amg_15', __( 'Candied Colored 15', 'avia_framework' ) => 'amg_16', __( 'Candied Colored 16', 'avia_framework' ) => 'amg_17', __( 'Coin', 'avia_framework' ) => 'amg_18', __( 'Cold Light', 'avia_framework' ) => 'amg_19', __( 'Flip Box', 'avia_framework' ) => 'amg_20', __( 'Gradient', 'avia_framework' ) => 'amg_21', __( 'Gradient Glow', 'avia_framework' ) => 'amg_22', __( 'Gradient Hole', 'avia_framework' ) => 'amg_61', __( 'Hover 1', 'avia_framework' ) => 'amg_23', __( 'Hover 2', 'avia_framework' ) => 'amg_24', __( 'Hover 3', 'avia_framework' ) => 'amg_25', __( 'Hover 4', 'avia_framework' ) => 'amg_26', __( 'Label Slice', 'avia_framework' ) => 'amg_27', __( 'Liquid', 'avia_framework' ) => 'amg_28', __( 'Menu', 'avia_framework' ) => 'amg_29', __( 'Modern 1', 'avia_framework' ) => 'amg_30', __( 'Modern 2', 'avia_framework' ) => 'amg_31', __( 'Modern 3', 'avia_framework' ) => 'amg_32', __( 'Modern 4', 'avia_framework' ) => 'amg_33', __( 'Modern 5', 'avia_framework' ) => 'amg_34', __( 'Modern 6', 'avia_framework' ) => 'amg_35', __( 'Modern 7', 'avia_framework' ) => 'amg_36', __( 'Modern 8', 'avia_framework' ) => 'amg_37', __( 'Modern 9', 'avia_framework' ) => 'amg_38', __( 'Modern 10', 'avia_framework' ) => 'amg_39', __( 'Modern 11', 'avia_framework' ) => 'amg_40', __( 'Modern 12', 'avia_framework' ) => 'amg_41', __( 'Modern 13', 'avia_framework' ) => 'amg_42', __( 'Modern 14', 'avia_framework' ) => 'amg_43', __( 'Modern 15', 'avia_framework' ) => 'amg_44', __( 'Modern 16', 'avia_framework' ) => 'amg_45', __( 'Modern 17', 'avia_framework' ) => 'amg_46', __( 'Modern 18', 'avia_framework' ) => 'amg_47', __( 'Modern 19', 'avia_framework' ) => 'amg_48', __( 'Modern 20', 'avia_framework' ) => 'amg_49', __( 'Modern 21', 'avia_framework' ) => 'amg_50', __( 'Modern 22', 'avia_framework' ) => 'amg_51', __( 'Modern 23', 'avia_framework' ) => 'amg_52', __( 'Modern 24', 'avia_framework' ) => 'amg_53', __( 'Modern 25', 'avia_framework' ) => 'amg_54', __( 'Modern 26', 'avia_framework' ) => 'amg_55', __( 'Modern 27', 'avia_framework' ) => 'amg_56', __( 'Modern 28', 'avia_framework' ) => 'amg_57', __( 'Plastic', 'avia_framework' ) => 'amg_58', __( 'Neon Lines', 'avia_framework' ) => 'amg_59', __( 'Pulsating', 'avia_framework' ) => 'amg_60', __( 'Hover 4', 'avia_framework' ) => 'amg_62', __( 'Snake Border 2', 'avia_framework' ) => 'amg_63', __( 'Hover 5', 'avia_framework' ) => 'amg_64', __( 'Hover 6', 'avia_framework' ) => 'amg_65', __( 'Ripple', 'avia_framework' ) => 'amg_66', __( 'Snake Border 1', 'avia_framework' ) => 'amg_67', __( 'Gradient Hover Border', 'avia_framework' ) => 'amg_68', __( 'Pulsar', 'avia_framework' ) => 'amg_69', __( 'Neon Lights', 'avia_framework' ) => 'amg_70', __( 'Blend Mode', 'avia_framework' ) => 'amg_71', __( 'Bubble Bursts', 'avia_framework' ) => 'amg_72', ); ksort($arr, SORT_NATURAL); return $arr; } function amg_enfold_admin_menu() : void { add_options_page( 'AMG Enfold Extensions', 'AMG Enfold', 'manage_options', 'amg-enfold-options', array( $this, 'amg_enfold_admin_settings' ), '1' ); } function amg_enfold_admin_settings_init() : void { /// sticky banner text add_settings_section ( 'enfold_extensions_developer_section' , 'Developer' , '', 'amg-enfold-options' ); add_settings_section ( 'enfold_extensions_elements_section' , 'Active Elements' , '', 'amg-enfold-options' ); register_setting( 'amg-enfold-options', 'amg_enfold_developer_mode', array( 'type' => 'string', 'sanitize_callback' => 'sanitize_text_field', 'default' => 'no' ) ); add_settings_field( 'amg_enfold_developer_mode', 'Developer Mode On', array($this, 'amg_enfold_developer_mode_callback'), 'amg-enfold-options', 'enfold_extensions_developer_section' ); $count = count($this->elements); for ($i = 0; $i < $count; $i++) { register_setting( 'amg-enfold-options', "amg_enfold_extensions_{$this->elements[$i]}_active", array( 'type' => 'string', 'default' => '' ) ); add_settings_field( "amg_enfold_extensions_{$this->elements[$i]}_active", ucfirst($this->elements[$i]), array($this, 'amg_enfold_modules_callback'), 'amg-enfold-options', 'enfold_extensions_elements_section', $this->elements[$i] ); } $count = count($this->deletes); for ($k = 0; $i < $count; $k++) { $option = get_option("amg_enfold_extensions_{$this->deletes[$k]}_active"); if (!empty($option)) { delete_option("amg_enfold_extensions_{$this->deletes[$k]}_active"); } } } function amg_enfold_admin_settings(): void { require_once plugin_dir_path(__FILE__) . 'templates/admin_settings.php'; } public function amg_enfold_developer_mode_callback(): void { $checked = checked( 'yes', get_option( 'amg_enfold_developer_mode' ), false ); ?> <input type="checkbox" name="amg_enfold_developer_mode" value="yes" <?php echo $checked ?>/> <?php } public function amg_enfold_modules_callback($name): void { $field = "amg_enfold_extensions_{$name}_active"; $checked = checked( 'yes', get_option( $field ), false ); ?> <input type="checkbox" name="<?php echo $field ?>" value="yes" <?php echo $checked ?>/> <a title="view demo" href="<?php echo 'https://natesstg.wpenginepowered.com/' . $name . '/' ?>" target="_blank"><i class="fa-solid fa-arrow-up-right-from-square"></i></a> <?php } public static function amg_enfold_popup() : void { $html = "<div id='amg-enfold-popup' class=''>"; $html .= "<div id='amg-enfold-popup-bg'></div>"; $html .= "<div id='amg-enfold-popup-box'>"; $html .= "<div id='amg-enfold-popup-close'><i class='fi fi-br-circle-xmark'></i></div>"; $html .= "<div id='content'></div>"; $html .= "</div></div>"; echo $html; } public static function prepare_navigation(array $atts): array { $prev_button = ''; $next_button = ''; if (isset($atts['navigation']) && $atts['navigation'] == 'yes') { $prev_button = "<div class='swiper-button-prev'></div>"; $next_button = '<div class="swiper-button-next"></div>'; } if (isset($atts['pagination']) && $atts['pagination'] == 'yes') { $pagination = "<div class='swiper-pagination'></div>"; } $above = ''; $below = ''; $side = ''; if (isset($atts['navigation_position']) && $atts['navigation_position'] == 'above' && $atts['nav_layout'] == 'custom') { $above = "<div class='swiper-nav-wrapper above'>"; $above .= $prev_button; $above .= $pagination; $above .= $next_button; $above .= '</div>'; } else if (isset($atts['navigation_position']) && $atts['navigation_position'] == 'below' && $atts['nav_layout'] == 'custom') { $below = "<div class='swiper-nav-wrapper below'>"; $below .= $prev_button; $below .= $pagination; $below .= $next_button; $below .= '</div>'; } else { $below = $pagination; $side = $prev_button; $side .= $next_button; } return array($atts, $above, $below, $side); } public static function amg_enfold_section($title) : array { $c = null; $template = null; switch ($title) { case 'Button': $c = array( array( 'name' => __( 'Enable?', 'avia_framework' ), 'desc' => __( 'Choosing yes enables the button for this single element.', 'avia_framework' ), 'id' => 'button', 'type' => 'select', 'std' => 'no', 'lockable' => true, 'subtype' => array( __( 'No', 'avia_framework' ) => 'no', __( 'Yes', 'avia_framework' ) => 'yes' , ) ), array( 'name' => __( 'Button Label', 'avia_framework' ), 'desc' => __( 'This is the text that appears on your button.', 'avia_framework' ), 'id' => 'label', 'type' => 'input', 'std' => __( 'Contact Us', 'avia_framework' ), 'required' => array( 'button', 'equals', 'yes' ), 'lockable' => true ), /* array( 'name' => __( 'Show Button Icon', 'avia_framework' ), 'desc' => __( 'Should an icon be displayed at the left or right side of the button', 'avia_framework' ), 'id' => 'button_icon_select', 'type' => 'select', 'std' => 'yes', 'lockable' => true, 'required' => array( 'button', 'equals', 'yes' ), 'subtype' => array( __( 'No Icon', 'avia_framework' ) => 'no', __( 'Display icon to the left', 'avia_framework' ) => 'yes' , __( 'Display icon to the right', 'avia_framework' ) => 'yes-right-icon', ) ), array( 'name' => __( 'Button Icon', 'avia_framework' ), 'desc' => __( 'Select an icon for your Button below', 'avia_framework' ), 'id' => 'button_icon', 'type' => 'iconfont', 'std' => '', 'lockable' => true, 'locked' => array( 'button_icon', 'font' ), 'required' => array( 'button_icon_select', 'not_empty_and', 'no' ) ), array( 'name' => __( 'Icon Visibility', 'avia_framework' ), 'desc' => __( 'Check to only display icon on hover', 'avia_framework' ), 'id' => 'button_icon_hover', 'type' => 'checkbox', 'std' => '', 'lockable' => true, 'required' => array( 'button_icon_select', 'not_empty_and', 'no' ) )*/ ); break; case 'Link Settings': $template = array( array( 'type' => 'template', 'template_id' => 'linkpicker_toggle', 'name' => __( 'Button Link', 'avia_framework' ), 'desc' => __( 'Where should your button link to?', 'avia_framework' ), 'subtypes' => array( 'manually', 'single', 'taxonomy' ), 'target_id' => 'link_target', 'lockable' => true ), ); break; case 'Appearance': $c = array( array( 'name' => __( 'Button Size', 'avia_framework' ), 'desc' => __( 'Choose the size of your button here.', 'avia_framework' ), 'id' => 'size', 'type' => 'select', 'std' => 'small', 'lockable' => true, 'subtype' => array( __( 'Small', 'avia_framework' ) => 'small', __( 'Medium', 'avia_framework' ) => 'medium', __( 'Large', 'avia_framework' ) => 'large', __( 'X Large', 'avia_framework' ) => 'x-large' ) ), array( 'name' => __( 'Button Position', 'avia_framework' ), 'desc' => __( 'Choose the alignment of your button here', 'avia_framework' ), 'id' => 'position', 'type' => 'select', 'std' => 'center', 'lockable' => true, 'subtype' => array( __( 'Align Left', 'avia_framework' ) => 'left', __( 'Align Center', 'avia_framework' ) => 'center', __( 'Align Right', 'avia_framework' ) => 'right', ), 'required' => array( 'size', 'not', 'fullwidth' ) ), array( 'name' => __( 'Button Label Display', 'avia_framework' ), 'desc' => __( 'Select how to display the label', 'avia_framework' ), 'id' => 'label_display', 'type' => 'select', 'std' => '', 'lockable' => true, 'subtype' => array( __( 'Always display', 'avia_framework' ) => '', __( 'Display on hover', 'avia_framework' ) => 'av-button-label-on-hover', ) ), array( 'name' => __( 'Button Title Attribute', 'avia_framework' ), 'desc' => __( 'Add a title attribute for this button.', 'avia_framework' ), 'id' => 'title_attr', 'type' => 'input', 'std' => '', 'required' => array( 'label_display', 'equals', '' ) ), ); break; case 'Font Sizes': $c = array( array( 'name' => __( 'Button Text Font Sizes', 'avia_framework' ), 'desc' => __( 'Select a custom font size for the button text.', 'avia_framework' ), 'type' => 'template', 'template_id' => 'font_sizes_icon_switcher', 'textfield' => true, 'lockable' => true, 'subtype' => array( 'default' => AviaHtmlHelper::number_array( 10, 90, 1, array( __( 'Use Default', 'avia_framework' ) => '' ), 'px' ), 'desktop' => AviaHtmlHelper::number_array( 10, 90, 1, array( __( 'Use Default', 'avia_framework' ) => '' ), 'px' ), 'medium' => AviaHtmlHelper::number_array( 10, 90, 1, array( __( 'Use Default', 'avia_framework' ) => '', __( 'Hidden', 'avia_framework' ) => 'hidden' ), 'px' ), 'small' => AviaHtmlHelper::number_array( 10, 90, 1, array( __( 'Use Default', 'avia_framework' ) => '', __( 'Hidden', 'avia_framework' ) => 'hidden' ), 'px' ), 'mini' => AviaHtmlHelper::number_array( 10, 90, 1, array( __( 'Use Default', 'avia_framework' ) => '', __( 'Hidden', 'avia_framework' ) => 'hidden' ), 'px' ) ), 'id_sizes' => array( 'default' => 'size-text', 'desktop' => 'av-desktop-font-size-text', 'medium' => 'av-medium-font-size-text', 'small' => 'av-small-font-size-text', 'mini' => 'av-mini-font-size-text' ) ), array( 'name' => __( 'Button Icon Font Sizes', 'avia_framework' ), 'desc' => __( 'Select a custom font size for the button text.', 'avia_framework' ), 'type' => 'template', 'template_id' => 'font_sizes_icon_switcher', 'textfield' => true, 'lockable' => true, 'subtype' => array( 'default' => AviaHtmlHelper::number_array( 10, 90, 1, array( __( 'Use Default', 'avia_framework' ) => '' ), 'px' ), 'desktop' => AviaHtmlHelper::number_array( 10, 90, 1, array( __( 'Use Default', 'avia_framework' ) => '' ), 'px' ), 'medium' => AviaHtmlHelper::number_array( 10, 90, 1, array( __( 'Use Default', 'avia_framework' ) => '', __( 'Hidden', 'avia_framework' ) => 'hidden' ), 'px' ), 'small' => AviaHtmlHelper::number_array( 10, 90, 1, array( __( 'Use Default', 'avia_framework' ) => '', __( 'Hidden', 'avia_framework' ) => 'hidden' ), 'px' ), 'mini' => AviaHtmlHelper::number_array( 10, 90, 1, array( __( 'Use Default', 'avia_framework' ) => '', __( 'Hidden', 'avia_framework' ) => 'hidden' ), 'px' ) ), 'id_sizes' => array( 'default' => 'size-button-icon', 'desktop' => 'av-desktop-font-size-button-icon', 'medium' => 'av-medium-font-size-button-icon', 'small' => 'av-small-font-size-button-icon', 'mini' => 'av-mini-font-size-button-icon' ) ) ); break; case 'Button Margin And Padding': $template = array( array( 'type' => 'template', 'template_id' => 'margin_padding', 'toggle' => true, 'name' => __( 'Margin And Padding', 'avia_framework' ), 'desc' => __( 'Set a responsive margin and a padding to text for the button.', 'avia_framework' ), 'lockable' => true, ) ); break; case 'Colors': $c = array( array( 'name' => __( 'Button Colors Selection', 'avia_framework' ), 'desc' => __( "Choose the available options for button colors. Switching to advanced options for already existing buttons you need to set all options (color settings from basic options are ignored)", 'avia_framework' ), 'id' => 'color_options', 'type' => 'select', 'std' => '', 'lockable' => true, 'subtype' => array( __( 'Basic options only', 'avia_framework' ) => '', __( 'Advanced options', 'avia_framework' ) => 'color_options_advanced', ) ), array( 'type' => 'template', 'template_id' => 'named_colors', 'custom' => true, 'lockable' => true, 'required' => array( 'color_options', 'equals', '' ) ), array( 'name' => __( 'Custom Background Color', 'avia_framework' ), 'desc' => __( 'Select a custom background color for your button here', 'avia_framework' ), 'id' => 'custom_bg', 'type' => 'colorpicker', 'std' => '#444444', 'lockable' => true, 'required' => array( 'color', 'equals', 'custom' ) ), array( 'name' => __( 'Custom Font Color', 'avia_framework' ), 'desc' => __( 'Select a custom font color for your button here', 'avia_framework' ), 'id' => 'custom_font', 'type' => 'colorpicker', 'std' => '#ffffff', 'lockable' => true, 'required' => array( 'color', 'equals', 'custom') ), array( 'type' => 'template', 'template_id' => 'button_colors', 'color_id' => 'btn_color', 'custom_id' => 'btn_custom', 'lockable' => true, 'required' => array( 'color_options', 'not', '' ) ) ); break; case 'Animation': $c = array( array( 'type' => 'template', 'template_id' => 'animation', 'lockable' => true, 'std_none' => '', 'name' => __( 'Button Animation', 'avia_framework' ), 'desc' => __( 'Add a small animation to the button when the user first scrolls to the button position. This is only to add some "spice" to the site and only works in modern browsers and only on desktop computers to keep page rendering as fast as possible.', 'avia_framework' ), 'groups' => array( 'fade', 'slide', 'rotate', 'fade-adv', 'special' ) ) ); break; case 'Content': $c = array( array( 'name' => __( 'Content Display', 'avia_framework' ), 'desc' => __( 'Choose to display the content in a popup or below the slides.', 'avia_framework' ), 'id' => 'content_layout', 'type' => 'select', 'std' => '', 'lockable' => true, 'subtype' => array( __( 'No Display', 'avia_framework' ) => '', __( 'Display content in popup', 'avia_framework' ) => 'popup', __( 'Display content below slides', 'avia_framework' ) => 'inline' ), ), array( 'name' => __( 'Max Width', 'avia_framework' ), 'desc' => __( 'This is the width of your content box.', 'avia_framework' ), 'id' => 'popup_max_width', 'type' => 'input', 'std' => '750px', 'lockable' => true, 'required' => array( 'content_layout', 'not', '' ), 'container_class' => 'av_third av_third_first' ), array( 'name' => __( 'Min Height', 'avia_framework' ), 'desc' => __( 'This is the min-height of your content box.', 'avia_framework' ), 'id' => 'popup_min_height', 'type' => 'input', 'std' => '320px', 'lockable' => true, 'required' => array( 'content_layout', 'not', '' ), 'container_class' => 'av_third' ), array( 'name' => __( 'Text Align', 'avia_framework' ), 'desc' => __( 'Figure it out.', 'avia_framework' ), 'id' => 'popup_text_align', 'type' => 'select', 'std' => 'center', 'lockable' => true, 'required' => array( 'content_layout', 'not', '' ), 'container_class' => 'av_third', 'subtype' => array( __( 'Left', 'avia_framework' ) => 'left', __( 'Center', 'avia_framework' ) => 'center', __( 'Right', 'avia_framework' ) => 'right' ), ), array( 'name' => __( 'Container BG Color', 'avia_framework' ), 'desc' => __( 'This is the background of the content box', 'avia_framework' ), 'id' => 'popup_background_color', 'type' => 'colorpicker', 'std' => '', 'rgba' => true, 'lockable' => true, 'required' => array( 'content_layout', 'equals', 'popup' ), 'container_class' => 'av_half av_half_first' ), array( 'name' => __( 'Background BG Color', 'avia_framework' ), 'desc' => __( 'This is the full page background when the popup is visible.', 'avia_framework' ), 'id' => 'popup_bg_color', 'type' => 'colorpicker', 'std' => '', 'rgba' => true, 'lockable' => true, 'required' => array( 'content_layout', 'equals', 'popup' ), 'container_class' => 'av_half' ), array( 'name' => __( 'Border Radius', 'avia_framework' ), 'desc' => __( 'Set the border radius of the content box.', 'avia_framework' ), 'id' => 'popup_border_radius', 'type' => 'multi_input', 'sync' => true, 'std' => '24px', 'lockable' => true, 'required' => array( 'content_layout', 'not', '' ), 'multi' => array( 'top' => __( 'Top-Left-Radius', 'avia_framework' ), 'right' => __( 'Top-Right-Radius', 'avia_framework' ), 'bottom' => __( 'Bottom-Right-Radius', 'avia_framework' ), 'left' => __( 'Bottom-Left-Radius', 'avia_framework' ) ), ), array( 'type' => 'template', 'template_id' => 'box_shadow', 'id' => 'popup_box_shadow', 'names' => array( __( 'Box Shadow', 'avia_framework' ), __( 'Box Shadow Styling ', 'avia_framework' ), __( 'Box Shadow Color', 'avia_framework' ) ), 'default_check' => true, 'lockable' => true, 'required' => array( 'content_layout', 'not', '' ) ) ); break; case 'Navigation': $c = array( array( 'name' => __( 'Navigation Layout', 'avia_framework' ), 'desc' => __( 'Either use the widget default colors or apply some custom ones', 'avia_framework' ), 'id' => 'nav_layout', 'type' => 'select', 'std' => '', 'lockable' => true, 'subtype' => array( __( 'Default', 'avia_framework' ) => '', __( 'Define Custom layout', 'avia_framework' ) => 'custom' ), ), array( 'name' => __( 'Vertical Position', 'avia_framework' ), 'desc' => __( 'Define the vertical position of the navigation controls', 'avia_framework' ), 'id' => 'navigation_position', 'type' => 'select', 'std' => '', 'lockable' => true, 'required' => array( 'nav_layout', 'equals', 'custom' ), 'subtype' => array( __( 'Default', 'avia_framework' ) => '', __( 'Above', 'avia_framework' ) => 'above', __( 'Below', 'avia_framework' ) => 'below', ) ), array( 'name' => __( 'Controls Max Width', 'avia_framework' ), 'desc' => __( 'Enter the max width of the navigation controls', 'avia_framework' ), 'id' => 'nav_max_width', 'type' => 'input', 'std' => '100%', 'lockable' => true, 'required' => array( 'navigation_position', 'not', ''), ), array( 'name' => __( 'Horizontal Alignment', 'avia_framework' ), 'desc' => __( 'This only works if navigation controls are not 100% max width', 'avia_framework' ), 'id' => 'navigation_alignment', 'type' => 'select', 'std' => 'center', 'lockable' => true, 'required' => array( 'navigation_position', 'not', ''), 'subtype' => array( __( 'Left', 'avia_framework' ) => 'left', __( 'Center', 'avia_framework' ) => 'center', __( 'Right', 'avia_framework' ) => 'right', ) ), array( 'name' => __( 'Horizontal Offset', 'avia_framework' ), 'desc' => __( 'Enter a CSS value (50px) to push the controls towards center', 'avia_framework' ), 'id' => 'nav_offset', 'type' => 'input', 'std' => '0', 'lockable' => true, 'required' => array( 'navigation_alignment', 'not', 'center'), ), array( 'name' => __( 'Button Width', 'avia_framework' ), 'desc' => __( 'Button width in a CSS value', 'avia_framework' ), 'id' => 'nav_width', 'type' => 'input', 'std' => '50px', 'lockable' => true, 'required' => array( 'nav_layout', 'equals', 'custom' ), 'container_class' => 'av_half av_half_first' ), array( 'name' => __( 'Button Height', 'avia_framework' ), 'desc' => __( 'Button height in a CSS value', 'avia_framework' ), 'id' => 'nav_height', 'type' => 'input', 'std' => '50px', 'lockable' => true, 'required' => array( 'nav_layout', 'equals', 'custom' ), 'container_class' => 'av_half' ), array( 'name' => __( 'Button Border Radius', 'avia_framework' ), 'desc' => __( 'Set the border radius of the button', 'avia_framework' ), 'id' => 'nav_radius', 'type' => 'multi_input', 'sync' => true, 'std' => '50%', 'lockable' => true, 'required' => array( 'nav_layout', 'equals', 'custom' ), 'multi' => array( 'top' => __( 'Top-Left-Radius', 'avia_framework' ), 'right' => __( 'Top-Right-Radius', 'avia_framework' ), 'bottom' => __( 'Bottom-Right-Radius', 'avia_framework' ), 'left' => __( 'Bottom-Left-Radius', 'avia_framework' ) ), ), ); break; case 'Image': $c = array( array( 'name' => __( 'Image Size and Orientation', 'avia_framework' ), 'desc' => __( 'Either use the widget default colors or apply some custom ones', 'avia_framework' ), 'id' => 'orientation_and_size', 'type' => 'select', 'std' => '', 'lockable' => true, 'subtype' => AbstraktEnfoldExtensions::get_image_sizes(), ), array( 'name' => __( 'Image Aspect Ratio', 'avia_framework' ), 'desc' => __( 'Enter the CSS value as a fraction, ie 16/9', 'avia_framework' ), 'id' => 'aspect_ratio', 'type' => 'input', 'std' => '', 'lockable' => true, 'required' => array( 'orientation_and_size', 'not', '' ), 'container_class' => 'av_third av_third_first' ), array( 'name' => __( 'Image Object Fit', 'avia_framework' ), 'desc' => __( 'Select one of the CSS values or choose none.', 'avia_framework' ), 'id' => 'object_fit', 'type' => 'select', 'std' => 'cover', 'lockable' => true, 'required' => array( 'orientation_and_size', 'not', '' ), 'container_class' => 'av_third', 'subtype' => array( __( 'None', 'avia_framework' ) => 'none', __( 'Fill', 'avia_framework' ) => 'fill', __( 'Contain', 'avia_framework' ) => 'contain', __( 'Cover', 'avia_framework' ) => 'cover', __( 'Scale Down', 'avia_framework' ) => 'scale-down' ), ), array( 'name' => __( 'Image Object Position', 'avia_framework' ), 'desc' => __( 'Enter a css value ie 50% 50% or left top', 'avia_framework' ), 'id' => 'object_position', 'type' => 'input', 'std' => 'center center', 'lockable' => true, 'required' => array( 'orientation_and_size', 'not', '' ), 'container_class' => 'av_third', ), ); break; case 'Container': $c = array( array( 'name' => __( 'Slides Layout', 'avia_framework' ), 'desc' => __( 'Either use the widget default colors or apply some custom ones', 'avia_framework' ), 'id' => 'slides_layout', 'type' => 'select', 'std' => '', 'lockable' => true, 'subtype' => array( __( 'Default', 'avia_framework' ) => '', __( 'Define Custom layout', 'avia_framework' ) => 'custom' ), ), array( 'name' => __( 'Badge Max Width', 'avia_framework' ), 'desc' => __( 'Enter the badges title here (Better keep it short)', 'avia_framework' ), 'id' => 'max_width', 'type' => 'input', 'std' => '250px', 'lockable' => true, 'required' => array( 'slides_layout', 'equals', 'custom' ), 'container_class' => 'av_half av_half_first' ), array( 'name' => __( 'Badge Min Height', 'avia_framework' ), 'desc' => __( 'Enter the badges title here (Better keep it short)', 'avia_framework' ), 'id' => 'min_height', 'type' => 'input', 'std' => '400px', 'lockable' => true, 'required' => array( 'slides_layout', 'equals', 'custom' ), 'container_class' => 'av_half' ), array( 'name' => __( 'Badge Border Radius', 'avia_framework' ), 'desc' => __( 'Set the border radius of the column', 'avia_framework' ), 'id' => 'border_radius', 'type' => 'multi_input', 'sync' => true, 'std' => '', 'lockable' => true, 'required' => array( 'slides_layout', 'equals', 'custom' ), 'multi' => array( 'top' => __( 'Top-Left-Radius', 'avia_framework' ), 'right' => __( 'Top-Right-Radius', 'avia_framework' ), 'bottom' => __( 'Bottom-Right-Radius', 'avia_framework' ), 'left' => __( 'Bottom-Left-Radius', 'avia_framework' ) ), ), ); break; } if (!is_array($template)) { $template = array( array( 'type' => 'template', 'template_id' => 'toggle', 'title' => __( $title, 'avia_framework' ), 'content' => $c ), ); } return $template; } public static function amg_enfold_inline($atts) : string { $output = ''; if ($atts['content_layout'] == 'inline') { $output .= "<div id='amg-enfold-inline'>"; $output .= "<div id='amg-enfold-inline-box'>"; $output .= "<div id='content'></div>"; $output .= "</div>"; $output .= "</div>"; } return $output; } public static function amg_button_append_selectors($selectors, $element_id) : array { $selectors['wrap'] = "#top #wrap_all .accordionContainer.{$element_id} .c-accordion .c-accordion__item .avia-button-wrap.button-wrap"; $selectors['wrap-animation'] = "#top #wrap_all .accordionContainer.{$element_id} .c-accordion .c-accordion__item .avia_transform .avia-button-wrap.button-wrap"; $selectors['button_container'] = "#top #wrap_all .accordionContainer.{$element_id} .c-accordion .c-accordion__item .avia-button"; $selectors['container-hover'] = "#top #wrap_all .accordionContainer.{$element_id} .c-accordion .c-accordion__item .avia-button:hover"; $selectors['container-hover-overlay'] = "#top #wrap_all .accordionContainer.{$element_id} .c-accordion .c-accordion__item .avia-button:hover .avia_button_background"; $selectors['container-after'] = "#top #wrap_all .accordionContainer.{$element_id} .c-accordion .c-accordion__item .avia-button.avia-sonar-shadow:after"; $selectors['container-after-hover'] = "#top #wrap_all .accordionContainer.{$element_id} .c-accordion .c-accordion__item .avia-button.avia-sonar-shadow:hover:after"; $selectors['curtain'] = "#top #wrap_all .accordionContainer.{$element_id} .c-accordion .c-accordion__item .avia-button-wrap.button-wrap .avia-curtain-reveal-overlay"; $selectors['button_icon'] = "#top #wrap_all .accordionContainer.{$element_id} .c-accordion .c-accordion__item .amg-button-wrap .amg-tab-icon"; return $selectors; } public static function amg_create_button(array $atts, array $meta, $container_class, $style_tag, $wrap_class, $background_hover ):string { $data = ''; /* if( $atts['button_icon_select'] == 'yes' ) { $atts['button_icon_select'] = 'yes-left-icon'; } $fonts = explode(',', $atts['font']); $font = $fonts[1] ?? $fonts[0]; $display_char = av_icon( $atts['button_icon'], $font );*/ if( ! empty( $atts['label_display'] ) && $atts['label_display'] == 'av-button-label-on-hover' ) { $data .= 'data-avia-tooltip="' . htmlspecialchars( $atts['label'] ) . '"'; $atts['label'] = ''; } $blank = AviaHelper::get_link_target( $atts['link_target'] ); $link = AviaHelper::get_url( $atts['link'] ); $link = ( ( $link == 'http://' ) || ( $link == 'manually' ) ) ? '' : $link; $title_attr = ! empty( $atts['title_attr'] ) && empty( $atts['label_display'] ) ? 'title="' . esc_attr( $atts['title_attr'] ) . '"' : ''; $content_html = ''; /*if( 'yes-left-icon' == $atts['button_icon_select'] ) { $content_html .= "<span class='avia_button_icon avia_button_icon_left'></span>"; }*/ $content_html .= "<span class='avia_iconbox_title' >{$atts['label']}</span>"; /*if( 'yes-right-icon' == $atts['button_icon_select'] ) { $content_html .= "<span class='avia_button_icon avia_button_icon_right' {$display_char}></span>"; }*/ $curtain_reveal_overlay = ''; $html = ''; $html .= $style_tag; $html .= "<a href='{$link}' {$data} class='{$container_class}' {$blank} {$title_attr}>"; $html .= $curtain_reveal_overlay; $html .= $content_html; $html .= $background_hover; $html .= '</a>'; $output = "<div {$meta['custom_el_id']} class='avia-button-wrap {$wrap_class} avia-button-{$atts['position']} {$meta['el_class']}'>"; //$output .= $curtain_reveal_overlay; $output .= $html; $output .= '</div>'; return $output; } } } new AbstraktEnfoldExtensions(); require 'plugin-update-checker-master/plugin-update-checker.php'; use YahnisElsts\PluginUpdateChecker\v5\PucFactory; $myUpdateChecker = PucFactory::buildUpdateChecker( 'https://nates1dev.wpengine.com/wp-content/uploads/enfold-extensions/info.json', __FILE__, //Full path to the main plugin file or functions.php. 'abstrakt-enfold-extensions' );
March 5, 2025 at 5:45 pm #1478688In reply to: Enfold 7.0
Here is the main file. the structure is included int the image. You might need to look at the include classes function and limit it to just cards.php for demo also you won’t have any of the CSS but we don’t need that to work for testing.
(hosted on WPengine) alt="Screenshot" />
functions.php of the plugin
<?php
/*..
Plugin Name: Abstrakt Enfold Extensions
Plugin URI: https://abstraktmg.com
Description: Plugin for Abstrakt Marketing Group Designers Only
Author: Nathaniel Riggins
Author URI: https://abstraktmg.com
Version: 2.0.5
License: Private
*/if ( !defined(‘ABSPATH’) ) { die(‘-1’); }
if (!class_exists(‘AbstraktEnfoldExtensions’)) {
class AbstraktEnfoldExtensions {public string $plugin;
private array $elements = array(
‘accordion’,
‘aces’,
‘badges’,
‘billboard’,
‘bulletin’,
‘button’,
‘cards’,
‘carousel’,
‘crawl’,
‘cube’,
‘deck’,
‘fashion’,
‘glow’,
‘hero’,
‘marquee’,
‘material’,
‘panorama’,
‘paper’,
‘pricing’,
‘rotators’,
‘tabs’,
‘testimonials’,
‘triple’,
‘versa’,
‘wall’,
‘waves’,
);
private array $deletes = array(
‘animate’,
‘blocks’,
‘intros’,
‘navi’,
‘neon’,
‘podcasts’,
‘posters’,
‘sticky’,
‘text’,
‘traveler’,
);
// Class construct
function __construct() {
$this->plugin = plugin_basename(__FILE__);
add_action(‘wp_enqueue_scripts’, array($this, ‘load_scripts’));
add_action(‘admin_enqueue_scripts’, array($this, ‘load_admin_scripts’));
add_action(‘init’, array($this, ‘includeClasses’));
add_action(‘avia_builder_mode’, array($this, ‘builder_set_debug’));
add_action(‘admin_menu’, array($this, ‘amg_enfold_admin_menu’));
add_action(‘admin_init’, array($this, ‘amg_enfold_admin_settings_init’));
add_action(‘wp_footer’, array($this, ‘amg_enfold_popup’));
add_action( ‘init’, array($this, ‘add_all_image_sizes’));
}
function add_all_image_sizes() :void
{
///// AUTO SIZES ///
add_image_size( ‘amg-auto-300’, 300);
add_image_size( ‘amg-auto-500’, 500);
add_image_size( ‘amg-auto-750’, 750);
add_image_size( ‘amg-auto-1000’, 1000);
add_image_size( ‘amg-auto-1250’, 1250);
add_image_size( ‘amg-auto-1500’, 1500);
add_image_size( ‘amg-auto-2000’, 2000);
add_image_size( ‘amg-portrait-300’, 300, 400, true );
add_image_size( ‘amg-portrait-450’, 450, 600, true );
add_image_size( ‘amg-portrait-600’, 600, 800, true );
add_image_size( ‘amg-portrait-750’, 750, 1000, true );
add_image_size( ‘amg-landscape-320’, 320, 180, true );
add_image_size( ‘amg-landscape-480’, 480, 270, true );
add_image_size( ‘amg-landscape-720’, 720, 405, true );
add_image_size( ‘amg-landscape-960’, 960, 540, true );
add_image_size( ‘amg-landscape-1440’, 1440, 810, true );
add_image_size( ‘amg-landscape-1920’, 1920, 1080, true );
}
function builder_set_debug()
{
return “debug”;
}
public static function get_image_sizes() : array
{
return array(
__( ‘None’, ‘avia_framework’ ) => ”,
__( ‘Auto 300w’, ‘avia_framework’ ) => ‘amg-auto-300’,
__( ‘Auto 500w’, ‘avia_framework’ ) => ‘amg-auto-500’,
__( ‘Auto 750w’, ‘avia_framework’ ) => ‘amg-auto-750’,
__( ‘Auto 1000w’, ‘avia_framework’ ) => ‘amg-auto-1000’,
__( ‘Auto 1250w’, ‘avia_framework’ ) => ‘amg-auto-1250’,
__( ‘Auto 1500w’, ‘avia_framework’ ) => ‘amg-auto-1500’,
__( ‘Auto 2000w’, ‘avia_framework’ ) => ‘amg-auto-2000’,__( ‘Portrait 300w’, ‘avia_framework’ ) => ‘amg-portrait-300’,
__( ‘Portrait 450w’, ‘avia_framework’ ) => ‘amg-portrait-450’,
__( ‘Portrait 600w’, ‘avia_framework’ ) => ‘amg-portrait-600’,
__( ‘Portrait 750w’, ‘avia_framework’ ) => ‘amg-portrait-750’,__( ‘Landscape 320w’, ‘avia_framework’ ) => ‘amg-landscape-320’,
__( ‘Landscape 480w’, ‘avia_framework’ ) => ‘amg-landscape-480’,
__( ‘Landscape 720w’, ‘avia_framework’ ) => ‘amg-landscape-720’,
__( ‘Landscape 960w’, ‘avia_framework’ ) => ‘amg-landscape-960’,
__( ‘Landscape 1440w’, ‘avia_framework’ ) => ‘amg-landscape-1440’,
__( ‘Landscape 1920w’, ‘avia_framework’ ) => ‘amg-landscape-1920’,
);
}public static function get_plugin_version():string
{
$data = get_plugin_data(__FILE__);
return $data[‘Version’];
}public static function developMode():bool {
return get_option(‘amg_enfold_developer_mode’) == ‘yes’;
}
public function includeClasses():void {$count = count($this->elements);
for ($i = 0; $i < $count; $i++) {
if (get_option(“amg_enfold_extensions_{$this->elements[$i]}_active”) == ‘yes’) {
include plugin_dir_path( __FILE__ ) . “/enfold/{$this->elements[$i]}/{$this->elements[$i]}.php”;
}
}
}
public function load_admin_scripts():void
{
$ver = AbstraktEnfoldExtensions::get_plugin_version();
$developMode = AbstraktEnfoldExtensions::developMode();
$lastmodtime = $developMode ? rand(1, 999999999) : $ver;
wp_enqueue_style(‘amg-admin-enfold’, plugin_dir_url(__FILE__) . ‘css/style.min.css’, false, $lastmodtime);
wp_enqueue_script(‘amg-admin-enfold-fontawesome’, ‘https://kit.fontawesome.com/ececabbde4.js’, false, $lastmodtime);
}public function load_scripts():void {
$ver = AbstraktEnfoldExtensions::get_plugin_version();
$developMode = AbstraktEnfoldExtensions::developMode();
$lastmodtime = $developMode ? rand(1, 999999999) : $ver;
wp_enqueue_style(‘amg-enfold-icons’, plugin_dir_url(__FILE__) . ‘css/uicons.min.css’, array(‘avia-layout’), $lastmodtime);
wp_enqueue_style( ‘amg-css-animate’, plugin_dir_url(__FILE__) . “css/animateCSS.min.css”, array( ‘avia-layout’ ) );
wp_enqueue_style(‘amg-enfold’, plugin_dir_url(__FILE__) . ‘css/style.min.css’, array(‘avia-layout’), $lastmodtime);
wp_enqueue_style(‘amg-swiper’, plugin_dir_url(__FILE__) . ‘css/swiper.css’, array(‘avia-layout’), $lastmodtime);
wp_enqueue_script( ‘amg-gsap’, plugin_dir_url(__FILE__) . “js/gsap.min.js”, array( ‘amg-swiper’ ), $lastmodtime, true );
wp_enqueue_script( ‘amg-enfold’, plugin_dir_url(__FILE__) . “js/script.min.js”, array(), $lastmodtime );
wp_enqueue_script( ‘amg-swiper’, plugin_dir_url(__FILE__) . “js/swiper.js”, array(), $lastmodtime );
}
public static function get_duration_times():array {
return array(
__( ‘None’, ‘avia_framework’ ) => ”,
__( ‘0.1s’, ‘avia_framework’ ) => ‘s100’,
__( ‘0.2s’, ‘avia_framework’ ) => ‘s200’,
__( ‘0.3s’, ‘avia_framework’ ) => ‘s300’,
__( ‘0.4s’, ‘avia_framework’ ) => ‘s400’,
__( ‘0.5s’, ‘avia_framework’ ) => ‘s500’,
__( ‘0.6s’, ‘avia_framework’ ) => ‘s600’,
__( ‘0.7s’, ‘avia_framework’ ) => ‘s700’,
__( ‘0.8s’, ‘avia_framework’ ) => ‘s800’,
__( ‘0.9s’, ‘avia_framework’ ) => ‘s900’,
__( ‘1s’, ‘avia_framework’ ) => ‘s1000’,
__( ‘1.1s’, ‘avia_framework’ ) => ‘s1100’,
__( ‘1.2s’, ‘avia_framework’ ) => ‘s1200’,
__( ‘1.3s’, ‘avia_framework’ ) => ‘s1300’,
__( ‘1.4s’, ‘avia_framework’ ) => ‘s1400’,
__( ‘1.5s’, ‘avia_framework’ ) => ‘s1500’,
__( ‘1.6s’, ‘avia_framework’ ) => ‘s1600’,
__( ‘1.7s’, ‘avia_framework’ ) => ‘s1700’,
__( ‘1.8s’, ‘avia_framework’ ) => ‘s1800’,
__( ‘1.9s’, ‘avia_framework’ ) => ‘s1900’,
__( ‘2s’, ‘avia_framework’ ) => ‘s2000’,
__( ‘2.1s’, ‘avia_framework’ ) => ‘s2100’,
__( ‘2.2s’, ‘avia_framework’ ) => ‘s2200’,
__( ‘2.3s’, ‘avia_framework’ ) => ‘s2300’,
__( ‘2.4s’, ‘avia_framework’ ) => ‘s2400’,
__( ‘2.5s’, ‘avia_framework’ ) => ‘s2500’,
__( ‘2.6s’, ‘avia_framework’ ) => ‘s2600’,
__( ‘2.7s’, ‘avia_framework’ ) => ‘s2700’,
__( ‘2.8s’, ‘avia_framework’ ) => ‘s2800’,
__( ‘2.9s’, ‘avia_framework’ ) => ‘s2900’,
__( ‘3s’, ‘avia_framework’ ) => ‘s3000’,
);
}
public static function get_delay_times():array {
return array(
__( ‘None’, ‘avia_framework’ ) => ”,
__( ‘0.1s’, ‘avia_framework’ ) => ‘d100’,
__( ‘0.2s’, ‘avia_framework’ ) => ‘d200’,
__( ‘0.3s’, ‘avia_framework’ ) => ‘d300’,
__( ‘0.4s’, ‘avia_framework’ ) => ‘d400’,
__( ‘0.5s’, ‘avia_framework’ ) => ‘d500’,
__( ‘0.6s’, ‘avia_framework’ ) => ‘d600’,
__( ‘0.7s’, ‘avia_framework’ ) => ‘d700’,
__( ‘0.8s’, ‘avia_framework’ ) => ‘d800’,
__( ‘0.9s’, ‘avia_framework’ ) => ‘d900’,
__( ‘1s’, ‘avia_framework’ ) => ‘d1000’,
__( ‘1.1s’, ‘avia_framework’ ) => ‘d1100’,
__( ‘1.2s’, ‘avia_framework’ ) => ‘d1200’,
__( ‘1.3s’, ‘avia_framework’ ) => ‘d1300’,
__( ‘1.4s’, ‘avia_framework’ ) => ‘d1400’,
__( ‘1.5s’, ‘avia_framework’ ) => ‘d1500’,
__( ‘1.6s’, ‘avia_framework’ ) => ‘d1600’,
__( ‘1.7s’, ‘avia_framework’ ) => ‘d1700’,
__( ‘1.8s’, ‘avia_framework’ ) => ‘d1800’,
__( ‘1.9s’, ‘avia_framework’ ) => ‘d1900’,
__( ‘2s’, ‘avia_framework’ ) => ‘d2000’,
__( ‘2.1s’, ‘avia_framework’ ) => ‘d2100’,
__( ‘2.2s’, ‘avia_framework’ ) => ‘d2200’,
__( ‘2.3s’, ‘avia_framework’ ) => ‘d2300’,
__( ‘2.4s’, ‘avia_framework’ ) => ‘d2400’,
__( ‘2.5s’, ‘avia_framework’ ) => ‘d2500’,
__( ‘2.6s’, ‘avia_framework’ ) => ‘d2600’,
__( ‘2.7s’, ‘avia_framework’ ) => ‘d2700’,
__( ‘2.8s’, ‘avia_framework’ ) => ‘d2800’,
__( ‘2.9s’, ‘avia_framework’ ) => ‘d2900’,
__( ‘3s’, ‘avia_framework’ ) => ‘d3000’,
);
}public static function get_slider_speeds():array {
return array(
__( ‘3s’, ‘avia_framework’ ) => ‘3000’,
__( ‘4s’, ‘avia_framework’ ) => ‘4000’,
__( ‘5s’, ‘avia_framework’ ) => ‘5000’,
__( ‘6s’, ‘avia_framework’ ) => ‘6000’,
__( ‘7s’, ‘avia_framework’ ) => ‘7000’,
__( ‘8s’, ‘avia_framework’ ) => ‘8000’,
__( ‘9s’, ‘avia_framework’ ) => ‘9000’,
__( ’10s’, ‘avia_framework’ ) => ‘10000’,
__( ’11s’, ‘avia_framework’ ) => ‘11000’,
__( ’12s’, ‘avia_framework’ ) => ‘12000’,
__( ’13s’, ‘avia_framework’ ) => ‘13000’,
__( ’14s’, ‘avia_framework’ ) => ‘14000’,
__( ’15s’, ‘avia_framework’ ) => ‘15000’,
);
}
public static function get_intro_animations():array {
return array(
array(
__( ‘None’, ‘avia_framework’ ) => ”,
__( ‘animate__bounce’, ‘avia_framework’ ) => ‘animate__animated animate__bounce’,
__( ‘animate__flash’, ‘avia_framework’ ) => ‘animate__animated animate__flash’,
__( ‘Back in down’, ‘avia_framework’ ) => ‘animate__animated animate__backInDown’,
__( ‘Back in left’, ‘avia_framework’ ) => ‘animate__animated animate__backInLeft’,
__( ‘Back in right’, ‘avia_framework’ ) => ‘animate__animated animate__backInRight’,
__( ‘Back in up’, ‘avia_framework’ ) => ‘animate__animated animate__backInUp’,
__( ‘Bounce in’, ‘avia_framework’ ) => ‘animate__animated animate__bounceIn’,
__( ‘Bounce in down’, ‘avia_framework’ ) => ‘animate__animated animate__bounceInDown’,
__( ‘Bounce in left’, ‘avia_framework’ ) => ‘animate__animated animate__bounceInLeft’,
__( ‘Bounce in right’, ‘avia_framework’ ) => ‘animate__animated animate__bounceInRight’,
__( ‘Bounce in up’, ‘avia_framework’ ) => ‘animate__animated animate__bounceInUp’,
__( ‘Fade in’, ‘avia_framework’ ) => ‘animate__animated animate__fadeIn’,
__( ‘Fade in bottom left’, ‘avia_framework’ ) => ‘animate__animated animate__fadeInBottomLeft’,
__( ‘Fade in bottom right’, ‘avia_framework’ ) => ‘animate__animated animate__fadeInBottomRight’,
__( ‘Fade in down’, ‘avia_framework’ ) => ‘animate__animated animate__fadeInDown’,
__( ‘Fade down big’, ‘avia_framework’ ) => ‘animate__animated animate__fadeInDownBig’,
__( ‘Fade in left’, ‘avia_framework’ ) => ‘animate__animated animate__fadeInLeft’,
__( ‘Fade in left big’, ‘avia_framework’ ) => ‘animate__animated animate__fadeInLeftBig’,
__( ‘Fade in right’, ‘avia_framework’ ) => ‘animate__animated animate__fadeInRight’,
__( ‘Fade in right big’, ‘avia_framework’ ) => ‘animate__animated animate__fadeInRightBig’,
__( ‘Fade in up’, ‘avia_framework’ ) => ‘animate__animated animate__fadeInUp’,
__( ‘Fade in up big’, ‘avia_framework’ ) => ‘animate__animated animate__fadeInUpBig’,
__( ‘Fade in top left’, ‘avia_framework’ ) => ‘animate__animated animate__fadeInTopLeft’,
__( ‘Fade in top right’, ‘avia_framework’ ) => ‘animate__animated animate__fadeInTopRight’,
__( ‘Flip’, ‘avia_framework’ ) => ‘animate__animated animate__flip’,
__( ‘Flip X’, ‘avia_framework’ ) => ‘animate__animated animate__flipInX’,
__( ‘Flip Y’, ‘avia_framework’ ) => ‘animate__animated animate__flipInY’,
__( ‘Head Shake’, ‘avia_framework’ ) => ‘animate__animated animate__headShake’,
__( ‘Heartbeat’, ‘avia_framework’ ) => ‘animate__animated animate__heartBeat’,
__( ‘Hinge’, ‘avia_framework’ ) => ‘animate__animated animate__hinge’,
__( ‘Jack In The Box’, ‘avia_framework’ ) => ‘animate__animated animate__jackInTheBox’,
__( ‘Jello’, ‘avia_framework’ ) => ‘animate__animated animate__jello’,
__( ‘Lightspeed in left’, ‘avia_framework’ ) => ‘animate__animated animate__lightSpeedInLeft’,
__( ‘Lightspeed in right’, ‘avia_framework’ ) => ‘animate__animated animate__lightSpeedInRight’,
__( ‘Mask’, ‘avia_framework’ ) => ‘animate__animated animate__pulse’,
__( ‘Roll in’, ‘avia_framework’ ) => ‘animate__animated animate__rollIn’,
__( ‘Rotate in’, ‘avia_framework’ ) => ‘animate__animated animate__rotateIn’,
__( ‘Rotate down left’, ‘avia_framework’ ) => ‘animate__animated animate__rotateInDownLeft’,
__( ‘Rotate in down right’, ‘avia_framework’ ) => ‘animate__animated animate__rotateInDownRight’,
__( ‘Rotate in up left’, ‘avia_framework’ ) => ‘animate__animated animate__rotateInUpLeft’,
__( ‘Rotate in up right’, ‘avia_framework’ ) => ‘animate__animated animate__rotateInUpRight’,
__( ‘Rubber Band’, ‘avia_framework’ ) => ‘animate__animated animate__rubberBand’,
__( ‘Shake X’, ‘avia_framework’ ) => ‘animate__animated animate__shakeX’,
__( ‘Shake Y’, ‘avia_framework’ ) => ‘animate__animated animate__shakeY’,
__( ‘Slide in’, ‘avia_framework’ ) => ‘animate__animated animate__slideInDown’,
__( ‘Slide in left’, ‘avia_framework’ ) => ‘animate__animated animate__slideInLeft’,
__( ‘Slide in right’, ‘avia_framework’ ) => ‘animate__animated animate__slideInRight’,
__( ‘Slide in up’, ‘avia_framework’ ) => ‘animate__animated animate__slideInUp’,
__( ‘Swing’, ‘avia_framework’ ) => ‘animate__animated animate__swing’,
__( ‘Tada’, ‘avia_framework’ ) => ‘animate__animated animate__tada’,
__( ‘Wobble’, ‘avia_framework’ ) => ‘animate__animated animate__wobble’,
__( ‘Zoom in’, ‘avia_framework’ ) => ‘animate__animated animate__zoomIn’,
__( ‘Zoom in down’, ‘avia_framework’ ) => ‘animate__animated animate__zoomInDown’,
__( ‘Zoom in left’, ‘avia_framework’ ) => ‘animate__animated animate__zoomInLeft’,
__( ‘Zoom in right’, ‘avia_framework’ ) => ‘animate__animated animate__zoomInRight’,
__( ‘Zoom in up’, ‘avia_framework’ ) => ‘animate__animated animate__zoomInUp’,
)
);
}
public static function get_button_links($type):array {
$data = match ($type) {
‘page’ => get_pages(),
default => get_posts(),
};
$links = array();
foreach ($data as $link) {
$links[__( $link->post_title, ‘avia_framework’ )] = $link->post_name;
}return $links;
}
public static function get_full_percentage():array {
$i = 1;
$nums = array();
while ($i < 101) {
$k = $i . ‘%’;
$nums[$k] = $i . ‘%’;
$i++;
}
return $nums;
}
public static function get_full_360():array {
$i = 1;
$nums = array();
while ($i < 361) {
$k = $i;
$nums[$k] = $i;
$i++;
}
return $nums;
}
public static function create_button_link($atts, $b = ‘button’):string {
$link = ”;
if (isset($atts[$b]) && $atts[$b] == ‘yes’) {
switch ($atts[$b . ‘_link_type’]) {
case ‘page’:
$link = home_url() . ‘/’ . $atts[$b . ‘_page_link’];
break;
case ‘post’:
$link .= home_url() . ‘/’ . $atts[$b . ‘_post_link’];
break;
case ‘custom’:
$link .= $atts[$b . ‘_custom_link’];
break;
default:}
}
return $link;
}
public static function get_seconds():array {
return array(
‘1s’ => ‘1s’,
‘2s’ => ‘2s’,
‘3s’ => ‘3s’,
‘4s’ => ‘4s’,
‘5s’ => ‘5s’,
‘6s’ => ‘6s’,
‘7s’ => ‘7s’,
‘8s’ => ‘8s’,
‘9s’ => ‘9s’,
’10s’ => ’10s’,
’11s’ => ’11s’,
’12s’ => ’12s’,
’13s’ => ’13s’,
’14s’ => ’14s’,
’15s’ => ’15s’,
’16s’ => ’16s’,
’17s’ => ’17s’,
’18s’ => ’18s’,
’19s’ => ’19s’,
’20s’ => ’20s’,
);
}
public static function select_button_style():array {
$arr = array (
__( ‘Animated Gradient’, ‘avia_framework’ ) => ‘amg_1’,
__( ‘Candied Colored 1’, ‘avia_framework’ ) => ‘amg_2’,
__( ‘Candied Colored 2’, ‘avia_framework’ ) => ‘amg_3’,
__( ‘Candied Colored 3’, ‘avia_framework’ ) => ‘amg_4’,
__( ‘Candied Colored 4’, ‘avia_framework’ ) => ‘amg_5’,
__( ‘Candied Colored 5’, ‘avia_framework’ ) => ‘amg_6’,
__( ‘Candied Colored 6’, ‘avia_framework’ ) => ‘amg_7’,
__( ‘Candied Colored 7’, ‘avia_framework’ ) => ‘amg_8’,
__( ‘Candied Colored 8’, ‘avia_framework’ ) => ‘amg_9’,
__( ‘Candied Colored 9’, ‘avia_framework’ ) => ‘amg_10’,
__( ‘Candied Colored 10’, ‘avia_framework’ ) => ‘amg_11’,
__( ‘Candied Colored 11’, ‘avia_framework’ ) => ‘amg_12’,
__( ‘Candied Colored 12’, ‘avia_framework’ ) => ‘amg_13’,
__( ‘Candied Colored 13’, ‘avia_framework’ ) => ‘amg_14’,
__( ‘Candied Colored 14’, ‘avia_framework’ ) => ‘amg_15’,
__( ‘Candied Colored 15’, ‘avia_framework’ ) => ‘amg_16’,
__( ‘Candied Colored 16’, ‘avia_framework’ ) => ‘amg_17’,
__( ‘Coin’, ‘avia_framework’ ) => ‘amg_18’,
__( ‘Cold Light’, ‘avia_framework’ ) => ‘amg_19’,
__( ‘Flip Box’, ‘avia_framework’ ) => ‘amg_20’,
__( ‘Gradient’, ‘avia_framework’ ) => ‘amg_21’,
__( ‘Gradient Glow’, ‘avia_framework’ ) => ‘amg_22’,
__( ‘Gradient Hole’, ‘avia_framework’ ) => ‘amg_61’,
__( ‘Hover 1’, ‘avia_framework’ ) => ‘amg_23’,
__( ‘Hover 2’, ‘avia_framework’ ) => ‘amg_24’,
__( ‘Hover 3’, ‘avia_framework’ ) => ‘amg_25’,
__( ‘Hover 4’, ‘avia_framework’ ) => ‘amg_26’,
__( ‘Label Slice’, ‘avia_framework’ ) => ‘amg_27’,
__( ‘Liquid’, ‘avia_framework’ ) => ‘amg_28’,
__( ‘Menu’, ‘avia_framework’ ) => ‘amg_29’,
__( ‘Modern 1’, ‘avia_framework’ ) => ‘amg_30’,
__( ‘Modern 2’, ‘avia_framework’ ) => ‘amg_31’,
__( ‘Modern 3’, ‘avia_framework’ ) => ‘amg_32’,
__( ‘Modern 4’, ‘avia_framework’ ) => ‘amg_33’,
__( ‘Modern 5’, ‘avia_framework’ ) => ‘amg_34’,
__( ‘Modern 6’, ‘avia_framework’ ) => ‘amg_35’,
__( ‘Modern 7’, ‘avia_framework’ ) => ‘amg_36’,
__( ‘Modern 8’, ‘avia_framework’ ) => ‘amg_37’,
__( ‘Modern 9’, ‘avia_framework’ ) => ‘amg_38’,
__( ‘Modern 10’, ‘avia_framework’ ) => ‘amg_39’,
__( ‘Modern 11’, ‘avia_framework’ ) => ‘amg_40’,
__( ‘Modern 12’, ‘avia_framework’ ) => ‘amg_41’,
__( ‘Modern 13’, ‘avia_framework’ ) => ‘amg_42’,
__( ‘Modern 14’, ‘avia_framework’ ) => ‘amg_43’,
__( ‘Modern 15’, ‘avia_framework’ ) => ‘amg_44’,
__( ‘Modern 16’, ‘avia_framework’ ) => ‘amg_45’,
__( ‘Modern 17’, ‘avia_framework’ ) => ‘amg_46’,
__( ‘Modern 18’, ‘avia_framework’ ) => ‘amg_47’,
__( ‘Modern 19’, ‘avia_framework’ ) => ‘amg_48’,
__( ‘Modern 20’, ‘avia_framework’ ) => ‘amg_49’,
__( ‘Modern 21’, ‘avia_framework’ ) => ‘amg_50’,
__( ‘Modern 22’, ‘avia_framework’ ) => ‘amg_51’,
__( ‘Modern 23’, ‘avia_framework’ ) => ‘amg_52’,
__( ‘Modern 24’, ‘avia_framework’ ) => ‘amg_53’,
__( ‘Modern 25’, ‘avia_framework’ ) => ‘amg_54’,
__( ‘Modern 26’, ‘avia_framework’ ) => ‘amg_55’,
__( ‘Modern 27’, ‘avia_framework’ ) => ‘amg_56’,
__( ‘Modern 28’, ‘avia_framework’ ) => ‘amg_57’,
__( ‘Plastic’, ‘avia_framework’ ) => ‘amg_58’,
__( ‘Neon Lines’, ‘avia_framework’ ) => ‘amg_59’,
__( ‘Pulsating’, ‘avia_framework’ ) => ‘amg_60’,
__( ‘Hover 4’, ‘avia_framework’ ) => ‘amg_62’,
__( ‘Snake Border 2’, ‘avia_framework’ ) => ‘amg_63’,
__( ‘Hover 5’, ‘avia_framework’ ) => ‘amg_64’,
__( ‘Hover 6’, ‘avia_framework’ ) => ‘amg_65’,
__( ‘Ripple’, ‘avia_framework’ ) => ‘amg_66’,
__( ‘Snake Border 1’, ‘avia_framework’ ) => ‘amg_67’,
__( ‘Gradient Hover Border’, ‘avia_framework’ ) => ‘amg_68’,
__( ‘Pulsar’, ‘avia_framework’ ) => ‘amg_69’,
__( ‘Neon Lights’, ‘avia_framework’ ) => ‘amg_70’,
__( ‘Blend Mode’, ‘avia_framework’ ) => ‘amg_71’,
__( ‘Bubble Bursts’, ‘avia_framework’ ) => ‘amg_72’,);
ksort($arr, SORT_NATURAL);
return $arr;
}
function amg_enfold_admin_menu() : void
{
add_options_page(
‘AMG Enfold Extensions’,
‘AMG Enfold’,
‘manage_options’,
‘amg-enfold-options’,
array(
$this,
‘amg_enfold_admin_settings’
),
‘1’
);
}
function amg_enfold_admin_settings_init() : void
{
/// sticky banner text
add_settings_section (
‘enfold_extensions_developer_section’ ,
‘Developer’ ,
”,
‘amg-enfold-options’
);add_settings_section (
‘enfold_extensions_elements_section’ ,
‘Active Elements’ ,
”,
‘amg-enfold-options’
);register_setting(
‘amg-enfold-options’,
‘amg_enfold_developer_mode’,
array(
‘type’ => ‘string’,
‘sanitize_callback’ => ‘sanitize_text_field’,
‘default’ => ‘no’
)
);
add_settings_field(
‘amg_enfold_developer_mode’,
‘Developer Mode On’,
array($this, ‘amg_enfold_developer_mode_callback’),
‘amg-enfold-options’,
‘enfold_extensions_developer_section’
);$count = count($this->elements);
for ($i = 0; $i < $count; $i++) {
register_setting(
‘amg-enfold-options’,
“amg_enfold_extensions_{$this->elements[$i]}_active”,
array(
‘type’ => ‘string’,
‘default’ => ”
)
);
add_settings_field(
“amg_enfold_extensions_{$this->elements[$i]}_active”,
ucfirst($this->elements[$i]),
array($this, ‘amg_enfold_modules_callback’),
‘amg-enfold-options’,
‘enfold_extensions_elements_section’,
$this->elements[$i]);
}$count = count($this->deletes);
for ($k = 0; $i < $count; $k++) {
$option = get_option(“amg_enfold_extensions_{$this->deletes[$k]}_active”);
if (!empty($option)) {
delete_option(“amg_enfold_extensions_{$this->deletes[$k]}_active”);
}
}
}
function amg_enfold_admin_settings(): void
{
require_once plugin_dir_path(__FILE__) . ‘templates/admin_settings.php’;
}
public function amg_enfold_developer_mode_callback(): void
{
$checked = checked( ‘yes’, get_option( ‘amg_enfold_developer_mode’ ), false );
?>
<input type=”checkbox” name=”amg_enfold_developer_mode” value=”yes” <?php echo $checked ?>/>
<?php
}
public function amg_enfold_modules_callback($name): void
{
$field = “amg_enfold_extensions_{$name}_active”;
$checked = checked( ‘yes’, get_option( $field ), false );
?>
<input type=”checkbox” name=”<?php echo $field ?>” value=”yes” <?php echo $checked ?>/>
” target=”_blank”><i class=”fa-solid fa-arrow-up-right-from-square”></i><?php
}
public static function amg_enfold_popup() : void
{
$html = “<div id=’amg-enfold-popup’ class=”>”;
$html .= “<div id=’amg-enfold-popup-bg’></div>”;
$html .= “<div id=’amg-enfold-popup-box’>”;
$html .= “<div id=’amg-enfold-popup-close’><i class=’fi fi-br-circle-xmark’></i></div>”;
$html .= “<div id=’content’></div>”;
$html .= “</div></div>”;
echo $html;
}public static function prepare_navigation(array $atts): array
{
$prev_button = ”;
$next_button = ”;
if (isset($atts[‘navigation’]) && $atts[‘navigation’] == ‘yes’) {
$prev_button = “<div class=’swiper-button-prev’></div>”;
$next_button = ‘<div class=”swiper-button-next”></div>’;
}
if (isset($atts[‘pagination’]) && $atts[‘pagination’] == ‘yes’) {
$pagination = “<div class=’swiper-pagination’></div>”;
}$above = ”;
$below = ”;
$side = ”;
if (isset($atts[‘navigation_position’]) && $atts[‘navigation_position’] == ‘above’ && $atts[‘nav_layout’] == ‘custom’) {
$above = “<div class=’swiper-nav-wrapper above’>”;
$above .= $prev_button;
$above .= $pagination;
$above .= $next_button;
$above .= ‘</div>’;
} else if (isset($atts[‘navigation_position’]) && $atts[‘navigation_position’] == ‘below’ && $atts[‘nav_layout’] == ‘custom’) {
$below = “<div class=’swiper-nav-wrapper below’>”;
$below .= $prev_button;
$below .= $pagination;
$below .= $next_button;
$below .= ‘</div>’;
} else {
$below = $pagination;
$side = $prev_button;
$side .= $next_button;
}
return array($atts, $above, $below, $side);
}public static function amg_enfold_section($title) : array
{
$c = null;
$template = null;
switch ($title) {
case ‘Button’:
$c = array(
array(
‘name’ => __( ‘Enable?’, ‘avia_framework’ ),
‘desc’ => __( ‘Choosing yes enables the button for this single element.’, ‘avia_framework’ ),
‘id’ => ‘button’,
‘type’ => ‘select’,
‘std’ => ‘no’,
‘lockable’ => true,
‘subtype’ => array(
__( ‘No’, ‘avia_framework’ ) => ‘no’,
__( ‘Yes’, ‘avia_framework’ ) => ‘yes’ ,
)
),
array(
‘name’ => __( ‘Button Label’, ‘avia_framework’ ),
‘desc’ => __( ‘This is the text that appears on your button.’, ‘avia_framework’ ),
‘id’ => ‘label’,
‘type’ => ‘input’,
‘std’ => __( ‘Contact Us’, ‘avia_framework’ ),
‘required’ => array( ‘button’, ‘equals’, ‘yes’ ),
‘lockable’ => true
),
/* array(
‘name’ => __( ‘Show Button Icon’, ‘avia_framework’ ),
‘desc’ => __( ‘Should an icon be displayed at the left or right side of the button’, ‘avia_framework’ ),
‘id’ => ‘button_icon_select’,
‘type’ => ‘select’,
‘std’ => ‘yes’,
‘lockable’ => true,
‘required’ => array( ‘button’, ‘equals’, ‘yes’ ),
‘subtype’ => array(
__( ‘No Icon’, ‘avia_framework’ ) => ‘no’,
__( ‘Display icon to the left’, ‘avia_framework’ ) => ‘yes’ ,
__( ‘Display icon to the right’, ‘avia_framework’ ) => ‘yes-right-icon’,
)
),
array(
‘name’ => __( ‘Button Icon’, ‘avia_framework’ ),
‘desc’ => __( ‘Select an icon for your Button below’, ‘avia_framework’ ),
‘id’ => ‘button_icon’,
‘type’ => ‘iconfont’,
‘std’ => ”,
‘lockable’ => true,
‘locked’ => array( ‘button_icon’, ‘font’ ),
‘required’ => array( ‘button_icon_select’, ‘not_empty_and’, ‘no’ )
),
array(
‘name’ => __( ‘Icon Visibility’, ‘avia_framework’ ),
‘desc’ => __( ‘Check to only display icon on hover’, ‘avia_framework’ ),
‘id’ => ‘button_icon_hover’,
‘type’ => ‘checkbox’,
‘std’ => ”,
‘lockable’ => true,
‘required’ => array( ‘button_icon_select’, ‘not_empty_and’, ‘no’ )
)*/);
break;
case ‘Link Settings’:
$template = array(
array(
‘type’ => ‘template’,
‘template_id’ => ‘linkpicker_toggle’,
‘name’ => __( ‘Button Link’, ‘avia_framework’ ),
‘desc’ => __( ‘Where should your button link to?’, ‘avia_framework’ ),
‘subtypes’ => array( ‘manually’, ‘single’, ‘taxonomy’ ),
‘target_id’ => ‘link_target’,
‘lockable’ => true
),
);
break;
case ‘Appearance’:
$c = array(
array(
‘name’ => __( ‘Button Size’, ‘avia_framework’ ),
‘desc’ => __( ‘Choose the size of your button here.’, ‘avia_framework’ ),
‘id’ => ‘size’,
‘type’ => ‘select’,
‘std’ => ‘small’,
‘lockable’ => true,
‘subtype’ => array(
__( ‘Small’, ‘avia_framework’ ) => ‘small’,
__( ‘Medium’, ‘avia_framework’ ) => ‘medium’,
__( ‘Large’, ‘avia_framework’ ) => ‘large’,
__( ‘X Large’, ‘avia_framework’ ) => ‘x-large’
)
),array(
‘name’ => __( ‘Button Position’, ‘avia_framework’ ),
‘desc’ => __( ‘Choose the alignment of your button here’, ‘avia_framework’ ),
‘id’ => ‘position’,
‘type’ => ‘select’,
‘std’ => ‘center’,
‘lockable’ => true,
‘subtype’ => array(
__( ‘Align Left’, ‘avia_framework’ ) => ‘left’,
__( ‘Align Center’, ‘avia_framework’ ) => ‘center’,
__( ‘Align Right’, ‘avia_framework’ ) => ‘right’,
),
‘required’ => array( ‘size’, ‘not’, ‘fullwidth’ )
),array(
‘name’ => __( ‘Button Label Display’, ‘avia_framework’ ),
‘desc’ => __( ‘Select how to display the label’, ‘avia_framework’ ),
‘id’ => ‘label_display’,
‘type’ => ‘select’,
‘std’ => ”,
‘lockable’ => true,
‘subtype’ => array(
__( ‘Always display’, ‘avia_framework’ ) => ”,
__( ‘Display on hover’, ‘avia_framework’ ) => ‘av-button-label-on-hover’,
)
),array(
‘name’ => __( ‘Button Title Attribute’, ‘avia_framework’ ),
‘desc’ => __( ‘Add a title attribute for this button.’, ‘avia_framework’ ),
‘id’ => ‘title_attr’,
‘type’ => ‘input’,
‘std’ => ”,
‘required’ => array( ‘label_display’, ‘equals’, ” )
),);
break;
case ‘Font Sizes’:
$c = array(
array(
‘name’ => __( ‘Button Text Font Sizes’, ‘avia_framework’ ),
‘desc’ => __( ‘Select a custom font size for the button text.’, ‘avia_framework’ ),
‘type’ => ‘template’,
‘template_id’ => ‘font_sizes_icon_switcher’,
‘textfield’ => true,
‘lockable’ => true,
‘subtype’ => array(
‘default’ => AviaHtmlHelper::number_array( 10, 90, 1, array( __( ‘Use Default’, ‘avia_framework’ ) => ” ), ‘px’ ),
‘desktop’ => AviaHtmlHelper::number_array( 10, 90, 1, array( __( ‘Use Default’, ‘avia_framework’ ) => ” ), ‘px’ ),
‘medium’ => AviaHtmlHelper::number_array( 10, 90, 1, array( __( ‘Use Default’, ‘avia_framework’ ) => ”, __( ‘Hidden’, ‘avia_framework’ ) => ‘hidden’ ), ‘px’ ),
‘small’ => AviaHtmlHelper::number_array( 10, 90, 1, array( __( ‘Use Default’, ‘avia_framework’ ) => ”, __( ‘Hidden’, ‘avia_framework’ ) => ‘hidden’ ), ‘px’ ),
‘mini’ => AviaHtmlHelper::number_array( 10, 90, 1, array( __( ‘Use Default’, ‘avia_framework’ ) => ”, __( ‘Hidden’, ‘avia_framework’ ) => ‘hidden’ ), ‘px’ )
),
‘id_sizes’ => array(
‘default’ => ‘size-text’,
‘desktop’ => ‘av-desktop-font-size-text’,
‘medium’ => ‘av-medium-font-size-text’,
‘small’ => ‘av-small-font-size-text’,
‘mini’ => ‘av-mini-font-size-text’
)
),
array(
‘name’ => __( ‘Button Icon Font Sizes’, ‘avia_framework’ ),
‘desc’ => __( ‘Select a custom font size for the button text.’, ‘avia_framework’ ),
‘type’ => ‘template’,
‘template_id’ => ‘font_sizes_icon_switcher’,
‘textfield’ => true,
‘lockable’ => true,
‘subtype’ => array(
‘default’ => AviaHtmlHelper::number_array( 10, 90, 1, array( __( ‘Use Default’, ‘avia_framework’ ) => ” ), ‘px’ ),
‘desktop’ => AviaHtmlHelper::number_array( 10, 90, 1, array( __( ‘Use Default’, ‘avia_framework’ ) => ” ), ‘px’ ),
‘medium’ => AviaHtmlHelper::number_array( 10, 90, 1, array( __( ‘Use Default’, ‘avia_framework’ ) => ”, __( ‘Hidden’, ‘avia_framework’ ) => ‘hidden’ ), ‘px’ ),
‘small’ => AviaHtmlHelper::number_array( 10, 90, 1, array( __( ‘Use Default’, ‘avia_framework’ ) => ”, __( ‘Hidden’, ‘avia_framework’ ) => ‘hidden’ ), ‘px’ ),
‘mini’ => AviaHtmlHelper::number_array( 10, 90, 1, array( __( ‘Use Default’, ‘avia_framework’ ) => ”, __( ‘Hidden’, ‘avia_framework’ ) => ‘hidden’ ), ‘px’ )
),
‘id_sizes’ => array(
‘default’ => ‘size-button-icon’,
‘desktop’ => ‘av-desktop-font-size-button-icon’,
‘medium’ => ‘av-medium-font-size-button-icon’,
‘small’ => ‘av-small-font-size-button-icon’,
‘mini’ => ‘av-mini-font-size-button-icon’
)
)
);
break;
case ‘Button Margin And Padding’:
$template = array(
array(
‘type’ => ‘template’,
‘template_id’ => ‘margin_padding’,
‘toggle’ => true,
‘name’ => __( ‘Margin And Padding’, ‘avia_framework’ ),
‘desc’ => __( ‘Set a responsive margin and a padding to text for the button.’, ‘avia_framework’ ),
‘lockable’ => true,
)
);
break;
case ‘Colors’:
$c = array(
array(
‘name’ => __( ‘Button Colors Selection’, ‘avia_framework’ ),
‘desc’ => __( “Choose the available options for button colors. Switching to advanced options for already existing buttons you need to set all options (color settings from basic options are ignored)”, ‘avia_framework’ ),
‘id’ => ‘color_options’,
‘type’ => ‘select’,
‘std’ => ”,
‘lockable’ => true,
‘subtype’ => array(
__( ‘Basic options only’, ‘avia_framework’ ) => ”,
__( ‘Advanced options’, ‘avia_framework’ ) => ‘color_options_advanced’,
)
),
array(
‘type’ => ‘template’,
‘template_id’ => ‘named_colors’,
‘custom’ => true,
‘lockable’ => true,
‘required’ => array( ‘color_options’, ‘equals’, ” )
),
array(
‘name’ => __( ‘Custom Background Color’, ‘avia_framework’ ),
‘desc’ => __( ‘Select a custom background color for your button here’, ‘avia_framework’ ),
‘id’ => ‘custom_bg’,
‘type’ => ‘colorpicker’,
‘std’ => ‘#444444’,
‘lockable’ => true,
‘required’ => array( ‘color’, ‘equals’, ‘custom’ )
),
array(
‘name’ => __( ‘Custom Font Color’, ‘avia_framework’ ),
‘desc’ => __( ‘Select a custom font color for your button here’, ‘avia_framework’ ),
‘id’ => ‘custom_font’,
‘type’ => ‘colorpicker’,
‘std’ => ‘#ffffff’,
‘lockable’ => true,
‘required’ => array( ‘color’, ‘equals’, ‘custom’)
),
array(
‘type’ => ‘template’,
‘template_id’ => ‘button_colors’,
‘color_id’ => ‘btn_color’,
‘custom_id’ => ‘btn_custom’,
‘lockable’ => true,
‘required’ => array( ‘color_options’, ‘not’, ” )
)
);
break;
case ‘Animation’:
$c = array(
array(
‘type’ => ‘template’,
‘template_id’ => ‘animation’,
‘lockable’ => true,
‘std_none’ => ”,
‘name’ => __( ‘Button Animation’, ‘avia_framework’ ),
‘desc’ => __( ‘Add a small animation to the button when the user first scrolls to the button position. This is only to add some "spice" to the site and only works in modern browsers and only on desktop computers to keep page rendering as fast as possible.’, ‘avia_framework’ ),
‘groups’ => array( ‘fade’, ‘slide’, ‘rotate’, ‘fade-adv’, ‘special’ )
)
);
break;
case ‘Content’:
$c = array(
array(
‘name’ => __( ‘Content Display’, ‘avia_framework’ ),
‘desc’ => __( ‘Choose to display the content in a popup or below the slides.’, ‘avia_framework’ ),
‘id’ => ‘content_layout’,
‘type’ => ‘select’,
‘std’ => ”,
‘lockable’ => true,
‘subtype’ => array(
__( ‘No Display’, ‘avia_framework’ ) => ”,
__( ‘Display content in popup’, ‘avia_framework’ ) => ‘popup’,
__( ‘Display content below slides’, ‘avia_framework’ ) => ‘inline’
),
),
array(
‘name’ => __( ‘Max Width’, ‘avia_framework’ ),
‘desc’ => __( ‘This is the width of your content box.’, ‘avia_framework’ ),
‘id’ => ‘popup_max_width’,
‘type’ => ‘input’,
‘std’ => ‘750px’,
‘lockable’ => true,
‘required’ => array( ‘content_layout’, ‘not’, ” ),
‘container_class’ => ‘av_third av_third_first’
),
array(
‘name’ => __( ‘Min Height’, ‘avia_framework’ ),
‘desc’ => __( ‘This is the min-height of your content box.’, ‘avia_framework’ ),
‘id’ => ‘popup_min_height’,
‘type’ => ‘input’,
‘std’ => ‘320px’,
‘lockable’ => true,
‘required’ => array( ‘content_layout’, ‘not’, ” ),
‘container_class’ => ‘av_third’
),
array(
‘name’ => __( ‘Text Align’, ‘avia_framework’ ),
‘desc’ => __( ‘Figure it out.’, ‘avia_framework’ ),
‘id’ => ‘popup_text_align’,
‘type’ => ‘select’,
‘std’ => ‘center’,
‘lockable’ => true,
‘required’ => array( ‘content_layout’, ‘not’, ” ),
‘container_class’ => ‘av_third’,
‘subtype’ => array(
__( ‘Left’, ‘avia_framework’ ) => ‘left’,
__( ‘Center’, ‘avia_framework’ ) => ‘center’,
__( ‘Right’, ‘avia_framework’ ) => ‘right’
),
),
array(
‘name’ => __( ‘Container BG Color’, ‘avia_framework’ ),
‘desc’ => __( ‘This is the background of the content box’, ‘avia_framework’ ),
‘id’ => ‘popup_background_color’,
‘type’ => ‘colorpicker’,
‘std’ => ”,
‘rgba’ => true,
‘lockable’ => true,
‘required’ => array( ‘content_layout’, ‘equals’, ‘popup’ ),
‘container_class’ => ‘av_half av_half_first’
),
array(
‘name’ => __( ‘Background BG Color’, ‘avia_framework’ ),
‘desc’ => __( ‘This is the full page background when the popup is visible.’, ‘avia_framework’ ),
‘id’ => ‘popup_bg_color’,
‘type’ => ‘colorpicker’,
‘std’ => ”,
‘rgba’ => true,
‘lockable’ => true,
‘required’ => array( ‘content_layout’, ‘equals’, ‘popup’ ),
‘container_class’ => ‘av_half’
),
array(
‘name’ => __( ‘Border Radius’, ‘avia_framework’ ),
‘desc’ => __( ‘Set the border radius of the content box.’, ‘avia_framework’ ),
‘id’ => ‘popup_border_radius’,
‘type’ => ‘multi_input’,
‘sync’ => true,
‘std’ => ’24px’,
‘lockable’ => true,
‘required’ => array( ‘content_layout’, ‘not’, ” ),
‘multi’ => array(
‘top’ => __( ‘Top-Left-Radius’, ‘avia_framework’ ),
‘right’ => __( ‘Top-Right-Radius’, ‘avia_framework’ ),
‘bottom’ => __( ‘Bottom-Right-Radius’, ‘avia_framework’ ),
‘left’ => __( ‘Bottom-Left-Radius’, ‘avia_framework’ )
),
),
array(
‘type’ => ‘template’,
‘template_id’ => ‘box_shadow’,
‘id’ => ‘popup_box_shadow’,
‘names’ => array(
__( ‘Box Shadow’, ‘avia_framework’ ),
__( ‘Box Shadow Styling ‘, ‘avia_framework’ ),
__( ‘Box Shadow Color’, ‘avia_framework’ )
),
‘default_check’ => true,
‘lockable’ => true,
‘required’ => array( ‘content_layout’, ‘not’, ” )
)
);
break;
case ‘Navigation’:
$c = array(
array(
‘name’ => __( ‘Navigation Layout’, ‘avia_framework’ ),
‘desc’ => __( ‘Either use the widget default colors or apply some custom ones’, ‘avia_framework’ ),
‘id’ => ‘nav_layout’,
‘type’ => ‘select’,
‘std’ => ”,
‘lockable’ => true,
‘subtype’ => array(
__( ‘Default’, ‘avia_framework’ ) => ”,
__( ‘Define Custom layout’, ‘avia_framework’ ) => ‘custom’
),),
array(
‘name’ => __( ‘Vertical Position’, ‘avia_framework’ ),
‘desc’ => __( ‘Define the vertical position of the navigation controls’, ‘avia_framework’ ),
‘id’ => ‘navigation_position’,
‘type’ => ‘select’,
‘std’ => ”,
‘lockable’ => true,
‘required’ => array( ‘nav_layout’, ‘equals’, ‘custom’ ),
‘subtype’ => array(
__( ‘Default’, ‘avia_framework’ ) => ”,
__( ‘Above’, ‘avia_framework’ ) => ‘above’,
__( ‘Below’, ‘avia_framework’ ) => ‘below’,
)
),
array(
‘name’ => __( ‘Controls Max Width’, ‘avia_framework’ ),
‘desc’ => __( ‘Enter the max width of the navigation controls’, ‘avia_framework’ ),
‘id’ => ‘nav_max_width’,
‘type’ => ‘input’,
‘std’ => ‘100%’,
‘lockable’ => true,
‘required’ => array( ‘navigation_position’, ‘not’, ”),),
array(
‘name’ => __( ‘Horizontal Alignment’, ‘avia_framework’ ),
‘desc’ => __( ‘This only works if navigation controls are not 100% max width’, ‘avia_framework’ ),
‘id’ => ‘navigation_alignment’,
‘type’ => ‘select’,
‘std’ => ‘center’,
‘lockable’ => true,
‘required’ => array( ‘navigation_position’, ‘not’, ”),
‘subtype’ => array(
__( ‘Left’, ‘avia_framework’ ) => ‘left’,
__( ‘Center’, ‘avia_framework’ ) => ‘center’,
__( ‘Right’, ‘avia_framework’ ) => ‘right’,
)
),
array(
‘name’ => __( ‘Horizontal Offset’, ‘avia_framework’ ),
‘desc’ => __( ‘Enter a CSS value (50px) to push the controls towards center’, ‘avia_framework’ ),
‘id’ => ‘nav_offset’,
‘type’ => ‘input’,
‘std’ => ‘0’,
‘lockable’ => true,
‘required’ => array( ‘navigation_alignment’, ‘not’, ‘center’),
),
array(
‘name’ => __( ‘Button Width’, ‘avia_framework’ ),
‘desc’ => __( ‘Button width in a CSS value’, ‘avia_framework’ ),
‘id’ => ‘nav_width’,
‘type’ => ‘input’,
‘std’ => ’50px’,
‘lockable’ => true,
‘required’ => array( ‘nav_layout’, ‘equals’, ‘custom’ ),
‘container_class’ => ‘av_half av_half_first’
),
array(
‘name’ => __( ‘Button Height’, ‘avia_framework’ ),
‘desc’ => __( ‘Button height in a CSS value’, ‘avia_framework’ ),
‘id’ => ‘nav_height’,
‘type’ => ‘input’,
‘std’ => ’50px’,
‘lockable’ => true,
‘required’ => array( ‘nav_layout’, ‘equals’, ‘custom’ ),
‘container_class’ => ‘av_half’
),
array(
‘name’ => __( ‘Button Border Radius’, ‘avia_framework’ ),
‘desc’ => __( ‘Set the border radius of the button’, ‘avia_framework’ ),
‘id’ => ‘nav_radius’,
‘type’ => ‘multi_input’,
‘sync’ => true,
‘std’ => ‘50%’,
‘lockable’ => true,
‘required’ => array( ‘nav_layout’, ‘equals’, ‘custom’ ),
‘multi’ => array(
‘top’ => __( ‘Top-Left-Radius’, ‘avia_framework’ ),
‘right’ => __( ‘Top-Right-Radius’, ‘avia_framework’ ),
‘bottom’ => __( ‘Bottom-Right-Radius’, ‘avia_framework’ ),
‘left’ => __( ‘Bottom-Left-Radius’, ‘avia_framework’ )
),
),
);
break;
case ‘Image’:
$c = array(
array(
‘name’ => __( ‘Image Size and Orientation’, ‘avia_framework’ ),
‘desc’ => __( ‘Either use the widget default colors or apply some custom ones’, ‘avia_framework’ ),
‘id’ => ‘orientation_and_size’,
‘type’ => ‘select’,
‘std’ => ”,
‘lockable’ => true,
‘subtype’ => AbstraktEnfoldExtensions::get_image_sizes(),
),
array(
‘name’ => __( ‘Image Aspect Ratio’, ‘avia_framework’ ),
‘desc’ => __( ‘Enter the CSS value as a fraction, ie 16/9’, ‘avia_framework’ ),
‘id’ => ‘aspect_ratio’,
‘type’ => ‘input’,
‘std’ => ”,
‘lockable’ => true,
‘required’ => array( ‘orientation_and_size’, ‘not’, ” ),
‘container_class’ => ‘av_third av_third_first’
),
array(
‘name’ => __( ‘Image Object Fit’, ‘avia_framework’ ),
‘desc’ => __( ‘Select one of the CSS values or choose none.’, ‘avia_framework’ ),
‘id’ => ‘object_fit’,
‘type’ => ‘select’,
‘std’ => ‘cover’,
‘lockable’ => true,
‘required’ => array( ‘orientation_and_size’, ‘not’, ” ),
‘container_class’ => ‘av_third’,
‘subtype’ => array(
__( ‘None’, ‘avia_framework’ ) => ‘none’,
__( ‘Fill’, ‘avia_framework’ ) => ‘fill’,
__( ‘Contain’, ‘avia_framework’ ) => ‘contain’,
__( ‘Cover’, ‘avia_framework’ ) => ‘cover’,
__( ‘Scale Down’, ‘avia_framework’ ) => ‘scale-down’
),
),
array(
‘name’ => __( ‘Image Object Position’, ‘avia_framework’ ),
‘desc’ => __( ‘Enter a css value ie 50% 50% or left top’, ‘avia_framework’ ),
‘id’ => ‘object_position’,
‘type’ => ‘input’,
‘std’ => ‘center center’,
‘lockable’ => true,
‘required’ => array( ‘orientation_and_size’, ‘not’, ” ),
‘container_class’ => ‘av_third’,
),
);
break;
case ‘Container’:
$c = array(
array(
‘name’ => __( ‘Slides Layout’, ‘avia_framework’ ),
‘desc’ => __( ‘Either use the widget default colors or apply some custom ones’, ‘avia_framework’ ),
‘id’ => ‘slides_layout’,
‘type’ => ‘select’,
‘std’ => ”,
‘lockable’ => true,
‘subtype’ => array(
__( ‘Default’, ‘avia_framework’ ) => ”,
__( ‘Define Custom layout’, ‘avia_framework’ ) => ‘custom’
),),
array(
‘name’ => __( ‘Badge Max Width’, ‘avia_framework’ ),
‘desc’ => __( ‘Enter the badges title here (Better keep it short)’, ‘avia_framework’ ),
‘id’ => ‘max_width’,
‘type’ => ‘input’,
‘std’ => ‘250px’,
‘lockable’ => true,
‘required’ => array( ‘slides_layout’, ‘equals’, ‘custom’ ),
‘container_class’ => ‘av_half av_half_first’
),
array(
‘name’ => __( ‘Badge Min Height’, ‘avia_framework’ ),
‘desc’ => __( ‘Enter the badges title here (Better keep it short)’, ‘avia_framework’ ),
‘id’ => ‘min_height’,
‘type’ => ‘input’,
‘std’ => ‘400px’,
‘lockable’ => true,
‘required’ => array( ‘slides_layout’, ‘equals’, ‘custom’ ),
‘container_class’ => ‘av_half’
),
array(
‘name’ => __( ‘Badge Border Radius’, ‘avia_framework’ ),
‘desc’ => __( ‘Set the border radius of the column’, ‘avia_framework’ ),
‘id’ => ‘border_radius’,
‘type’ => ‘multi_input’,
‘sync’ => true,
‘std’ => ”,
‘lockable’ => true,
‘required’ => array( ‘slides_layout’, ‘equals’, ‘custom’ ),
‘multi’ => array(
‘top’ => __( ‘Top-Left-Radius’, ‘avia_framework’ ),
‘right’ => __( ‘Top-Right-Radius’, ‘avia_framework’ ),
‘bottom’ => __( ‘Bottom-Right-Radius’, ‘avia_framework’ ),
‘left’ => __( ‘Bottom-Left-Radius’, ‘avia_framework’ )
),
),
);
break;
}
if (!is_array($template)) {
$template = array(
array(
‘type’ => ‘template’,
‘template_id’ => ‘toggle’,
‘title’ => __( $title, ‘avia_framework’ ),
‘content’ => $c
),
);
}return $template;
}
public static function amg_enfold_inline($atts) : string
{
$output = ”;
if ($atts[‘content_layout’] == ‘inline’) {
$output .= “<div id=’amg-enfold-inline’>”;
$output .= “<div id=’amg-enfold-inline-box’>”;
$output .= “<div id=’content’></div>”;
$output .= “</div>”;
$output .= “</div>”;
}
return $output;
}public static function amg_button_append_selectors($selectors, $element_id) : array
{
$selectors[‘wrap’] = “#top #wrap_all .accordionContainer.{$element_id} .c-accordion .c-accordion__item .avia-button-wrap.button-wrap”;
$selectors[‘wrap-animation’] = “#top #wrap_all .accordionContainer.{$element_id} .c-accordion .c-accordion__item .avia_transform .avia-button-wrap.button-wrap”;
$selectors[‘button_container’] = “#top #wrap_all .accordionContainer.{$element_id} .c-accordion .c-accordion__item .avia-button”;
$selectors[‘container-hover’] = “#top #wrap_all .accordionContainer.{$element_id} .c-accordion .c-accordion__item .avia-button:hover”;
$selectors[‘container-hover-overlay’] = “#top #wrap_all .accordionContainer.{$element_id} .c-accordion .c-accordion__item .avia-button:hover .avia_button_background”;
$selectors[‘container-after’] = “#top #wrap_all .accordionContainer.{$element_id} .c-accordion .c-accordion__item .avia-button.avia-sonar-shadow:after”;
$selectors[‘container-after-hover’] = “#top #wrap_all .accordionContainer.{$element_id} .c-accordion .c-accordion__item .avia-button.avia-sonar-shadow:hover:after”;
$selectors[‘curtain’] = “#top #wrap_all .accordionContainer.{$element_id} .c-accordion .c-accordion__item .avia-button-wrap.button-wrap .avia-curtain-reveal-overlay”;
$selectors[‘button_icon’] = “#top #wrap_all .accordionContainer.{$element_id} .c-accordion .c-accordion__item .amg-button-wrap .amg-tab-icon”;return $selectors;
}public static function amg_create_button(array $atts, array $meta, $container_class, $style_tag, $wrap_class, $background_hover ):string {
$data = ”;/* if( $atts[‘button_icon_select’] == ‘yes’ )
{
$atts[‘button_icon_select’] = ‘yes-left-icon’;
}$fonts = explode(‘,’, $atts[‘font’]);
$font = $fonts[1] ?? $fonts[0];
$display_char = av_icon( $atts[‘button_icon’], $font );*/if( ! empty( $atts[‘label_display’] ) && $atts[‘label_display’] == ‘av-button-label-on-hover’ )
{
$data .= ‘data-avia-tooltip=”‘ . htmlspecialchars( $atts[‘label’] ) . ‘”‘;
$atts[‘label’] = ”;
}$blank = AviaHelper::get_link_target( $atts[‘link_target’] );
$link = AviaHelper::get_url( $atts[‘link’] );
$link = ( ( $link == ‘http://’ ) || ( $link == ‘manually’ ) ) ? ” : $link;$title_attr = ! empty( $atts[‘title_attr’] ) && empty( $atts[‘label_display’] ) ? ‘title=”‘ . esc_attr( $atts[‘title_attr’] ) . ‘”‘ : ”;
$content_html = ”;
/*if( ‘yes-left-icon’ == $atts[‘button_icon_select’] )
{
$content_html .= “<span class=’avia_button_icon avia_button_icon_left’></span>”;
}*/$content_html .= “<span class=’avia_iconbox_title’ >{$atts[‘label’]}</span>”;
/*if( ‘yes-right-icon’ == $atts[‘button_icon_select’] )
{
$content_html .= “<span class=’avia_button_icon avia_button_icon_right’ {$display_char}></span>”;
}*/$curtain_reveal_overlay = ”;
$html = ”;
$html .= $style_tag;$html .= ““;
$html .= $curtain_reveal_overlay;
$html .= $content_html;
$html .= $background_hover;
$html .= ‘‘;$output = “<div {$meta[‘custom_el_id’]} class=’avia-button-wrap {$wrap_class} avia-button-{$atts[‘position’]} {$meta[‘el_class’]}’>”;
//$output .= $curtain_reveal_overlay;
$output .= $html;
$output .= ‘</div>’;return $output;
}
}
}new AbstraktEnfoldExtensions();
require ‘plugin-update-checker-master/plugin-update-checker.php’;
use YahnisElsts\PluginUpdateChecker\v5\PucFactory;
$myUpdateChecker = PucFactory::buildUpdateChecker(
‘https://nates1dev.wpengine.com/wp-content/uploads/enfold-extensions/info.json’,
__FILE__, //Full path to the main plugin file or functions.php.
‘abstrakt-enfold-extensions’
);February 26, 2025 at 5:30 pm #1478043In reply to: Enfold 7.0
I have looked it several times and nothing stands out that would render my elements completely ignored.
I’ve attached one of the elements so you can see it.<?php /** * AMG Tabs and tabs * * Creates tabs or accordions */ if( ! defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly if( ! class_exists( 'amg_sc_cards', false ) ) { class amg_sc_cards extends aviaShortcodeTemplate { use \aviaBuilder\traits\scNamedColors; use \aviaBuilder\traits\scButtonStyles; /** * * @var int */ static protected $toggle_id = 1; /** * * @var int */ static protected $counter = 1; /** * * @var int */ static protected $initial = 0; /** * * @var array */ static protected $tags = array(); /** * Google search only accepts 1 Tag “FAQPage” * * @since 5.0 * @var int */ static protected $total = 0; /** * * @since 4.8.8 * @var boolean */ protected $in_sc_exec; /** * * @since 4.9 * @var string */ protected $heading_tag; /** * * @since 4.9 * @var string */ protected $heading_class; /** * * @since 4.5.5 * @param AviaBuilder $builder */ public function __construct( $builder ) { $this->in_sc_exec = false; $this->heading_tag = ''; $this->heading_class = ''; parent::__construct( $builder ); $this->_construct_scNamedColors(); $this->_construct_scButtonStyles(); } /** * @since 4.5.5 */ public function __destruct() { $this->_destruct_scNamedColors(); $this->_destruct_scButtonStyles(); parent::__destruct(); } /** * Create the config array for the shortcode button */ protected function shortcode_insert_button() { $this->config['version'] = '1.0'; $this->config['self_closing'] = 'no'; $this->config['base_element'] = 'yes'; $this->config['name'] = __( 'Cards', 'avia_framework' ); $this->config['tab'] = __( 'AMG Elements', 'avia_framework' ); $this->config['icon'] = AviaBuilder::$path['imagesURL'] . 'sc-contentslider.png'; $this->config['order'] = 270; $this->config['target'] = 'avia-target-insert'; $this->config['shortcode'] = 'amg_card_container'; $this->config['shortcode_nested'] = array( 'amg_card' ); $this->config['tooltip'] = __( 'Creates a new Cards Layout Group', 'avia_framework' ); $this->config['tinyMCE'] = array( 'tiny_always' => true ); $this->config['preview'] = true; $this->config['disabling_allowed'] = true; $this->config['id_name'] = 'id'; $this->config['id_show'] = 'yes'; $this->config['alb_desc_id'] = 'alb_description'; $this->config['name_item'] = __( 'AMG Card Item', 'avia_framework' ); $this->config['tooltip_item'] = __( 'An AMG Card Item', 'avia_framework' ); } protected function admin_assets() { $ver = AbstraktEnfoldExtensions::get_plugin_version(); $developMode = AbstraktEnfoldExtensions::developMode(); $lastmodtime = $developMode ? rand(1, 999999999) : $ver; //load css wp_enqueue_style( 'amg-cards', plugin_dir_url(__FILE__) . "cards.min.css", array( 'avia-layout' ), $lastmodtime ); wp_enqueue_script( 'amg-cards', plugin_dir_url(__FILE__) . "cards.min.js", array( 'avia-shortcodes' ), $lastmodtime, true ); } protected function extra_assets() { $ver = AbstraktEnfoldExtensions::get_plugin_version(); $developMode = AbstraktEnfoldExtensions::developMode(); $lastmodtime = $developMode ? rand(1, 999999999) : $ver; //load css wp_enqueue_style( 'amg-cards', plugin_dir_url(__FILE__) . "cards.css", array( 'avia-layout' ), $lastmodtime ); wp_enqueue_script( 'amg-cards', plugin_dir_url(__FILE__) . "cards.js", array( 'avia-shortcodes' ), $lastmodtime, true ); } /** * Popup Elements * * If this function is defined in a child class the element automatically gets an edit button, that, when pressed * opens a modal window that allows to edit the element properties * * @return void */ protected function popup_elements() { $this->elements = array( array( 'type' => 'tab_container', 'nodescription' => true ), array( 'type' => 'tab', 'name' => __( 'Content', 'avia_framework' ), 'nodescription' => true ), array( 'type' => 'template', 'template_id' => 'toggle_container', 'templates_include' => array( $this->popup_key( 'content_amg_card' ) ), 'nodescription' => true ), array( 'type' => 'tab_close', 'nodescription' => true ), array( 'type' => 'tab', 'name' => __( 'Automation', 'avia_framework' ), 'nodescription' => true ), array( 'type' => 'template', 'template_id' => 'toggle_container', 'templates_include' => array( $this->popup_key( 'behavior_intro' ), $this->popup_key( 'style_behavior' ) ), 'nodescription' => true ), array( 'type' => 'tab_close', 'nodescription' => true ), array( 'type' => 'tab', 'name' => __( 'Styling', 'avia_framework' ), 'nodescription' => true ), array( 'type' => 'template', 'template_id' => 'toggle_container', 'templates_include' => array( $this->popup_key( 'styling_card_dimensions' ), $this->popup_key( 'styling_colors' ), $this->popup_key( 'styling_font_sizes' ) ), 'nodescription' => true ), array( 'type' => 'tab_close', 'nodescription' => true ), array( 'type' => 'tab', 'name' => __( 'Advanced', 'avia_framework' ), 'nodescription' => true ), array( 'type' => 'toggle_container', 'nodescription' => true ), array( 'type' => 'template', 'template_id' => $this->popup_key( 'advanced_heading' ), 'nodescription' => true ), array( 'type' => 'template', 'template_id' => 'screen_options_toggle', 'lockable' => true ), array( 'type' => 'template', 'template_id' => 'developer_options_toggle', 'args' => array( 'sc' => $this ) ), array( 'type' => 'toggle_container_close', 'nodescription' => true ), array( 'type' => 'tab_close', 'nodescription' => true ), array( 'type' => 'template', 'template_id' => 'element_template_selection_tab', 'args' => array( 'sc' => $this ) ), array( 'type' => 'tab_container_close', 'nodescription' => true ) ); } /** * Create and register templates for easier maintainance * * @since 4.6.4 */ protected function register_dynamic_templates() { $this->register_modal_group_templates(); /** * Content Tab * =========== */ $c = array( array( 'name' => __( 'Add/Edit Card', 'avia_framework' ), 'desc' => __( 'Here you can add, remove and edit the tabs you want to display.', 'avia_framework' ), 'type' => 'modal_group', 'id' => 'content', 'modal_title' => __( 'Edit Card Element', 'avia_framework' ), 'editable_item' => true, 'lockable' => true, 'tmpl_set_default' => false, 'std' => array( array( 'title' => __( 'Card 1', 'avia_framework' ), 'tags' => '' ), array( 'title' => __( 'Card 2', 'avia_framework' ), 'tags' => '' ), ), 'subelements' => $this->create_modal() ), array( 'name' => __( 'Title Position', 'avia_framework' ), 'desc' => __( 'Select one of the 4 choices', 'avia_framework' ), 'id' => 'title_position', 'type' => 'select', 'std' => 'bottom', 'lockable' => true, 'subtype' => array( __( 'Top', 'avia_framework' ) => 'top', __( 'Bottom', 'avia_framework' ) => 'bottom', __( 'Full', 'avia_framework' ) => 'full', __( 'None', 'avia_framework' ) => 'none', ) ) ); $template = array( array( 'type' => 'template', 'template_id' => 'toggle', 'title' => __( 'Cards', 'avia_framework' ), 'content' => $c ), ); AviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'content_amg_card' ), $template ); $c = array( array( 'name' => __( 'Hover Animation', 'avia_framework' ), 'desc' => __( 'Select the style of hover animation', 'avia_framework' ), 'id' => 'animation', 'type' => 'select', 'std' => 'up', 'lockable' => true, 'subtype' => array( __( 'Up', 'avia_framework' ) => 'up', __( 'Down', 'avia_framework' ) => 'down', __( 'Fade', 'avia_framework' ) => 'fade', __( 'Flip', 'avia_framework' ) => 'flip', ) ), array( 'name' => __( 'Column Order', 'avia_framework' ), 'desc' => __( 'Select the column order', 'avia_framework' ), 'id' => 'column', 'type' => 'select', 'std' => 'row', 'lockable' => true, 'subtype' => array( __( 'Forward', 'avia_framework' ) => 'row', __( 'Reverse', 'avia_framework' ) => 'row-reverse', ) ) ); $template = array( array( 'type' => 'template', 'template_id' => 'toggle', 'title' => __( 'Hover', 'avia_framework' ), 'content' => $c ), ); AviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'style_behavior' ), $template ); $c = array( array( 'name' => __( 'Intro', 'avia_framework' ), 'desc' => __( 'Choose to use active style class', 'avia_framework' ), 'id' => 'intro', 'type' => 'select', 'std' => '', 'lockable' => true, 'subtype' => AbstraktEnfoldExtensions::get_intro_animations() ), array( 'name' => __( 'Duration', 'avia_framework' ), 'desc' => __( 'Select duration of time this animation will run', 'avia_framework' ), 'id' => 'duration', 'type' => 'select', 'std' => 's100', 'lockable' => true, 'required' => array( 'intro', 'not', '' ), 'subtype' => AbstraktEnfoldExtensions::get_duration_times() ), ); $template = array( array( 'type' => 'template', 'template_id' => 'toggle', 'title' => __( 'Intro', 'avia_framework' ), 'content' => $c ), ); AviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'behavior_intro' ), $template ); /** * Styling Tab * =========== */ $c = array( array( 'name' => __( 'Container Layout', 'avia_framework' ), 'desc' => __( 'Either use the widget default colors or apply some custom ones', 'avia_framework' ), 'id' => 'card_layout', 'type' => 'select', 'std' => '', 'lockable' => true, 'subtype' => array( __( 'Default', 'avia_framework' ) => '', __( 'Define Custom layout', 'avia_framework' ) => 'custom' ), ), array( 'name' => __( 'Container Max Width', 'avia_framework' ), 'desc' => __( 'Enter your minimum height for each glow in pixels', 'avia_framework' ), 'id' => 'max_width', 'type' => 'input', 'std' => '1400px', 'lockable' => true, 'required' => array( 'card_layout', 'equals', 'custom' ) ), array( 'name' => __( 'Container Min Height', 'avia_framework' ), 'desc' => __( 'Enter your minimum height for each card in pixels', 'avia_framework' ), 'id' => 'min_height', 'type' => 'input', 'std' => '580px', 'lockable' => true, 'required' => array( 'card_layout', 'equals', 'custom' ) ), array( 'name' => __( 'Column Count', 'avia_framework' ), 'desc' => __( 'This number will be the maximum number of cards per row.', 'avia_framework' ), 'id' => 'flex', 'type' => 'select', 'std' => '0 1 33.33%', 'lockable' => true, 'subtype' => array( __( '1', 'avia_framework' ) => '0 1 100%', __( '2', 'avia_framework' ) => '0 1 50%', __( '3', 'avia_framework' ) => '0 1 33.33%', __( '4', 'avia_framework' ) => '0 1 25%', __( '5', 'avia_framework' ) => '0 1 20%' ), 'required' => array( 'card_layout', 'equals', 'custom' ) ), array( 'name' => __( 'Box Shadow', 'avia_framework' ), 'desc' => __( 'Either use the card default box shadow or apply a custom one', 'avia_framework' ), 'id' => 'box', 'type' => 'select', 'std' => '', 'lockable' => true, 'subtype' => array( __( 'Default', 'avia_framework' ) => '', __( 'Define Box Shadow', 'avia_framework' ) => 'custom' ) ), array( 'name' => __( 'Box Shadow', 'avia_framework' ), 'desc' => __( 'Enter your custom box-shadow using standard CSS Syntax', 'avia_framework' ), 'id' => 'box-shadow', 'type' => 'input', 'std' => '0 0 3px #ccc', 'rgba' => true, 'lockable' => true, 'required' => array( 'box', 'equals', 'custom' ), ), array( 'name' => __( 'Border Radius', 'avia_framework' ), 'desc' => __( 'Set the border radius of the column', 'avia_framework' ), 'id' => 'border_radius', 'type' => 'multi_input', 'sync' => true, 'std' => '', 'lockable' => true, 'multi' => array( 'top' => __( 'Top-Left-Radius', 'avia_framework' ), 'right' => __( 'Top-Right-Radius', 'avia_framework' ), 'bottom' => __( 'Bottom-Right-Radius', 'avia_framework' ), 'left' => __( 'Bottom-Left-Radius', 'avia_framework' ) ) ), array( 'name' => __( 'Folded Corner', 'avia_framework' ), 'desc' => __( 'Set the border radius of the column', 'avia_framework' ), 'id' => 'corner', 'type' => 'select', 'std' => '', 'lockable' => true, 'subtype' => array( __( 'Yes', 'avia_framework' ) => 'yes', __( 'No', 'avia_framework' ) => 'no' ) ), ); $template = array( array( 'type' => 'template', 'template_id' => 'toggle', 'title' => __( 'Container', 'avia_framework' ), 'content' => $c ), ); AviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'styling_card_dimensions' ), $template ); $c = array( array( 'name' => __( 'Colors', 'avia_framework' ), 'desc' => __( 'Either use the themes default colors or apply some custom ones', 'avia_framework' ), 'id' => 'colors', 'type' => 'select', 'std' => '', 'lockable' => true, 'subtype' => array( __( 'Default', 'avia_framework' ) => '', __( 'Define Custom Colors', 'avia_framework' ) => 'custom' ) ), array( 'name' => __( 'Title Font Color', 'avia_framework' ), 'desc' => __( 'Select a custom color for the toggle icon. Leave empty to use default', 'avia_framework' ), 'id' => 'title_font_color', 'type' => 'colorpicker', 'std' => '', 'rgba' => true, 'lockable' => true, 'required' => array( 'colors', 'equals', 'custom' ), 'container_class' => 'av_third av_third_first', ), array( 'name' => __( 'Title Background Color', 'avia_framework' ), 'desc' => __( 'Select a custom color for the toggle icon. Leave empty to use default', 'avia_framework' ), 'id' => 'title_bg_color', 'type' => 'colorpicker', 'std' => '', 'rgba' => true, 'lockable' => true, 'required' => array( 'colors', 'equals', 'custom' ), 'container_class' => 'av_third av_third_last', ), array( 'name' => __( 'Content Font Color', 'avia_framework' ), 'desc' => __( 'Select a custom font color. Leave empty to use the default', 'avia_framework' ), 'id' => 'font_color', 'type' => 'colorpicker', 'std' => '', 'rgba' => true, 'lockable' => true, 'required' => array( 'colors', 'equals', 'custom' ), 'container_class' => 'av_third av_third_first' ), array( 'name' => __( 'Background Color', 'avia_framework' ), 'desc' => __( 'Select a custom background color. Leave empty to use the default', 'avia_framework' ), 'id' => 'background_color', 'type' => 'colorpicker', 'std' => '', 'rgba' => true, 'lockable' => true, 'required' => array( 'colors', 'equals', 'custom' ), 'container_class' => 'av_third', ) ); $template = array( array( 'type' => 'template', 'template_id' => 'toggle', 'title' => __( 'Colors', 'avia_framework' ), 'content' => $c ), ); AviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'styling_colors' ), $template ); $c = array( array( 'name' => __( 'Title Font Sizes', 'avia_framework' ), 'desc' => __( 'Select a custom font size for the toggle title. Using non default values might need CSS styling.', 'avia_framework' ), 'type' => 'template', 'template_id' => 'font_sizes_icon_switcher', 'lockable' => true, 'textfield' => true, 'subtype' => array( 'default' => AviaHtmlHelper::number_array( 10, 50, 1, array( __( 'Use Default', 'avia_framework' ) => '' ), 'px' ), 'desktop' => AviaHtmlHelper::number_array( 10, 50, 1, array( __( 'Use Default', 'avia_framework' ) => '' ), 'px' ), 'medium' => AviaHtmlHelper::number_array( 10, 40, 1, array( __( 'Use Default', 'avia_framework' ) => '', __( 'Hidden', 'avia_framework' ) => 'hidden' ), 'px' ), 'small' => AviaHtmlHelper::number_array( 10, 40, 1, array( __( 'Use Default', 'avia_framework' ) => '', __( 'Hidden', 'avia_framework' ) => 'hidden' ), 'px' ), 'mini' => AviaHtmlHelper::number_array( 10, 40, 1, array( __( 'Use Default', 'avia_framework' ) => '', __( 'Hidden', 'avia_framework' ) => 'hidden' ), 'px' ) ), 'id_sizes' => array( 'default' => 'size-title', 'desktop' => 'av-desktop-font-size-toggle', 'medium' => 'av-medium-font-size-toggle', 'small' => 'av-small-font-size-toggle', 'mini' => 'av-mini-font-size-toggle' ) ), array( 'name' => __( 'Content Font Sizes', 'avia_framework' ), 'desc' => __( 'Select a custom font size for the content.', 'avia_framework' ), 'type' => 'template', 'template_id' => 'font_sizes_icon_switcher', 'lockable' => true, 'textfield' => true, 'subtype' => array( 'default' => AviaHtmlHelper::number_array( 10, 50, 1, array( __( 'Use Default', 'avia_framework' ) => '' ), 'px' ), 'desktop' => AviaHtmlHelper::number_array( 10, 50, 1, array( __( 'Use Default', 'avia_framework' ) => '' ), 'px' ), 'medium' => AviaHtmlHelper::number_array( 10, 40, 1, array( __( 'Use Default', 'avia_framework' ) => '', __( 'Hidden', 'avia_framework' ) => 'hidden' ), 'px' ), 'small' => AviaHtmlHelper::number_array( 10, 40, 1, array( __( 'Use Default', 'avia_framework' ) => '', __( 'Hidden', 'avia_framework' ) => 'hidden' ), 'px' ), 'mini' => AviaHtmlHelper::number_array( 10, 40, 1, array( __( 'Use Default', 'avia_framework' ) => '', __( 'Hidden', 'avia_framework' ) => 'hidden' ), 'px' ) ), 'id_sizes' => array( 'default' => 'size-content', 'desktop' => 'av-desktop-font-size-content', 'medium' => 'av-medium-font-size-content', 'small' => 'av-small-font-size-content', 'mini' => 'av-mini-font-size-content' ) ) ); $template = array( array( 'type' => 'template', 'template_id' => 'toggle', 'title' => __( 'Font Sizes', 'avia_framework' ), 'content' => $c ), ); AviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'styling_font_sizes' ), $template ); /** * Advanced Tab * ============ */ $c = array( array( 'type' => 'template', 'template_id' => 'heading_tag', 'theme_default' => 'p', 'name' => __( 'Tab Title Tag (Theme Default is <%s>)', 'avia_framework' ), 'desc' => __( 'Select a html tag for the toggle titles of this element.', 'avia_framework' ), 'context' => __CLASS__, 'lockable' => true ), ); $template = array( array( 'type' => 'template', 'template_id' => 'toggle', 'title' => __( 'Tab Titles', 'avia_framework' ), 'content' => $c ), ); AviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'advanced_heading' ), $template ); } /** * Creates the modal popup for a single entry * * @since 4.6.4 * @return array */ protected function create_modal() { $elements = array( array( 'type' => 'tab_container', 'nodescription' => true ), array( 'type' => 'tab', 'name' => __( 'Content', 'avia_framework' ), 'nodescription' => true ), array( 'type' => 'template', 'template_id' => 'toggle_container', 'templates_include' => array( $this->popup_key( 'modal_card_title' ), $this->popup_key( 'modal_card_image' ), $this->popup_key( 'modal_card_content' ) ), ), array( 'type' => 'tab_close', 'nodescription' => true ), ///////////////////////////// BUTTON START ////////////////////////////// array( 'type' => 'tab', 'name' => __( 'Button', 'avia_framework' ), 'nodescription' => true ), array( 'type' => 'template', 'template_id' => 'toggle_container', 'templates_include' => array( $this->popup_key( 'modal_button' ), $this->popup_key( 'modal_button_link' ), $this->popup_key( 'styling_button_appearance' ), $this->popup_key( 'styling_button_fonts' ), $this->popup_key( 'styling_button_margin_padding' ), $this->popup_key( 'styling_button_colors' ), 'border_toggle', 'box_shadow_toggle', $this->popup_key( 'advanced_button_animation' ) ), 'nodescription' => true ), array( 'type' => 'tab_close', 'nodescription' => true ), ///////////////////////////// BUTTON END //////////////////////////////// array( 'type' => 'tab', 'name' => __( 'Advanced', 'avia_framework' ), 'nodescription' => true ), array( 'type' => 'template', 'template_id' => 'toggle_container', 'templates_include' => array( $this->popup_key( 'modal_advanced_developer' ) ), 'nodescription' => true ), array( 'type' => 'tab_close', 'nodescription' => true ), array( 'type' => 'template', 'template_id' => 'element_template_selection_tab', 'args' => array( 'sc' => $this, 'modal_group' => true ) ), array( 'type' => 'tab_container_close', 'nodescription' => true ) ); return $elements; } /** * Register all templates for the modal group popup * * @since 4.6.4 */ protected function register_modal_group_templates() { /** * Content Tab * =========== */ $c = array( array( 'name' => __( 'Card Title', 'avia_framework' ), 'desc' => __( 'Enter the card title here (Better keep it short)', 'avia_framework' ), 'id' => 'title', 'type' => 'input', 'std' => 'Tab Title', 'lockable' => true, ) ); $template = array( array( 'type' => 'template', 'template_id' => 'toggle', 'title' => __( 'Title', 'avia_framework' ), 'content' => $c ), ); AviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'modal_card_title' ), $template ); $c = array( array( 'name' => __( 'Card Image', 'avia_framework' ), 'desc' => __( 'Either upload a new, or choose an existing image from your media library', 'avia_framework' ), 'id' => 'src', 'type' => 'image', 'title' => __( 'Insert Image', 'avia_framework' ), 'button' => __( 'Insert', 'avia_framework' ), 'std' => AviaBuilder::$path['imagesURL'] . 'placeholder.jpg', 'lockable' => true, 'locked' => array( 'src', 'attachment', 'attachment_size' ) ), array( 'name' => __( 'Image Position', 'avia_framework' ), 'desc' => __( 'Either upload a new, or choose an existing image from your media library', 'avia_framework' ), 'id' => 'image_position', 'type' => 'select', 'std' => 'bottom', 'lockable' => true, 'locked' => array( 'src', 'attachment', 'attachment_size' ), 'subtype' => array( __( 'Top', 'avia_framework' ) => 'top', __( 'Bottom', 'avia_framework' ) => 'bottom', __( 'Above', 'avia_framework' ) => 'above', __( 'Below', 'avia_framework' ) => 'below', ) ) ); $template = array( array( 'type' => 'template', 'template_id' => 'toggle', 'title' => __( 'Image', 'avia_framework' ), 'content' => $c ), ); AviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'modal_card_image' ), $template ); $c = array( array( 'name' => __( 'Card Content', 'avia_framework' ), 'desc' => __( 'Enter some content here', 'avia_framework' ), 'id' => 'content', 'type' => 'tiny_mce', 'std' => __( 'Tab Content goes here', 'avia_framework' ), 'lockable' => true, ), ); $template = array( array( 'type' => 'template', 'template_id' => 'toggle', 'title' => __( 'Content', 'avia_framework' ), 'content' => $c ), ); AviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'modal_card_content' ), $template ); ///////////////////////////// BUTTON START ////////////////////////////// BUTTON START //////////////////////////////// $template = AbstraktEnfoldExtensions::amg_enfold_section('Button'); AviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'modal_button' ), $template ); $template = AbstraktEnfoldExtensions::amg_enfold_section('Link Settings'); AviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'modal_button_link' ), $template ); $template = AbstraktEnfoldExtensions::amg_enfold_section('Appearance'); AviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'styling_button_appearance' ), $template ); $template = AbstraktEnfoldExtensions::amg_enfold_section('Font Sizes'); AviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'styling_button_fonts' ), $template ); $c = AbstraktEnfoldExtensions::amg_enfold_section('Button Margin And Padding'); AviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'styling_button_margin_padding' ), $c ); $template = AbstraktEnfoldExtensions::amg_enfold_section('Colors'); AviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'styling_button_colors' ), $template ); $template = AbstraktEnfoldExtensions::amg_enfold_section('Animation'); AviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'advanced_button_animation' ), $template ); ///////////////////////////// BUTTON END ////////////////////////////// BUTTON END //////////////////////////////// $setting_id = Avia_Builder()->get_developer_settings( 'custom_id' ); $class = in_array( $setting_id, array( 'deactivate', 'hide' ) ) ? 'avia-hidden' : ''; $c = array( array( 'name' => __( 'For Developers: Custom Tab ID','avia_framework' ), 'desc' => __( 'Insert a custom ID for the element here. Make sure to only use allowed characters (latin characters, underscores, dashes and numbers, no special characters can be used)','avia_framework' ), 'id' => 'custom_id', 'type' => 'input', 'std' => '', 'container_class' => $class, ) ); $template = array( array( 'type' => 'template', 'template_id' => 'toggle', 'title' => __( 'Developer Settings', 'avia_framework' ), 'content' => $c ), ); AviaPopupTemplates()->register_dynamic_template( $this->popup_key( 'modal_advanced_developer' ), $template ); } /** * Editor Sub Element - this function defines the visual appearance of an element that is displayed within a modal window and on click opens its own modal window * Works in the same way as Editor Element * * @param array $params holds the default values for $content and $args. * @return array usually holds an innerHtml key that holds item specific markup. */ public function editor_sub_element( $params ) { $default = array(); $locked = array(); $attr = $params['args']; Avia_Element_Templates()->set_locked_attributes( $attr, $this, $this->config['shortcode_nested'][0], $default, $locked ); $template = $this->update_option_lockable( 'title', $locked ); $params['innerHtml'] = ''; $params['innerHtml'] .= "<div class='avia_title_container' {$template} data-update_element_template='yes'>{$attr['title']}</div>"; return $params; } /** * Create custom stylings * * @since 4.8.4 * @param array $args * @return array */ protected function get_element_styles( array $args ) { $result = parent::get_element_styles( $args ); extract( $result ); $default = array( 'faq_markup' => '', 'styling' => '', 'colors' => '', 'border_color' => '', 'title_font_color' => '', 'title_background_color' => '', 'font_color' => '', 'background_color' => '', 'background_title_color' => '', ); $default = $this->sync_sc_defaults_array( $default, 'no_modal_item', 'no_content' ); $locked = array(); Avia_Element_Templates()->set_locked_attributes( $atts, $this, $shortcodename, $default, $locked, $content ); Avia_Element_Templates()->add_template_class( $meta, $atts, $default ); $meta = aviaShortcodeTemplate::set_frontend_developer_heading_tag( $atts, $meta ); $this->in_sc_exec = true; $atts = shortcode_atts( $default, $atts, $this->config['shortcode'] ); // set heading tag for all titles - save global $default_heading = ! empty( $meta['heading_tag'] ) ? $meta['heading_tag'] : 'h3'; $args = array( 'heading' => $default_heading, 'extra_class' => $meta['heading_class'] ); $extra_args = array( $this, $atts, $content, 'title' ); /** * @since 4.9 * @return array */ $args = apply_filters( 'avf_customize_heading_settings', $args, __CLASS__, $extra_args ); $this->heading_tag = ! empty( $args['heading'] ) ? $args['heading'] : $default_heading; $this->heading_class = ! empty( $args['extra_class'] ) ? $args['extra_class'] : $meta['heading_class']; $element_styling->create_callback_styles( $atts ); $classes = array( 'cardContainer', $element_id, $atts['styling'] ); $element_styling->add_classes( 'item_container', $classes ); $element_styling->add_classes_from_array( 'item_container', $meta, 'el_class' ); $element_styling->add_responsive_classes( 'item_container', 'hide_element', $atts ); $element_styling->add_responsive_font_sizes( 'title', 'size-title', $atts, $this ); $element_styling->add_responsive_font_sizes( 'title', 'size-title', $atts, $this ); $element_styling->add_responsive_font_sizes( 'toggle-content', 'size-content', $atts, $this ); if ($atts['card_layout'] == 'custom') { $element_styling->add_styles( 'item_container', array( 'max-width' => $atts['max_width'], ) ); $element_styling->add_styles( 'column', array( 'flex' => str_replace(',', ' ', $atts['flex']), ) ); $element_styling->add_styles( 'border', array( 'border-radius' => str_replace(',', ' ', $atts['border_radius']), ) ); } if( 'custom' == $atts['colors'] ) { $element_styling->add_styles( 'content', array( 'color' => $atts['font_color'], ) ); $element_styling->add_styles( 'title', array( 'color' => $atts['title_font_color'], )); $element_styling->add_styles( 'tBackground', array( 'background-color' => $atts['title_bg_color'], )); $element_styling->add_styles( 'flip', array( 'box-shadow' => $atts['box-shadow'], )); } if ($atts['corner'] != 'yes') { $element_styling->add_styles( 'corner', array( 'border-style' => 'none', )); } // #top needed when placed inside section $selectors = array( 'column' => "#top #wrap_all .cardContainer.{$element_id} .amg-flex-box .amg-flex-column", 'item_container' => "#top #wrap_all .cardContainer.{$element_id}", 'title' => "#top #wrap_all .cardContainer.{$element_id} .amg-card-container {$this->heading_tag}.amg-card-title", 'content' => "#top #wrap_all .cardContainer.{$element_id} .amg-card-container .amg-card-content", 'contentTitle' => "#top #wrap_all .cardContainer.{$element_id} .amg-card-container {$this->heading_tag}.amg-card-content-title", 'tBackground' => "#top #wrap_all .cardContainer.{$element_id} .amg-card-container .card-title-container", 'flip' => "#top #wrap_all .cardContainer.{$element_id} .amg-card-container .amg-flip-box", 'border' => "#top #wrap_all .cardContainer.{$element_id} .amg-card-container .amg-flip-box, #top #wrap_all .cardContainer.{$element_id} .amg-card-container, #top #wrap_all .cardContainer.{$element_id} .amg-card-container .amg-card-content, #top #wrap_all .cardContainer.{$element_id} .amg-card-container .amg-card-image, #top #wrap_all .cardContainer.{$element_id} .amg-card-container .card-title-container", 'corner' => "#top #wrap_all .cardContainer.{$element_id} .amg-card-container .card-title-container:before " ); $element_styling->add_selectors( $selectors ); $result['default'] = $default; $result['atts'] = $atts; $result['content'] = $content; $result['meta'] = $meta; $result['element_styling'] = $element_styling; $this->parent_atts = $atts; amg_sc_cards::$initial = $atts['initial']; amg_sc_cards::$tags = array(); $this->el_styling = $element_styling; return $result; } /** * Create custom stylings for items * * @since 4.8.4 * @param array $args * @return array */ protected function get_element_styles_item( array $args ) { $result = parent::get_element_styles_item( $args ); /** * Fixes a problem when 3-rd party plugins call nested shortcodes without executing main shortcode (like YOAST in wpseo-filter-shortcodes) */ if( ! $this->in_sc_exec ) { return $result; } extract( $result ); $default = array( 'title' => '', 'tags' => '', 'custom_id' => '', 'custom_markup' => '' ); $default = $this->sync_sc_defaults_array( $default, 'modal_item', 'no_content' ); $locked = array(); Avia_Element_Templates()->set_locked_attributes( $atts, $this, $shortcodename, $default, $locked, $content ); $classes = array( 'card', $element_id ); $element_styling->add_classes( 'item_container', $classes ); $element_styling->add_classes( 'item_container', $this->class_by_arguments( 'icon_select, size, position', $atts, true, 'array' ) ); $element_styling->add_responsive_classes( 'item_container', 'hide_element', $atts ); $element_styling->add_responsive_font_sizes( 'container', 'size-content', $atts, $this ); $this->set_button_styes( $element_styling, $atts ); ///////////////////////////// BUTTON START ////////////////////////////// BUTTON START //////////////////////////////// if( $atts['icon_select'] == 'yes' ) { $atts['icon_select'] = 'yes-left-icon'; } $classes = array( 'avia-button', $element_id ); $element_styling->add_classes( 'container', $classes ); $element_styling->add_classes( 'container', $this->class_by_arguments( 'button_icon_select, size, position', $atts, true, 'array' ) ); $element_styling->add_responsive_classes( 'container', 'hide_element', $atts ); $element_styling->add_responsive_font_sizes( 'container', 'size-text', $atts, $this ); $element_styling->add_responsive_font_sizes( 'button_icon', 'size-button-icon', $atts, $this ); $element_styling->add_classes( 'wrap', $element_id . '-wrap' ); $this->set_button_styes( $element_styling, $atts ); if( ! empty( $atts['css_position'] ) ) { $element_styling->add_responsive_styles( 'wrap', 'css_position', $atts, $this ); } $element_styling->add_responsive_styles( 'container', 'margin', $atts, $this ); $element_styling->add_responsive_styles( 'container', 'padding', $atts, $this ); if( ! in_array( $atts['animation'], array( 'no-animation', '' ) ) ) { if( false !== strpos( $atts['animation'], 'curtain-reveal-' ) ) { $classes_curtain = array( 'avia-curtain-reveal-overlay', 'av-animated-when-visible-95', 'animate-all-devices', $atts['animation'] ); // animate in preview window if( is_admin() ) { $classes_curtain[] = 'avia-animate-admin-preview'; } $element_styling->add_classes( 'curtain', $classes_curtain ); $element_styling->add_callback_styles( 'curtain', array( 'animation' ) ); } else { $wrap_classes = array( 'avia_animated_button', 'av-animated-when-visible-95', // 'animate-all-devices', $atts['animation'] ); if( is_admin() ) { $wrap_classes[] = 'avia-animate-admin-preview'; $element_styling->add_callback_styles( 'wrap', array( 'animation' ) ); } else { $element_styling->add_callback_styles( 'wrap-animation', array( 'animation' ) ); } $element_styling->add_classes( 'wrap', $wrap_classes ); } } ///////////////////////////// BUTTON END //////////////////////////////// BUTTON END ////////////////////////////////// $selectors = array( 'item_container' => ".cardContainer .amg-card-container.{$element_id}", 'content' => ".cardContainer .amg-card-container.{$element_id} .amg-card-content" ); ///////////////////////////// BUTTON START ////////////////////////////// BUTTON START //////////////////////////////// $selectors = AbstraktEnfoldExtensions::amg_button_append_selectors($selectors, $element_id); ///////////////////////////// BUTTON END //////////////////////////////// BUTTON END ////////////////////////////////// $element_styling->add_selectors( $selectors ); $result['default'] = $default; $result['atts'] = $atts; $result['content'] = $content; $result['element_styling'] = $element_styling; return $result; } /** * Frontend Shortcode Handler * * @param array $atts array of attributes * @param string $content text within enclosing form of shortcode element * @param string $shortcodename the shortcode found, when == callback name * @return string $output returns the modified html string */ public function shortcode_handler( $atts, $content = '', $shortcodename = '', $meta = '' ) { $result = $this->get_element_styles( compact( array( 'atts', 'content', 'shortcodename', 'meta' ) ) ); extract( $result ); extract( $atts ); $this->subitem_inline_styles = ''; amg_sc_cards::$counter = 1; $content = ShortcodeHelper::avia_remove_autop( $content, true ); $style_tag = $element_styling->get_style_tag( $element_id ); $item_tag = $element_styling->style_tag_html( $this->subitem_inline_styles, 'sub-' . $element_id ); $container_class = $element_styling->get_class_string( 'item_container' ); $class = $atts['animation']; $class .= " {$atts['title_position']}"; $output = ''; $output .= $style_tag; $output .= $item_tag; $output .= "<div id='app' data-animated='{$atts['intro']}' data-duration='{$atts['duration']}' data-height='{$atts['min_height']}' data-mobile-height='{$atts['mobile_min_height']}' {$meta['custom_el_id']} class='{$container_class} {$class}' {$markup_faq}>"; $output .= "<div class='amg-flex-box'>"; $output .= $content; $output .= '</div>'; $output .= '</div>'; $this->in_sc_exec = false; return $output; } /** * Shortcode handler * * @param array $atts * @param string $content * @param string $shortcodename * @return string */ public function amg_card( $atts, $content = '', $shortcodename = '' ) { /** * Fixes a problem when 3-rd party plugins call nested shortcodes without executing main shortcode (like YOAST in wpseo-filter-shortcodes) */ if( ! $this->in_sc_exec ) { return ''; } $result = $this->get_element_styles_item( compact( array( 'atts', 'content', 'shortcodename' ) ) ); extract( $result ); $toggle_atts = $atts; $this->subitem_inline_styles .= $element_styling->get_style_tag( $element_id, 'rules_only' ); ///////////////////////////// BUTTON START //////////////////////////////// BUTTON START ////////////////////////////////// $output = ''; $output .= $style_tag; $button = ''; if( '' != $atts['color_options'] ) { if( 'custom' != $atts['btn_color_bg_hover'] && 'btn_custom_grad' != $atts['btn_color_bg'] ) { // must be added otherwise we get a bottom border !!! // $style_hover = "style='background-color:{$atts['btn_color_bg_hover']};'"; if( $this->is_special_button_color( $atts['btn_color_bg_hover'] ) ) { $background_hover = "<span class='avia_button_background avia-button avia-color-{$atts['btn_color_bg_hover']}' {$style_hover}></span>"; } } } $style_tag = $element_styling->get_style_tag( $element_id ); $wrap_class = $element_styling->get_class_string( 'wrap' ); $button_container_class = $element_styling->get_class_string( 'container' ); if ($atts['button'] == 'yes') { $button = AbstraktEnfoldExtensions::amg_create_button($atts, $meta, $button_container_class, $style_tag, $wrap_class, $background_hover); } ///////////////////////////// BUTTON END //////////////////////////////// BUTTON END ////////////////////////////////// $output .= "<div class='amg-flex-column card'>"; $output .= '<div class="amg-card-container">'; $output .= '<div class="amg-flip-box">'; $output .= '<div class="amg-card-content">'; $output .= ShortcodeHelper::avia_apply_autop( ShortcodeHelper::avia_remove_autop( $content ) ); $output .= $button; $output .= '</div>'; $output .= '<div id="' . $toggle_atts['custom_id'] . '" class="amg-card-image" id="card-image-' . $toggle_atts['custom_id'] . '"><img alt="' . $toggle_atts['title'] . '" src="' . $toggle_atts['src'] . '"></div>'; $output .= "<div class='card-title-container'><{$this->heading_tag} class='amg-card-title'>" . $toggle_atts['title'] . "</{$this->heading_tag}></div>";; $output .= '</div>'; $output .= '</div>'; $output .= '</div>'; amg_sc_cards::$counter ++; return $output; } } }
February 23, 2025 at 2:22 pm #1477703In reply to: Sub menu width with description
Hi,
Check that your Menu Screen elements ▸ CSS classs is checked, then add the custom class “nolinkstyle”, the manually add the link:
then add this css to your Quick CSS:#top #header .avia_mega_div .sub-menu .avia_mega_text_block.nolinkstyle a { text-decoration: none; color: #000; } .header_color .main_menu .menu ul li.nolinkstyle a:hover { background-color: unset; }
Best regards,
MikeFebruary 8, 2025 at 1:44 pm #1476668Hey michaelf245,
I assume that this is what you have now with the image in the content box:
Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:function custom_script() { ?> <script> $(document).ready(function() { $('.av-milestone').each(function() { var image = $(this).find('img'); var content = $(this).find('.av-milestone-content-wrap'); content.after(image); $(this).css('display', 'flex'); image.css('margin-left', '20px'); }); }); </script> <?php } add_action( 'wp_footer', 'custom_script', 99 );
and this css in your quick css:
.avia-timeline-vertical.av-milestone-placement-left .av-milestone-content-wrap { width: 50%; } .avia-timeline-vertical .av-milestone-content-wrap { padding: 0px 0px 30px 60px; } .avia-timeline-vertical .av-milestone-icon-wrap { padding: 0px 0 30px 0; width: 90px; } html .av-milestone :where(img[class*=wp-image-]) { height: 180px; } .avia-timeline-vertical .av-milestone-date { padding: 30px 60px 0 0; }
My images are 180px, so you may need to adjust the css to suit.
result:
Best regards,
MikeJanuary 27, 2025 at 6:29 pm #1475876In reply to: Video in Header
have a look at : https://webers-testseite.de/bemopriv/
the heading had to be styled for responsive case – but I didn’t feel like doing that anymore.the layout is based on a grid-row element
this is the enfold shortcode of the grid-row:
[av_layout_row min_height_percent='percent' min_height_pc='60' min_height='0' border='' fold_type='' fold_height='' fold_more='Read more' fold_less='Read less' fold_text_style='' fold_btn_align='' color='main_color' fold_overlay_color='' fold_text_color='' fold_btn_color='theme-color' fold_btn_bg_color='' fold_btn_font_color='' size-btn-text='' av-desktop-font-size-btn-text='' av-medium-font-size-btn-text='' av-small-font-size-btn-text='' av-mini-font-size-btn-text='' fold_timer='' z_index_fold='' mobile='av-flex-cells' mobile_breaking='' mobile_column_order='' id='' custom_class='full-bg-image' template_class='' aria_label='' av_element_hidden_in_editor='0' av_uid='av-m6f9v8gq' sc_version='1.0'] [av_cell_three_fourth vertical_align='middle' padding=',,,' av-desktop-padding=',,,80px' av-medium-padding=',,,80px' av-small-padding='3' av-small-padding_sync='true' av-mini-padding='20' av-mini-padding_sync='true' background='bg_color' background_color='' background_gradient_direction='vertical' background_gradient_color1='#000000' background_gradient_color2='#ffffff' background_gradient_color3='' src='' attachment='' attachment_size='' background_attachment='scroll' background_position='top left' background_repeat='no-repeat' link='' link_dynamic='' linktarget='' title_attr='' link_hover='' mobile_display='' mobile_col_pos='0' custom_class='' template_class='' av_uid='av-m6f9ukqb' sc_version='1.0'] [av_four_fifth first min_height='' vertical_alignment='av-align-top' space='' row_boxshadow_width='10' row_boxshadow_color='' margin='0px' margin_sync='true' av-desktop-margin='' av-desktop-margin_sync='true' av-medium-margin='' av-medium-margin_sync='true' av-small-margin='' av-small-margin_sync='true' av-mini-margin='' av-mini-margin_sync='true' mobile_breaking='' mobile_column_order='' border='1' border_style='solid' border_color='#000000' radius='15' radius_sync='true' min_col_height='' padding='30' padding_sync='true' av-desktop-padding='' av-desktop-padding_sync='true' av-medium-padding='' av-medium-padding_sync='true' av-small-padding='' av-small-padding_sync='true' av-mini-padding='' av-mini-padding_sync='true' svg_div_top='' svg_div_top_color='#333333' svg_div_top_width='100' svg_div_top_height='50' svg_div_top_max_height='none' svg_div_top_opacity='' svg_div_bottom='' svg_div_bottom_color='#333333' svg_div_bottom_width='100' svg_div_bottom_height='50' svg_div_bottom_max_height='none' svg_div_bottom_opacity='' fold_type='' fold_height='' fold_more='Read more' fold_less='Read less' fold_text_style='' fold_btn_align='' column_boxshadow_width='10' column_boxshadow_color='' background='bg_color' background_color='rgba(0,0,0,0.5)' background_gradient_direction='vertical' background_gradient_color1='#000000' background_gradient_color2='#ffffff' background_gradient_color3='' src='' attachment='' attachment_size='' src_dynamic='' background_position='top left' background_repeat='no-repeat' highlight_size='1.1' fold_overlay_color='' fold_text_color='' fold_btn_color='theme-color' fold_btn_bg_color='' fold_btn_font_color='' size-btn-text='' av-desktop-font-size-btn-text='' av-medium-font-size-btn-text='' av-small-font-size-btn-text='' av-mini-font-size-btn-text='' animation='' animation_duration='' animation_custom_bg_color='' animation_z_index_curtain='100' parallax_parallax='' parallax_parallax_speed='' av-desktop-parallax_parallax='' av-desktop-parallax_parallax_speed='' av-medium-parallax_parallax='' av-medium-parallax_parallax_speed='' av-small-parallax_parallax='' av-small-parallax_parallax_speed='' av-mini-parallax_parallax='' av-mini-parallax_parallax_speed='' fold_timer='' z_index_fold='' css_position='' css_position_location=',,,' css_position_z_index='' av-desktop-css_position='' av-desktop-css_position_location=',,,' av-desktop-css_position_z_index='' av-medium-css_position='' av-medium-css_position_location=',,,' av-medium-css_position_z_index='' av-small-css_position='' av-small-css_position_location=',,,' av-small-css_position_z_index='' av-mini-css_position='' av-mini-css_position_location=',,,' av-mini-css_position_z_index='' link='' link_dynamic='' linktarget='' link_hover='' title_attr='' alt_attr='' mobile_display='' mobile_col_pos='0' id='' custom_class='' template_class='' aria_label='' element_template='' one_element_template='' av_uid='av-t574on' sc_version='1.0'] [av_heading heading='FREEZE FLAT™' tag='h1' style='blockquote modern-quote' subheading_active='subheading_above' show_icon='' icon='ue800' font='entypo-fontello' size='' av-desktop-font-size-title='48' av-medium-font-size-title='42' av-small-font-size-title='36' av-mini-font-size-title='28' subheading_size='' av-desktop-font-size='36' av-medium-font-size='28' av-small-font-size='24' av-mini-font-size='20' icon_size='' av-desktop-font-size-1='' av-medium-font-size-1='' av-small-font-size-1='' av-mini-font-size-1='' color='custom-color-heading' custom_font='#ffffff' subheading_color='#ffffff' seperator_color='' icon_color='' margin='' margin_sync='true' av-desktop-margin='' av-desktop-margin_sync='true' av-medium-margin='' av-medium-margin_sync='true' av-small-margin='' av-small-margin_sync='true' av-mini-margin='' av-mini-margin_sync='true' headline_padding='' headline_padding_sync='true' av-desktop-headline_padding='' av-desktop-headline_padding_sync='true' av-medium-headline_padding='' av-medium-headline_padding_sync='true' av-small-headline_padding='' av-small-headline_padding_sync='true' av-mini-headline_padding='' av-mini-headline_padding_sync='true' padding='10' av-desktop-padding='' av-medium-padding='' av-small-padding='' av-mini-padding='' icon_padding='10' av-desktop-icon_padding='' av-medium-icon_padding='' av-small-icon_padding='' av-mini-icon_padding='' link='' link_dynamic='' link_target='' title_attr='' id='' custom_class='iceglas' template_class='' element_template='' one_element_template='' av_uid='av-m6e7xj5g' sc_version='1.0' admin_preview_bg=''] The Original [/av_heading] [/av_four_fifth][/av_cell_three_fourth][av_cell_one_fourth vertical_align='bottom' padding='' padding_sync='true' av-desktop-padding='' av-desktop-padding_sync='true' av-medium-padding='' av-medium-padding_sync='true' av-small-padding='' av-small-padding_sync='true' av-mini-padding='' av-mini-padding_sync='true' background='bg_color' background_color='' background_gradient_direction='vertical' background_gradient_color1='#000000' background_gradient_color2='#ffffff' background_gradient_color3='' src='' attachment='' attachment_size='' background_attachment='scroll' background_position='top left' background_repeat='no-repeat' link='' link_dynamic='' linktarget='' title_attr='' link_hover='' mobile_display='' mobile_col_pos='0' custom_class='' template_class='' av_uid='av-u4sunr' sc_version='1.0'] [av_video src='https://www.youtube.com/watch?v=W73GdyDSHuU' mobile_image='https://webers-testseite.de/wp-content/uploads/dynamic_avia/avia_video_thumbnails/youtube/W73GdyDSHuU/W73GdyDSHuU.jpg' attachment='49853' attachment_size='full' video_autoplay_enabled='aviaTBvideo_autoplay_enabled' html5_fullscreen='aviaTBhtml5_fullscreen' format='16-9' width='16' height='9' conditional_play='' id='' custom_class='' template_class='' element_template='' one_element_template='' av_uid='av-m6f9u95o' sc_version='1.0'] [/av_cell_one_fourth] [/av_layout_row]
January 25, 2025 at 11:06 pm #1475796Hey marketbiz,
To remove the new products section on the empty cart page add this css to your Quick CSS:.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wp-block-product-new,.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wp-block-heading:not(.wc-block-cart__empty-cart__title) { display:none; }
Then to add the button add this code to the end of your child theme functions.php file in Appearance ▸ Editor:
function custom_script() { ?> <script> (function($){ var button = $('<div class="avia-button-wrap av-m6cpztd3-7c60bd307536e2939b17d69a432c4593-wrap avia-button-center avia-builder-el-56 el_after_av_button avia-builder-el-last "><style type="text/css" data-created_by="avia_inline_auto" id="style-css-av-m6cpztd3-7c60bd307536e2939b17d69a432c4593">#top #wrap_all .avia-button.av-m6cpztd3-7c60bd307536e2939b17d69a432c4593{border-radius:20px 20px 20px 20px;transition:all 0.4s ease-in-out;}#top #wrap_all.avia-button.av-m6cpztd3-7c60bd307536e2939b17d69a432c4593:hover .avia_button_background{border-radius:20px 20px 20px 20px;}</style><a href="#" class="avia-button av-m6cpztd3-7c60bd307536e2939b17d69a432c4593 av-link-btn avia-icon_select-no avia-size-x-large avia-position-center avia-color-dark" title="Dashboard" aria-label="Dashboard"><span class="avia_iconbox_title">Dashboard</span></a></div>'); if ($("body").hasClass("woocommerce-cart") && $(".wp-block-woocommerce-empty-cart-block .wc-block-grid").hasClass("wp-block-woocommerce-product-new") == true) { $(button).appendTo('.wp-block-woocommerce-cart'); } else {} })(jQuery); </script> <?php } add_action( 'wp_footer', 'custom_script', 99 );
Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.
Then adjust the button URL to suit.
Best regards,
MikeDecember 22, 2024 at 11:03 pm #1474153Dirk Messiaen
ParticipantI’m trying to put the same border and shadow on the image as i put on the button below.
I’ve put a Lockable Custom CSS Class ‘blokje’ in the image as I want to save it as a template.
I’ve put custom CSS in the Quick CSS. The border works but the shadow doesn’t..blokje img { border: 1px solid #005999; padding: 40px; box-shadow: 1px 1px 0px 0px #005999; }
I’ve inspected the CSS result and the properties seem to get overwritten.
.avia-image-container.av-m4zpvax3-7f0e8c97aa55acf32e454c29d2832a05 img.avia_image { box-shadow: none; } .avia-image-container .avia_image, .avia-image-container .avia-image-overlay-wrap { transition: all 0.7s; } .blokje img { border: 1px solid #005999; padding: 40px; box-shadow: 1px 1px 0px 0px #005999; }
When I change the ‘none’ in the box-schadow to ‘1px 1px 0px 0px #005999’, I get the result I want.
I tried to put the following code in Quick CSS but no success:
.avia-image-container.av-m4zpvax3-7f0e8c97aa55acf32e454c29d2832a05 img.avia_image { box-shadow: none; }
All these test where with the box shadow property of the image set to ‘No shadow’
I also tried them with the settings set to ‘outside’ and then it gets overwritten by the following code:
.avia-image-container.av-m4zpvax3-f7f87307d7c5ae1ae484872a008028bd img.avia_image { box-shadow: 0 0 1px 0; }
How can I get this to work?
-
This topic was modified 5 months, 4 weeks ago by
Dirk Messiaen. Reason: Code was not showing as code
-
This topic was modified 5 months, 4 weeks ago by
Dirk Messiaen.
December 11, 2024 at 7:50 pm #1473450Christy
ParticipantI’m having a huge SEO issue when using Enfold. On some of my pages Google Search Console is finding a mysterious noindex tag showing up. When I deactivate Enfold, it goes away.
The actual page https://aplusconstructionnow.com/residential-construction/
doesn’t really have a noindex but it does show up in Google Search Console as this:<!–
Debugging Info for Theme support:Theme: Enfold
Version: 5.7
Installed: enfold
AviaFramework Version: 5.6
AviaBuilder Version: 5.3
aviaElementManager Version: 1.0.1
ML:512-PU:69-PLA:0
WP:6.6.1
Compress: CSS:load minified only – JS:load minified only
Updates: disabled
PLAu:0
–>
<meta name=”robots” content=”noindex,indexifembedded” /></head><body id=”top” class=”page-template-default page page-id-482 stretched rtl_columns av-curtain-numeric barlow avia-responsive-images-support” itemscope=”itemscope” itemtype=”https://schema.org/WebPage”>
<div id=”wrap_all”>
<header id=”header” class=”all_colors header_color light_bg_color av_header_top av_logo_left av_main_nav_header av_menu_right av_custom av_header_sticky av_header_shrinking av_header_stretch_disabled av_mobile_menu_tablet av_header_searchicon_disabled av_header_unstick_top_disabled av_seperator_small_border av_minimal_header av_minimal_header_shadow av_bottom_nav_disabled ” data-av_shrink_factor=”25″ role=”banner” itemscope=”itemscope” itemtype=”https://schema.org/WPHeader”>
<div id=”header_main” class=”container_wrap container_wrap_logo”>
<div class=”
I have already gone into the “Search Engine Optimization Support” area and selected “Let SEO plugin set this tag” for the meta Tag “Robots”. (Because I have Yoast SEO plugin)
I have also tried adding the following to the functions.php based on a previous support string. https://kriesi.at/support/topic/noindex-when-enfold-is-enabled-2/
add_filter(‘avf_set_follow’,’avia_set_follow’);
function avia_set_follow(){
$meta = ‘<meta name=”robots” content=”index, follow” />’ . “\n”;
return $meta;
}PLEASE HELP!
December 4, 2024 at 11:20 am #1472889it is not only the double button – you can insert on caption for example this:
( just style it on the page bottom – copy that enfold button shortcode and insert it on captions field )[av_button label='Click me' icon_select='yes-right-icon' icon='ue82b' font='entypo-fontello' icon_hover='aviaTBicon_hover' title_attr='' button_type='' link='manually,#' link_dynamic='' link_target='' download_file='https://' attachment='' attachment_size='' downloaded_file_name='' size='large' position='center' label_display='' size-text='' av-desktop-font-size-text='' av-medium-font-size-text='' av-small-font-size-text='' av-mini-font-size-text='' margin='' margin_sync='true' padding='' padding_sync='true' av-desktop-margin='' av-desktop-margin_sync='true' av-desktop-padding='' av-desktop-padding_sync='true' av-medium-margin='' av-medium-margin_sync='true' av-medium-padding='' av-medium-padding_sync='true' av-small-margin='' av-small-margin_sync='true' av-small-padding='' av-small-padding_sync='true' av-mini-margin='' av-mini-margin_sync='true' av-mini-padding='' av-mini-padding_sync='true' color_options='' color='theme-color' custom_bg='#444444' custom_font='#ffffff' btn_color_bg='theme-color' btn_custom_grad_direction='vertical' btn_custom_grad_1='#000000' btn_custom_grad_2='#ffffff' btn_custom_grad_3='' btn_custom_grad_opacity='0.7' btn_custom_bg='#444444' btn_color_bg_hover='theme-color-highlight' btn_custom_bg_hover='#444444' btn_color_font='theme-color' btn_custom_font='#ffffff' btn_color_font_hover='white' btn_custom_font_hover='#ffffff' border='' border_width='' border_width_sync='true' border_color='' border_radius='' border_radius_sync='true' box_shadow='' box_shadow_style='0px,0px,0px,0px' box_shadow_color='' animation='' animation_duration='' animation_custom_bg_color='' animation_z_index_curtain='100' hover_opacity='' sonar_effect_effect='' sonar_effect_color='' sonar_effect_duration='1' sonar_effect_scale='' sonar_effect_opac='0.5' css_position='' css_position_location=',,,' css_position_z_index='' av-desktop-css_position='' av-desktop-css_position_location=',,,' av-desktop-css_position_z_index='' av-medium-css_position='' av-medium-css_position_location=',,,' av-medium-css_position_z_index='' av-small-css_position='' av-small-css_position_location=',,,' av-small-css_position_z_index='' av-mini-css_position='' av-mini-css_position_location=',,,' av-mini-css_position_z_index='' id='' custom_class='conversion' template_class='' element_template='' one_element_template='' av_uid='av-lu0tlroy' sc_version='1.0' admin_preview_bg='']
As you can see on that second image – not all of the code is needed. This is the main you need for a button – change size and position to your need and maybe remove icon_hover attribute. maybe set a custom class or ID. How to get the icon codes ? … ask.
[av_button label='your button label' icon_select='yes' icon='ue859' font='entypo-fontello' icon_hover='aviaTBicon_hover' link='manually,#' link_target='' size='medium' position='center' label_display='' title_attr='' color='light' custom_bg='' custom_font='' id='abc' custom_class='def']
November 30, 2024 at 9:28 pm #1472639Hey Marc,
I see that each of your cam images has a ID so this css will only target those images:@media only screen and (max-width: 767px) { #refresh1, #refresh2, #refresh3 { height: 100vh !important; } }
Another way would be to add a class to each code block, like “cam”
and then use this css:@media only screen and (max-width: 767px) { .avia_codeblock.cam img { height: 100vh !important; } }
The issue that I see is on mobile devices in portrait mode your images will be stretched unless you only what to see the center the image in portrait mode, in that case add this css with the above css:
@media only screen and (max-width: 767px) and (orientation: portrait) { .avia_codeblock.cam { height: 100vh !important; width: 400vw !important; left: -200% !important; position: relative; } }
add the css to your Quick css, it will only target these code blocks with the custom class “cam”.
Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.
After applying the css, please clear your browser cache and check.Best regards,
MikeNovember 27, 2024 at 5:29 am #1472326In reply to: automatic sizing of vertical images
Hi,
for example horizontal photos are visible in their entirety because they are automatically adapted to the screen,
Some images appear fully visible on mobile because their aspect ratio differs from the phone browser’s viewport. In portrait mode, the viewport is taller than most images with a landscape proportion, making them fully visible. Please note that images automatically adjust to occupy the space of their parent container. If you want to control how the images are resized and make them fully visible on certain screens with different aspect ratio, you need to apply a custom css class name to them and adjust their width or height manually. For example, you can set the image width to 50%, and the image will resize proportionally to its height.
@media only screen and (max-width: 1366px) { /* Add your Mobile Styles here */ .av-limit-image-height img.avia_image { width: 50%; margin: 0 auto; } }
Again, you need to apply the class name “av-limit-image-height” to the Image element. However, focusing on whether the images are fully visible on load may not be necessary, as users can still scroll to view the content.
Best regards,
IsmaelNovember 26, 2024 at 4:42 am #1472209In reply to: automatic sizing of vertical images
Hey!
Thank you for the inquiry.
We were not able to edit the settings because the account above is not an admin. This should work for the first image in the portfolio, but it might slightly distort the image:
.avia-image-container.av-m3m81k8l-37e2592474b1f3aa9f01e6b56eac1db5 img.avia_image { max-height: 600px; }
If you want to apply this to specific images, try adding a Custom CSS Class name (e.g., av-limit-image-height) in Advanced > Developer Settings, then replace the css code with this:
.av-limit-image-height img.avia_image { max-height: 600px; }
For more info about css class names, please check this link: https://kriesi.at/documentation/enfold/add-custom-css/#enable-custom-css-class-name-support
Regards,
IsmaelNovember 17, 2024 at 8:25 pm #1471511In reply to: Menu sur 3 niveau
Hey jccardaillac,
First ensure that your menu screen options css classes are enabled:
then add a new custom link menu item to the middle of your menu items and add the class menu-row-separator
then add this css to your Quick CSS in the theme options:@media only screen and (min-width: 768px) { .menu-row-separator { display: block; clear: both; height: 0; padding: 0; } #avia-menu > li, #avia-menu > li > a { height: 47px !important; line-height: 40px !important; } } .menu-row-separator a { display: none !important; line-height: 0; }
this is the expected results:
adjust the menu item heights to suit your header height.Best regards,
MikeSeptember 1, 2024 at 4:28 pm #1465998Hi,
Please note, on this page with the image behind the menu:
you are using a color section with a background image and the menu in the code block element:
but on the portfolio page you have a color section with a no background image and the menu in the code block element, and a slider below.
So adds a new challenge :( The solution seems to be to add the custom class section-with-menu-no-background and this css:.avia-section:not(.section-with-menu-no-background) { z-index: 0; } .avia-section.section-with-menu-no-background { z-index: 50; position: absolute; background: transparent; }
I did this for you, please check.
Best regards,
MikeAugust 28, 2024 at 5:26 pm #1465589Hi,
Thank you for your patience, I didn’t see an issue on the page that you linked to, but I found a another page with the issue, indead it was a z-index issue, so I added the custom class section-with-menu to the color section with the menu shortcode:
and added this css to your Quick CSS:.avia-section:not(.section-with-menu) { z-index: 0; } .avia-section.section-with-menu { z-index: 2; }
and this seems to have helped, please check the page below and try to make this adjustment to your other pages.
Best regards,
MikeJuly 28, 2024 at 2:20 pm #1463149Hi,
Thank you for your patience, as I review your request, I believe the only issue right now is switching to the built-in mobile menu before the custom menu becomes too large for the screen, so originally I have said to use the option <strong style=’color:#000′>Hide Header on this page but this also hides the mobile menu, so lets change this to <strong style=’color:#000′>Transparent Header
and hide the header with css:@media only screen and (min-width: 990px) { #header_main { display: none; } } @media only screen and (max-width: 989px) { .avia_codeblock > #header { display: none; } #menu-item-shop, .responsive.html_mobile_menu_tablet #top .av-logo-container .main_menu .social_bookmarks { display: none; } #av-burger-menu-ul .button.logo { display: none; } .logo a { display: flex; align-items: center; } #header_main { background-color: #000; } } @media only screen and (max-width: 989px) { .responsive #top #main {margin-top: -90px!important;} #top #wrap_all .av_header_transparency {background-color: transparent!important;} div#header_main > .container {display: block !important;} #top .av-burger-overlay li li .avia-bullet, #top .av-hamburger-inner,#top .av-hamburger-inner::before, #top .av-hamburger-inner::after { background-color: #fff !important; } .html_av-overlay-side-classic #top .av-burger-overlay li li .avia-bullet, .html_av-overlay-side.av-burger-overlay-active #top .av-hamburger-inner, .html_av-overlay-side.av-burger-overlay-active #top .av-hamburger-inner::before, .html_av-overlay-side.av-burger-overlay-active #top .av-hamburger-inner::after { background-color: #000 !important; } }
and for my example menu it breaks around 914px so setting the mobile menu to show at 990px in the theme setting will solve this, and I set the <strong style=’color:#000′>Alternate Menu For Mobile to the same menu we used for the shortcode:
So now at 990px and above it looks like this:
and below 989px the mobile menu shows like this:
and when the menu is open:
I believe this is what you are trying to achieve, I linked to my example page below for you to check.Best regards,
MikeJuly 15, 2024 at 3:50 pm #1462096In reply to: show marker in certain pictures in portfolio grid
Thank you.
I am a bit stumped. I thought it is a quite easy fix, but I run into problems.My idea is to first figure out how to get anything shown on top of the image. Lets say ‘Test’ and then when that works make it so that it only displays when the portfolio item has a certain attribute. But I am already struggling to get “test” to show up.
Here is the code I found to change:
$image = get_the_post_thumbnail( $the_id, $image_size, $image_attrs ); if( ! empty( $image ) ) { $output .= '<div class="av_table_col portfolio-grid-image">'; $output .= "<{$link_markup[0]} data-rel='grid-" . avia_post_grid::$grid . "' class='grid-image avia-hover-fx'>{$custom_overlay} {$image}</{$link_markup[1]}>"; $output .= '</div>'; } $output .= '<footer class="entry-footer"></footer>'; $output .= '</article>'; $output .= '</div>';
And here is the code I change it to:
$image = get_the_post_thumbnail($the_id, $image_size, $image_attrs); if (!empty($image)) { $output .= '<div class="av_table_col portfolio-grid-image">'; $output .= "<{$link_markup[0]} data-rel='grid-" . avia_post_grid::$grid . "' class='grid-image avia-hover-fx'>"; $output .= "{$custom_overlay} {$image}"; $output .= "<div class='overlay-text'>test</div>"; // Add this line for the overlay $output .= "</{$link_markup[1]}>"; $output .= '</div>'; } $output .= '<footer class="entry-footer"></footer>'; $output .= '</article>'; $output .= '</div>';
I also added the following passage to my style.css
.grid-image { position: relative; display: inline-block; } .grid-image img { display: block; width: 100%; height: auto; } .overlay-text { position: absolute; bottom: 10px; left: 10px; background-color: rgba(255, 255, 255, 0.7); color: #dada21; padding: 5px 10px; border-radius: 5px; font-size: 16px; font-weight: bold; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); }
Unfortunately I dont get the text to show up.
Where is my mistake?June 23, 2024 at 7:07 pm #1457369In reply to: Header button beside burner menu and search icon
Hi,
Thanks for the feedback, the issue is that the example link is using a normal menu and you are using a mobile burger menu for your desktop, these are two different menus.
Whe I checked your site I found no “Book Now” button so I created a new one for you, and added the required custom class menu-item-avia-special cta which was disabled on your site, and then I added this css:.html_burger_menu_active #header .avia-menu .menu-item-avia-special.cta { display: block !important; }
and Guenni007’s solution works great, thanks for sharing Guenni007!
you will need to adjust the button url as I didn’t know the like you wanted.Best regards,
MikeJune 22, 2024 at 6:31 pm #1455620In reply to: Fullwidth Submenu – Onepage Dotsmenu
Hey Daniela,
I recommend creating a dotsmenu as described in our documentation and create the simple custom menu in the element:
with the custom class dotsmenu:
then to use entypo-fontello icons, go to your icon element and hover over the icons that you want to use and the chrcode will show, always drop the first “U”, so the code that you will use for this screenshot will be \e804
Then use this css, at teh bottom you will see the six icons for the six menu items in my example, add more if you wish:#top .dotsmenu { background: transparent; position: fixed!important; right: 10px; top: 50%!important; transform: translateY(-50%); border: none!important; max-width: 30px!important; } #top .dotsmenu .av-subnav-menu > li { display: inline!important; margin: 10px !important; } #top .dotsmenu .av-subnav-menu li a { max-width: 40px; max-height:45px; border-radius:0; overflow:hidden; padding: 0 !important; border: none!important; background: transparent; } #top .dotsmenu .av-subnav-menu li a .avia-bullet { display: none !important; } #top .dotsmenu .av-subnav-menu li a .avia-menu-text { visibility: hidden; } @media only screen and (max-width: 767px) { .responsive #top .dotsmenu { background: transparent; position: fixed!important; right: 0; top: 50%!important; transform: translateY(-50%); }} #top .dotsmenu .av-subnav-menu li a:before { display: inline-block !important; font-size:30px; color: #fff; } #top .dotsmenu .av-subnav-menu li:nth-child(1) a:before { content: '\e804'; font-family: 'entypo-fontello'; } #top .dotsmenu .av-subnav-menu li:nth-child(2) a:before { content: '\e82a'; font-family: 'entypo-fontello'; } #top .dotsmenu .av-subnav-menu li:nth-child(3) a:before { content: '\e83d'; font-family: 'entypo-fontello'; } #top .dotsmenu .av-subnav-menu li:nth-child(4) a:before { content: '\e8b3'; font-family: 'entypo-fontello'; } #top .dotsmenu .av-subnav-menu li:nth-child(5) a:before { content: '\e8d2'; font-family: 'entypo-fontello'; } #top .dotsmenu .av-subnav-menu li:nth-child(6) a:before { content: '\e8b9'; font-family: 'entypo-fontello'; }
Best regards,
MikeMay 28, 2024 at 12:18 pm #1446833In reply to: Mobile images full size stretch
Hey divinecurio,
We can make some of your images fullwidth on mobile, to ensure that this only effects the images that you want please add a custom class to those images ▸ fullwidth-on-mobile, then add this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:@media only screen and (max-width: 767px) { .fullwidth-on-mobile .avia-image-overlay-wrap { width: 100vw !important; position: relative !important; left: calc(-50vw + 50%) !important; } }
Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.
After applying the css, please clear your browser cache and check.Best regards,
MikeMay 25, 2024 at 7:47 pm #1446070In reply to: Icon grid flip – close
Hey Julie,
Thank you for the link to your site, first I added the custom class click-to-close to your flipbox
Then I added this code to the end of your child theme functions.php file in Appearance ▸ Editor:function custom_click_to_close_flipbox_script() { ?> <script> jQuery(document).ready(function($) { $('.click-to-close .avia-icongrid-flipbox .av-icon-cell-item').hover( function() { var $flipback = $(this).find('.avia-icongrid-flipback'); // Check if the transform is rotateY(0deg) if ($flipback.css('transform') == 'matrix(1, 0, 0, 1, 0, 0)') { $(this).addClass('avia-hover'); console.log('avia-hover class added'); } } ); // Function to handle clicks outside the element $(document).on('click', function(event) { if (!$(event.target).closest('.click-to-close .avia-icongrid-flipbox .av-icon-cell-item').length) { $('.click-to-close .avia-icongrid-flipbox .av-icon-cell-item').removeClass('avia-hover'); console.log('avia-hover class removed'); } }); // Prevent clicks inside the element from triggering the document click handler $('.click-to-close .avia-icongrid-flipbox .av-icon-cell-item').on('click', function(event) { event.stopPropagation(); }); }); </script> <?php } add_action( 'wp_footer', 'custom_click_to_close_flipbox_script', 99 );
Now when you hover over the flipbox and it flips the class avia-hover is added to it so that it won’t flip back, until you click outside of the element, in which the class is removed.
please clear your browser cache and check.Best regards,
MikeMay 3, 2024 at 4:34 am #1442029In reply to: Image box shadow 2 sides only
Hey fanlokbun,
Thank you for the inquiry.
Yes, it’s possible, but there is no option for this by default, so you will have to specify the css modification manually. Add a custom css class name to the image element, such as “av-custom-image-shadow”, then add this css code.
.av-custom-image-shadow .avia_image { box-shadow: 10px 10px 10px 0; }
Best regards,
IsmaelMarch 25, 2024 at 7:18 pm #1438299Topic: Struggling to add custom css (it doesn’t work!)
in forum EnfoldTBant
ParticipantHI
I’m new to this type of stuff but I’ve tried to see what I’m doing wrong and completely stumped.
I have a color section and have added a background image.
I want to add background-size:cover; to the style.
I gave my color section the CSS ID section-container-width as per Enfold documentationcode below
I’ve also tried #section-container-width .avia-section { in case this worked and it didn’t.
My site is just on localhost so unfortunately I can’t share.
The code works when I use google inspect tool, find where ….png is reference on the background image and adding it there. But I want to be able to make a custom class like this and add in quick css but can’t seem to figure it out.
`/* Color section container width */
#section-container-width .container {
width: 100% !important;
min-width: 100%;
padding: 0 !important;
margin: 0 !important;
background-size: cover;
}#section-container-width .avia-section {
background-size: cover !important;
}Thanks
March 13, 2024 at 2:09 am #1437108In reply to: How to add a enfold icon to the menu link
Hi,
As I understand you would like to be able to add icons next to your main menu items, here is a easy was to add icons like this:
We will add this function to the end of your child theme functions.php file in Appearance ▸ Editor or if you are not using a child theme you could use the WP Code plugin then add a new snippet, in the top right corner use the PHP snippet as the code type:
then add this code and save:function enqueue_font_awesome() { wp_enqueue_style('font-awesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css'); } add_action('wp_enqueue_scripts', 'enqueue_font_awesome'); function add_icon_to_menu_item($item_output, $item, $depth, $args) { $custom_classes = implode(' ', $item->classes); preg_match('/menu-item-icon-([^ ]+)/', $custom_classes, $matches); if (!empty($matches[1])) { $icon_class = esc_attr($matches[1]); $icon = '<i class="fa ' . $icon_class . '"></i>'; $position = strpos($item_output, '<span class="avia-menu-text">'); if ($position !== false) { $item_output = substr_replace($item_output, $icon, $position, 0); } } return $item_output; } add_filter('walker_nav_menu_start_el', 'add_icon_to_menu_item', 10, 4);
Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.
Then add this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:#top #header li.menu-item > i ~ a { display: inline-block; } #top #header li.menu-item > i:before { color: #fff; } .av-main-nav li[class*="menu-item-icon-"] > a > i ~ .avia-menu-text { border-left-style: none; border-left-width: 0; padding-left: 13px; margin-left: -6px; } #av-burger-menu-ul li > a > i ~ .avia-menu-text { padding-left: 13px; margin-left: -6px; }
Please note that you may want to change the color, in this example I’m using white because my menu is dark.
Then go to your menus and ensure that the Custom Class field is enabled for your menu items:
If you don’t see it go to the Screen Options and enable it.
Now we will use the Font Awesome icons because it will be easier to use a class name to determine the icon used in the custom class field, the built-in entypo-fontello icons don’t use class names the same way so it would be a little trickier for you. The function adds the icon next to the menu item based on the class used in the menu item custom class field.
Use this format: menu-item-icon-fa-home the first part menu-item-icon- tells the function that a icon will be used, and then the Font Awesome icon code is appened to the class fa-home, for example:
these are the classes I used in this example:
menu-item-icon-fa-home
menu-item-icon-fa-star
menu-item-icon-fa-life-ring
menu-item-icon-fa-users
menu-item-icon-fa-phone
menu-item-icon-fa-bullhorn
This also works for the sub-menu items:
and the mobile menu:
Best regards,
MikeMarch 8, 2024 at 9:25 am #1436711In reply to: Delay an image animation
Hi,
Thank you for the update.
Looks like it is not possible to override the animation once it is specified. What you can do is disable the animation completely and apply a unique class name (av-custom-pop-up) to the Image element. Then add this css code to create your own animation.
.av-custom-pop-up { opacity: 0; transform: scale(0); animation: avia_image_appear_mod 0.5s cubic-bezier(0.175, 0.885, 0.320, 1.275) 3s forwards; } @keyframes avia_image_appear_mod { 0% { transform: scale(0); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
Best regards,
IsmaelFebruary 29, 2024 at 3:28 am #1435821In reply to: Full size hero images are Cropped
Hi Ismael,
I’d love to have CSS as a solution but I did something wrong or the CSS isn’t not working. I added the below to general styling Quick CSS then added photo to Custom CSS Class for the Color section. There’s no change. If I got this wrong please let me know.
1) What is v-145nae-c0b58b0338c14abb31641a8e3d686685 ? Is that specic to the Test page 2 photo? If we can get this to work, I’ll apply this solution to 4-5 other pages that have the similar min Color Section size + background image size issue..photo .avia-section.av-145nae-c0b58b0338c14abb31641a8e3d686685 {
background-position: top center;
background-position: 50% 30%;
}2) While testing, I discovered that this is an issue with screen size – The photo looks perfect on a phone and tablet, is truncated at the top by ~ 0.5 to 0.75 inches on my compact laptop screen, and truncated at both the top and bottom by 1-2 inches on my large 27 inch monitor. Any way to get around this? Please see screenshot links below.
February 23, 2024 at 8:37 am #1435166Hi,
Thank you for the inquiry.
As suggested above, you can apply a custom class name to the Accordion elements and re-initialize the lightbox script in order to group the items. Please edit all Accordion elements in the page, then go to the Advanced > Developer Settings. In the Custom CSS Class name field, place the value ‘accordion-lightbox-group’. After editing all Accordion elements, add this code in the functions.php file.
function ava_custom_script_group_lightbox() { ?> <script> (function($){ function g() { var accordion = $('.accordion-lightbox-group') accordion.each(function() { var srcList = []; var slider = $(this) slider.find('li a').each(function() { var src = $(this).attr('href'); var title = $(this).attr('title'); var alt = $(this).attr('alt'); srcList.push({ src: src, type: 'image', title: title, alt: alt }); }); slider.magnificPopup({ items: srcList, type: 'image', gallery: {enabled: true} }); }); } $(document).ready(function() { g(); }); })(jQuery); </script> <?php } add_action('wp_footer', 'ava_custom_script_group_lightbox');
If this doesn’t work as expected, try to edit the enfold/js/avia-snippet-lightbox.js, look for this code:
var alt = item.el.attr('alt'); if (typeof alt == "undefined") { alt = item.el.find('img').attr('alt'); } if (typeof alt != "undefined") { img.attr('alt', alt); }
Replace it with:
if (item.el) { var alt = item.el.attr('alt'); if (typeof alt == "undefined") { alt = item.el.find('img').attr('alt'); } if (typeof alt != "undefined") { img.attr('alt', alt); } }
Best regards,
Ismael -
This topic was modified 5 months, 4 weeks ago by
-
AuthorSearch Results
-
Search Results
-
Hi!
I was trying to create a custom layout containing a section with a dynamic background (Custom Field Image) value: {wp_custom_field:_thumbnail_id}
It works OK for one post, but background image is being cached and displayed for all other posts as well.
I dag into the av_section code to find that attribute is being rendered nicely, but the dynamic CSS class (avia-section.av-m8303wih-f038c6badb9db50289ff3c9a39d18731) that defines section background does not update.
A quick workaround for this scenario:
// Force bg for secion as it does not update when dynamic avia element is used // Enfold forces CSS bg, but it is cached and does not update for different posts // although it is calculated OK for secion atts add_filter('avf_sc_section_before_close', function($output, $atts) { if (!$atts['src_dynamic'] ?? false || !$atts['src'] ?? false) return $output; $style_attr = ' style="background-image: url('. esc_url($atts['src']) .') !important;"'; return substr_replace($output, $style_attr, 4, 0); }, 999, 2);
I’m trying to put the same border and shadow on the image as i put on the button below.
I’ve put a Lockable Custom CSS Class ‘blokje’ in the image as I want to save it as a template.
I’ve put custom CSS in the Quick CSS. The border works but the shadow doesn’t..blokje img { border: 1px solid #005999; padding: 40px; box-shadow: 1px 1px 0px 0px #005999; }
I’ve inspected the CSS result and the properties seem to get overwritten.
.avia-image-container.av-m4zpvax3-7f0e8c97aa55acf32e454c29d2832a05 img.avia_image { box-shadow: none; } .avia-image-container .avia_image, .avia-image-container .avia-image-overlay-wrap { transition: all 0.7s; } .blokje img { border: 1px solid #005999; padding: 40px; box-shadow: 1px 1px 0px 0px #005999; }
When I change the ‘none’ in the box-schadow to ‘1px 1px 0px 0px #005999’, I get the result I want.
I tried to put the following code in Quick CSS but no success:
.avia-image-container.av-m4zpvax3-7f0e8c97aa55acf32e454c29d2832a05 img.avia_image { box-shadow: none; }
All these test where with the box shadow property of the image set to ‘No shadow’
I also tried them with the settings set to ‘outside’ and then it gets overwritten by the following code:
.avia-image-container.av-m4zpvax3-f7f87307d7c5ae1ae484872a008028bd img.avia_image { box-shadow: 0 0 1px 0; }
How can I get this to work?
I’m having a huge SEO issue when using Enfold. On some of my pages Google Search Console is finding a mysterious noindex tag showing up. When I deactivate Enfold, it goes away.
The actual page https://aplusconstructionnow.com/residential-construction/
doesn’t really have a noindex but it does show up in Google Search Console as this:<!–
Debugging Info for Theme support:Theme: Enfold
Version: 5.7
Installed: enfold
AviaFramework Version: 5.6
AviaBuilder Version: 5.3
aviaElementManager Version: 1.0.1
ML:512-PU:69-PLA:0
WP:6.6.1
Compress: CSS:load minified only – JS:load minified only
Updates: disabled
PLAu:0
–>
<meta name=”robots” content=”noindex,indexifembedded” /></head><body id=”top” class=”page-template-default page page-id-482 stretched rtl_columns av-curtain-numeric barlow avia-responsive-images-support” itemscope=”itemscope” itemtype=”https://schema.org/WebPage”>
<div id=”wrap_all”>
<header id=”header” class=”all_colors header_color light_bg_color av_header_top av_logo_left av_main_nav_header av_menu_right av_custom av_header_sticky av_header_shrinking av_header_stretch_disabled av_mobile_menu_tablet av_header_searchicon_disabled av_header_unstick_top_disabled av_seperator_small_border av_minimal_header av_minimal_header_shadow av_bottom_nav_disabled ” data-av_shrink_factor=”25″ role=”banner” itemscope=”itemscope” itemtype=”https://schema.org/WPHeader”>
<div id=”header_main” class=”container_wrap container_wrap_logo”>
<div class=”
I have already gone into the “Search Engine Optimization Support” area and selected “Let SEO plugin set this tag” for the meta Tag “Robots”. (Because I have Yoast SEO plugin)
I have also tried adding the following to the functions.php based on a previous support string. https://kriesi.at/support/topic/noindex-when-enfold-is-enabled-2/
add_filter(‘avf_set_follow’,’avia_set_follow’);
function avia_set_follow(){
$meta = ‘<meta name=”robots” content=”index, follow” />’ . “\n”;
return $meta;
}PLEASE HELP!
HI
I’m new to this type of stuff but I’ve tried to see what I’m doing wrong and completely stumped.
I have a color section and have added a background image.
I want to add background-size:cover; to the style.
I gave my color section the CSS ID section-container-width as per Enfold documentationcode below
I’ve also tried #section-container-width .avia-section { in case this worked and it didn’t.
My site is just on localhost so unfortunately I can’t share.
The code works when I use google inspect tool, find where ….png is reference on the background image and adding it there. But I want to be able to make a custom class like this and add in quick css but can’t seem to figure it out.
`/* Color section container width */
#section-container-width .container {
width: 100% !important;
min-width: 100%;
padding: 0 !important;
margin: 0 !important;
background-size: cover;
}#section-container-width .avia-section {
background-size: cover !important;
}Thanks