page_menu_link_attributes

page_menu_link_attributes

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.4.3

apply_filters('page_menu_link_attributes') is found 1 times:

  • /wp-includes/class-walker-page.php line 190
    		 * @param int     $depth           Depth of page, used for padding.
    		 * @param array   $args            An array of arguments.
    		 * @param int     $current_page_id ID of the current page.
    		 */
    		$atts = apply_filters( 'page_menu_link_attributes', $atts, $page, $depth, $args, $current_page_id );
    
    		$attributes = '';
    		foreach ( $atts as $attr => $value ) {
    			if ( is_scalar( $value ) && '' !== $value && false !== $value ) {
    				$value       = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value );
    				$attributes .= ' ' . $attr . '="' . $value . '"';