'compatibility/edd-custom.less',
);
return $stylesheets;
}
/**
* Add EDD cart micro widget in header theme options.
*
* @since 6.6.1
*
* @param array $elements Micro widgets array.
*
* @return array $elements Micro widgets array.
*/
public static function add_cart_micro_widget( $elements = array() ) {
$elements['edd_cart'] = array( 'title' => _x( 'EDD Cart', 'theme-options', 'the7mk2' ), 'class' => '' );
return $elements;
}
/**
* Add EDD cart micro widget options in header theme options.
*
* @since 6.6.1
*
* @param array $option_files Option files array.
*
* @return array $option_files Option files array.
*/
public static function add_cart_micro_widget_options( $option_files ) {
if ( array_key_exists( 'of-header-menu', $option_files ) ) {
$option_files['of-edd-mod-injected-header-options'] = dirname( __FILE__ ) . '/options-inject-in-header.php';
}
return $option_files;
}
public static function configure_cart_micro_widget_settings() {
$config = presscore_config();
$config->set( 'edd.mini_cart.caption', of_get_option( 'header-elements-edd_cart-caption' ) );
$config->set( 'edd.mini_cart.icon', of_get_option( 'header-elements-edd_cart-icon', true ) );
$config->set( 'edd.mini_cart.subtotal', of_get_option( 'header-elements-edd_cart-show_subtotal' ) );
$config->set( 'edd.mini_cart.counter', of_get_option( 'header-elements-edd_cart-show_counter', 'allways' ) );
$config->set( 'edd.mini_cart.counter.style', of_get_option( 'header-elements-edd_cart-counter-style', 'round' ) );
$config->set( 'edd.mini_cart.counter.bg', of_get_option( 'header-elements-edd_cart-counter-bg', 'accent' ) );
$config->set( 'edd.mini_cart.dropdown', of_get_option( 'header-elements-edd_cart-show_sub_cart' ) );
}
public static function cart_micro_widget_less_vars( The7_Less_Vars_Manager_Interface $less_vars ) {
$less_vars->add_hex_color( 'edd-product-counter-color', of_get_option( 'header-elements-edd_cart-counter-color' ) );
$less_vars->add_hex_color(
'edd-sub-cart-color',
of_get_option( 'header-elements-edd_cart-sub_cart-font-color' )
);
$less_vars->add_pixel_number(
'edd-sub-cart-width',
of_get_option( 'header-elements-edd_cart-sub_cart-bg-width' )
);
$less_vars->add_rgba_color(
'edd-sub-cart-bg',
of_get_option( 'header-elements-edd_cart-sub_cart-bg-color' )
);
$counter_color_vars = array( 'edd-product-counter-bg', 'edd-product-counter-bg-2' );
switch ( of_get_option( 'header-elements-edd_cart-counter-bg' ) ) {
case 'color':
$less_vars->add_rgba_color( $counter_color_vars, array(
of_get_option( 'header-elements-edd_cart-counter-bg-color' ),
null,
) );
break;
case 'gradient':
$gradient_obj = the7_less_create_gradient_obj( of_get_option( 'header-elements-edd_cart-counter-bg-gradient' ) );
$less_vars->add_rgba_color( $counter_color_vars[0], $gradient_obj->get_color_stop( 1 )->get_color() );
$less_vars->add_keyword( $counter_color_vars[1], $gradient_obj->with_angle( 'left' )->get_string() );
break;
case 'accent':
default:
list( $first_color, $gradient ) = the7_less_get_accent_colors( $less_vars );
$less_vars->add_rgba_color( $counter_color_vars[0], $first_color );
$less_vars->add_keyword( $counter_color_vars[1], $gradient->with_angle( 'left' )->get_string() );
}
$less_vars->add_pixel_number( 'mw-edd-cart-counter-size', of_get_option( 'header-elements-woocommerce_edd_cart-counter-size', 9 ) );
$less_vars->add_number( 'edd-cart-total-width', of_get_option( 'edd_cart_total_width' ) );
}
/**
* Render cart micro widget.
*
* @since 6.6.1
*/
public static function render_cart_micro_widget() {
self::configure_cart_micro_widget_settings();
$classes = presscore_esc_implode( ' ', presscore_get_mini_widget_class( 'header-elements-edd_cart' ) );
echo '
';
get_template_part( 'inc/mods/compatibility/edd/cart-micro-widget' );
echo '
';
}
public static function cart_micro_widget_ajax() {
self::configure_cart_micro_widget_settings();
get_template_part( 'inc/mods/compatibility/edd/cart-micro-widget' );
die();
}
}
The7_Compatibility_EDD::execute();
}
فبراير 8, 2025 – pixelsseo
Skip to content
تواجه مدينة الرياض تحديًا متزايدًا في الحفاظ على المياه، مع الأخذ في الاعتبار ندرة المياه وارتفاع تكاليفها. تُعد تسربات المياه من أكثر المشاكل التي تؤدي إلى هدر كميات كبيرة من المياه، مما يستدعي البحث عن حلول فعالة وسريعة. لحسن الحظ، شهد مجال كشف تسربات المياه تطورًا كبيرًا في السنوات الأخيرة، حيث ظهرت تقنيات حديثة ومتطورة…
Go to Top