Php $output内照片URL的Wp_Walker ACF变量

Php $output内照片URL的Wp_Walker ACF变量,php,wordpress,woocommerce,wordpress-theming,custom-wordpress-pages,Php,Wordpress,Woocommerce,Wordpress Theming,Custom Wordpress Pages,我为我的mega菜单制作了一个Wp_Walker函数,但我想知道如何将PHP变量用于图像URL(我使用ACF Pro),我的代码如下: class WP_Walker extends Walker_Nav_Menu { function start_lvl( &$output, $depth, $args = array() ) { if ( 0 == $depth ) { $indent = str_repeat("\t&q

我为我的mega菜单制作了一个Wp_Walker函数,但我想知道如何将PHP变量用于图像URL(我使用ACF Pro),我的代码如下:

class WP_Walker extends Walker_Nav_Menu
{


    function start_lvl( &$output, $depth, $args = array() ) {
        if ( 0 == $depth ) {
            $indent = str_repeat("\t", $depth);
            $output .= "\n$indent<ul class='sub-menu poziom-1'><div class='mega_lewa'>\n";
        }
        if ( 1 == $depth ) {
            $indent = str_repeat("\t", $depth);
            $output .= "\n$indent<ul class='sub-menu poziom-2'>\n";
        }
    }
    function end_lvl( &$output, $depth, $args = array() ) {
            if ( 0 == $depth ) {
                $indent = str_repeat("\t", $depth);
                $output .= "</div>
                
                <div class='mega_prawa'>
                    <a href='/blog'>
                    <div class='row'>
                        
                            <div class='mega_prawa_left col-7 my-auto text-center'>
                                <h2 class='naglowek'>SEE OUR<br>BLOG&NEWS<br>ZONE</h2>
                                <p class='desc small-desc'>Check more and stay tuned!</p>
                            </div>
                            <div class='mega_prawa_right col-5 my-auto'>
                                <img src='/wp-content/themes/my-theme/img/mega-img.png'>
                            </div>
                        
                    </div>
                    </a>
                </div>
                
            
                </ul>";
            }
            if ( 1 == $depth ) {
                $indent = str_repeat("\t", $depth);
                $output .= "$indent</ul>\n";
            }
        
    }
}
我不知道如何将PHP变量放入
$output
变量中

/wp-content/themes/my-theme/img/mega-img.png