PluginProbe
Gutenberg / trunk
Gutenberg vtrunk
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
← All changes | build/scripts/block-library/navigation-link.php +9 -5 23.6.2 → trunk View file →
@@ -13,11 +13,11 @@
13 13 * which will be applied to the navigation markup in the front-end.
14 14 *
15 15 * @since 5.9.0
16 16 *
17 - * @param array $context Navigation block context.
18 - * @param array $attributes Block attributes.
19 - * @param bool $is_sub_menu Whether the link is part of a sub-menu. Default false.
17 + * @param array $context Navigation block context.
18 + * @param array $attributes Block attributes.
19 + * @param bool $is_sub_menu Whether the link is part of a sub-menu. Default false.
20 20 * @return array Colors CSS classes and inline styles.
21 21 */
22 22 function gutenberg_block_core_navigation_link_build_css_colors( $context, $attributes, $is_sub_menu = false ) {
23 23 $colors = array(
@@ -89,9 +89,9 @@
89 89 *
90 90 * @since 5.9.0
91 91 * @deprecated 7.0.0
92 92 *
93 - * @param array $context Navigation block context.
93 + * @param array $context Navigation block context.
94 94 * @return array Font size CSS classes and inline styles.
95 95 */
96 96 function gutenberg_block_core_navigation_link_build_css_font_sizes( $context ) {
97 97 _deprecated_function( __FUNCTION__, '7.0.0' );
@@ -149,8 +149,12 @@
149 149 *
150 150 * @return string $url Returns the decoded url.
151 151 */
152 152 function gutenberg_block_core_navigation_link_maybe_urldecode( $url ) {
153 + if ( ! is_string( $url ) ) {
154 + return '';
155 + }
156 +
153 157 $is_url_encoded = false;
154 158 $query = parse_url( $url, PHP_URL_QUERY );
155 159 $query_params = wp_parse_args( $query );
156 160
@@ -303,9 +307,9 @@
303 307 *
304 308 * @since 5.9.0
305 309 *
306 310 * @param WP_Taxonomy|WP_Post_Type $entity post type or taxonomy entity.
307 - * @param string $kind string of value 'taxonomy' or 'post-type'.
311 + * @param string $kind string of value 'taxonomy' or 'post-type'.
308 312 *
309 313 * @return array
310 314 */
311 315 function gutenberg_build_variation_for_navigation_link( $entity, $kind ) {