2

This is not possible, require is a PHP language construct, it's not a WordPress function, and can't be filtered or overriden via WordPress APIs These are your options: If the functionality you want to remove is implemented via actions and filters then: Unhook the things you don't want from that file Add new hooks that happen after them that attempt to ...


2

Use wp_get_attachment_image_src to get the image properties and URL: $logo = get_theme_mod( 'custom_logo' ); $image = wp_get_attachment_image_src( $logo , 'full' ); $image_url = $image[0]; $image_width = $image[1]; $image_height = $image[2]; Edit: Adding more information based on your comment. The URL it points to is simply made with home_url: esc_url( ...


1

There is indeed a filter, walker_nav_menu_start_el will be able to handle it for you! Take this code for example: function wpse356896_filter_primary_nav_menu_dropdown( $item_output, $item, $depth, $args ) { // Only for our primary menu location. if ( empty( $args->theme_location ) || 'primary-menu' !== $args->theme_location ) { ...


Only top voted, non community-wiki answers of a minimum length are eligible