@@ -48,7 +48,7 @@ public function get_keywords()
4848
4949 protected function register_controls ()
5050 {
51-
51+ // Content Section
5252 $ this ->start_controls_section (
5353 'section_breadcrumbs_content ' ,
5454 [
@@ -69,7 +69,6 @@ protected function register_controls()
6969 );
7070
7171 if (! class_exists ('\WPSEO_Breadcrumbs ' )) {
72-
7372 $ this ->add_control (
7473 'warning_text ' ,
7574 [
@@ -79,7 +78,8 @@ protected function register_controls()
7978 ]
8079 );
8180
82- $ this ->end_controls_section ();
81+ $ this ->end_controls_section (); // Ends section early if Yoast is not active
82+ return ; // Prevent further controls from being registered
8383 }
8484
8585 $ this ->add_responsive_control (
@@ -125,7 +125,6 @@ protected function register_controls()
125125 'html_description ' ,
126126 [
127127 'raw ' => sprintf (
128- /* translators: 1: Link opening tag, 2: Link closing tag. */
129128 esc_html__ ('Additional settings are available in the Yoast SEO %1$sBreadcrumbs Panel%2$s ' , 'animation-addons-for-elementor ' ),
130129 sprintf ('<a href="%s" target="_blank"> ' , admin_url ('admin.php?page=wpseo_titles#top#breadcrumbs ' )),
131130 '</a> '
@@ -138,11 +137,11 @@ protected function register_controls()
138137 $ this ->add_control (
139138 'br_separator ' ,
140139 [
141- 'label ' => esc_html__ ('Seprator Text ' , 'animation-addons-for-elementor ' ),
142- 'type ' => Controls_Manager::TEXT ,
143- 'default ' => ' » ' ,
144- 'placeholder ' => esc_html__ ('Seprator text ' , 'animation-addons-for-elementor ' ),
145- 'condition ' => [
140+ 'label ' => esc_html__ ('Separator Text ' , 'animation-addons-for-elementor ' ),
141+ 'type ' => Controls_Manager::TEXT ,
142+ 'default ' => ' » ' ,
143+ 'placeholder ' => esc_html__ ('Separator text ' , 'animation-addons-for-elementor ' ),
144+ 'condition ' => [
146145 'yoast_seo! ' => 'yes '
147146 ]
148147 ]
@@ -152,22 +151,22 @@ protected function register_controls()
152151 'sep_description ' ,
153152 [
154153 'raw ' => sprintf (
155- /* translators: 1: Link opening tag, 2: Link closing tag. */
156154 esc_html__ ('You can use HTML entities as separators. Check out %1$sHTML Symbols%2$s for examples. ' , 'animation-addons-for-elementor ' ),
157155 sprintf ('<a href="%s" target="_blank"> ' , 'https://www.toptal.com/designers/htmlarrows/symbols/ ' ),
158156 '</a> '
159157 ),
160158 'type ' => Controls_Manager::RAW_HTML ,
161159 'content_classes ' => 'elementor-descriptor ' ,
162- 'condition ' => [
160+ 'condition ' => [
163161 'yoast_seo! ' => 'yes '
164162 ]
165163 ]
166164 );
167165
166+ $ this ->end_controls_section (); // END CONTENT SECTION
168167
169- $ this ->end_controls_section ();
170168
169+ // Style Section
171170 $ this ->start_controls_section (
172171 'section_style ' ,
173172 [
@@ -201,6 +200,7 @@ protected function register_controls()
201200
202201 $ this ->start_controls_tabs ('tabs_breadcrumbs_style ' );
203202
203+ // Normal Tab
204204 $ this ->start_controls_tab (
205205 'tab_color_normal ' ,
206206 [
@@ -222,6 +222,7 @@ protected function register_controls()
222222
223223 $ this ->end_controls_tab ();
224224
225+ // Hover Tab
225226 $ this ->start_controls_tab (
226227 'tab_color_hover ' ,
227228 [
@@ -240,9 +241,15 @@ protected function register_controls()
240241 ]
241242 );
242243
243- $ this ->end_controls_section ();
244+ $ this ->end_controls_tab ();
245+
246+ // ✅ THIS WAS MISSING!
247+ $ this ->end_controls_tabs ();
248+
249+ $ this ->end_controls_section (); // END STYLE SECTION
244250 }
245251
252+
246253 private function get_html_tag ()
247254 {
248255 $ html_tag = $ this ->get_settings ('html_tag ' );
@@ -258,10 +265,12 @@ protected function render()
258265 {
259266 $ settings = $ this ->get_settings_for_display ();
260267 $ html_tag = $ this ->get_html_tag ();
261- if (class_exists ('\WPSEO_Breadcrumbs ' ) && $ settings ['yoast_seo ' ] == 'yes ' ) {
268+
269+ if (class_exists ('\WPSEO_Breadcrumbs ' ) && $ settings ['yoast_seo ' ] === 'yes ' ) {
262270 WPSEO_Breadcrumbs::breadcrumb ('< ' . $ html_tag . ' id="breadcrumbs"> ' , '</ ' . $ html_tag . '> ' );
263271 } else {
264- aae_addon_breadcrumbs ($ html_tag , $ settings ['br_separator ' ]);
272+ $ separator = isset ($ settings ['br_separator ' ]) ? $ settings ['br_separator ' ] : ' » ' ;
273+ aae_addon_breadcrumbs ($ html_tag , $ separator );
265274 }
266275 }
267276}
0 commit comments