option_name = $option_name; $this->get_settings_callback = $get_settings_callback; } /** * Current settings. * * @return array */ private function get_settings() { return call_user_func( $this->get_settings_callback ); } /** * General tab: intro. */ public function render_section_general() { echo '

' . esc_html__( 'Turn the hero slideshow output on or off site-wide. When disabled, shortcodes do not render on the front end.', 'aha-hero-slider' ) . '

'; } /** * General: global slideshow toggle. */ public function render_field_enable_slideshow() { $settings = $this->get_settings(); ?>

Regenerate Thumbnails' ); ?>

get_settings(); $enabled = ! empty( $settings['enable_custom_image_sizes'] ); ?>

' . esc_html__( 'Slides live in the Hero slides library; organize them with Slide groups. Use the buttons below to manage content. Autoplay, arrows, and corner radius saved here apply when the shortcode omits those attributes.', 'aha-hero-slider' ) . '

'; } /** * Quick admin actions shown below section intro. */ public function render_field_quick_actions() { $slides_url = admin_url( 'edit.php?post_type=' . AHA_HERO_SLIDER_CPT ); $groups_url = admin_url( 'edit-tags.php?taxonomy=' . AHA_HERO_SLIDER_TAXONOMY . '&post_type=' . AHA_HERO_SLIDER_CPT ); ?>

get_settings(); $val = isset( $settings['shortcode_autoplay_speed'] ) ? (int) $settings['shortcode_autoplay_speed'] : 5000; ?>

get_settings(); ?>

get_settings(); $value = isset( $settings['shortcode_border_radius'] ) ? absint( $settings['shortcode_border_radius'] ) : 0; ?> px

get_settings(); $value = isset( $settings[ $key ] ) ? (string) $settings[ $key ] : $default; $name = $this->option_name . '[' . $key . ']'; $dd = null !== $data_default_color ? $data_default_color : ( '' !== (string) $default ? (string) $default : '#ffffff' ); ?>
' . esc_html__( 'Optional colors for the autoplay progress bar or circle (when enabled via shortcode progress="bar" or progress="circle"). Leave empty to use built-in defaults (semi-transparent track; fill follows active bullet color). Shortcode attributes progress_track and progress_fill override these per instance.', 'aha-hero-slider' ) . '

'; } /** Design: Autoplay progress colors. */ public function render_field_design_progress() { ?>
render_color_swatch( 'color_progress_track', __( 'Progress track', 'aha-hero-slider' ), '', '#cccccc' ); $this->render_color_swatch( 'color_progress_fill', __( 'Progress fill', 'aha-hero-slider' ), '', '#ffffff' ); ?>
' . esc_html__( 'On mobile, the Default template shows the image on top and the text content below on a solid background. Set that background color here so your text remains readable.', 'aha-hero-slider' ) . '

'; } /** Design: Mobile content background color. */ public function render_field_design_mobile() { ?>
render_color_swatch( 'color_mobile_bg', __( 'Content area background', 'aha-hero-slider' ), '#efefef' ); ?>
' . esc_html__( 'Colors for slider arrows and pagination dots. Applied globally to all sliders.', 'aha-hero-slider' ) . '

'; } /** Design: Navigation colors. */ public function render_field_design_nav() { ?>
render_color_swatch( 'color_arrow', __( 'Arrow background', 'aha-hero-slider' ), '#ffffff' ); ?> render_color_swatch( 'color_arrow_icon', __( 'Arrow icon', 'aha-hero-slider' ), '#1a1a1a' ); ?> render_color_swatch( 'color_bullet', __( 'Bullet', 'aha-hero-slider' ), '#c7c7c7' ); ?> render_color_swatch( 'color_bullet_active', __( 'Bullet (active)', 'aha-hero-slider' ), '#ffffff' ); ?>
' . esc_html__( 'Semi-transparent color layer placed over the background image to improve text contrast. Applied globally to all sliders.', 'aha-hero-slider' ) . '

'; } /** Design: Overlay mask. */ public function render_field_design_overlay() { $settings = $this->get_settings(); $enabled = ! empty( $settings['overlay_enabled'] ); $opacity = isset( $settings['overlay_opacity'] ) ? (int) $settings['overlay_opacity'] : 40; $base_name = $this->option_name; ?>
render_color_swatch( 'overlay_color', __( 'Mask color', 'aha-hero-slider' ), '#000000' ); ?>
' . esc_html__( 'Default text colors. Overridden per slide if a custom color is set on the slide itself.', 'aha-hero-slider' ) . '

'; } /** Design: Text colors. */ public function render_field_design_texts() { ?>
render_color_swatch( 'color_badge', __( 'Badge', 'aha-hero-slider' ), '#ffffff' ); ?> render_color_swatch( 'color_headline', __( 'Headline', 'aha-hero-slider' ), '#ffffff' ); ?> render_color_swatch( 'color_subtitle', __( 'Subtitle', 'aha-hero-slider' ), '#ffffff' ); ?>
' . esc_html__( 'Default button styles. Overridden per slide if custom styles are set on the slide itself.', 'aha-hero-slider' ) . '

'; } /** Design: Primary button (desktop). */ public function render_field_design_btn1() { $settings = $this->get_settings(); $radius = isset( $settings['color_btn1_radius'] ) ? (string) $settings['color_btn1_radius'] : '12'; $base_name = $this->option_name; ?>
render_color_swatch( 'color_btn1_bg', __( 'Background', 'aha-hero-slider' ), '#d81e5b' ); ?> render_color_swatch( 'color_btn1_text', __( 'Text color', 'aha-hero-slider' ), '#ffffff' ); ?> render_color_swatch( 'color_btn1_border', __( 'Border color', 'aha-hero-slider' ), 'transparent' ); ?>
get_settings(); $radius = isset( $settings['color_btn1_radius_mobile'] ) ? (string) $settings['color_btn1_radius_mobile'] : ''; $base_name = $this->option_name; ?>

render_color_swatch( 'color_btn1_bg_mobile', __( 'Background', 'aha-hero-slider' ), '', '#d81e5b' ); ?> render_color_swatch( 'color_btn1_text_mobile', __( 'Text color', 'aha-hero-slider' ), '', '#ffffff' ); ?> render_color_swatch( 'color_btn1_border_mobile', __( 'Border color', 'aha-hero-slider' ), '', '#ffffff' ); ?>
get_settings(); $radius = isset( $settings['color_btn2_radius'] ) ? (string) $settings['color_btn2_radius'] : '12'; $base_name = $this->option_name; ?>
render_color_swatch( 'color_btn2_bg', __( 'Background', 'aha-hero-slider' ), 'transparent' ); ?> render_color_swatch( 'color_btn2_text', __( 'Text color', 'aha-hero-slider' ), '#ffffff' ); ?> render_color_swatch( 'color_btn2_border', __( 'Border color', 'aha-hero-slider' ), '#ffffff' ); ?>
get_settings(); $radius = isset( $settings['color_btn2_radius_mobile'] ) ? (string) $settings['color_btn2_radius_mobile'] : ''; $base_name = $this->option_name; ?>

render_color_swatch( 'color_btn2_bg_mobile', __( 'Background', 'aha-hero-slider' ), '', '#d81e5b' ); ?> render_color_swatch( 'color_btn2_text_mobile', __( 'Text color', 'aha-hero-slider' ), '', '#ffffff' ); ?> render_color_swatch( 'color_btn2_border_mobile', __( 'Border color', 'aha-hero-slider' ), '', '#ffffff' ); ?>