@@ -80,6 +80,66 @@ function block_core_navigation_link_build_css_colors( $context, $attributes, $is
8080 return $ colors ;
8181}
8282
83+ /**
84+ * Build an array with CSS classes and inline styles defining the font sizes
85+ * which will be applied to the navigation markup in the front-end.
86+ *
87+ * This function is no longer used internally and is kept only for backward
88+ * compatibility with third-party code that may call it directly.
89+ *
90+ * @since 5.9.0
91+ * @deprecated 7.0.0
92+ *
93+ * @param array $context Navigation block context.
94+ * @return array Font size CSS classes and inline styles.
95+ */
96+ function block_core_navigation_link_build_css_font_sizes ( $ context ) {
97+ _deprecated_function ( __FUNCTION__ , '7.0.0 ' );
98+
99+ // CSS classes.
100+ $ font_sizes = array (
101+ 'css_classes ' => array (),
102+ 'inline_styles ' => '' ,
103+ );
104+
105+ $ has_named_font_size = array_key_exists ( 'fontSize ' , $ context );
106+ $ has_custom_font_size = isset ( $ context ['style ' ]['typography ' ]['fontSize ' ] );
107+
108+ if ( $ has_named_font_size ) {
109+ // Add the font size class.
110+ $ font_sizes ['css_classes ' ][] = sprintf ( 'has-%s-font-size ' , $ context ['fontSize ' ] );
111+ } elseif ( $ has_custom_font_size ) {
112+ // Add the custom font size inline style.
113+ $ font_sizes ['inline_styles ' ] = sprintf (
114+ 'font-size: %s; ' ,
115+ wp_get_typography_font_size_value (
116+ array (
117+ 'size ' => $ context ['style ' ]['typography ' ]['fontSize ' ],
118+ )
119+ )
120+ );
121+ }
122+
123+ return $ font_sizes ;
124+ }
125+
126+ /**
127+ * Returns the top-level submenu SVG chevron icon.
128+ *
129+ * @since 5.9.0
130+ * @deprecated 7.0.0 Use block_core_shared_navigation_render_submenu_icon() instead.
131+ *
132+ * @return string
133+ */
134+ function block_core_navigation_link_render_submenu_icon () {
135+ _deprecated_function (
136+ __FUNCTION__ ,
137+ '7.0.0 ' ,
138+ 'block_core_shared_navigation_render_submenu_icon() '
139+ );
140+ return block_core_shared_navigation_render_submenu_icon ();
141+ }
142+
83143/**
84144 * Decodes a url if it's encoded, returning the same url if not.
85145 *
0 commit comments