我能够创建一个新的菜单项" 特殊页面"用这个:
add_filter( 'woocommerce_account_menu_items' , 'kc_menu_panel_nav' );
function kc_menu_panel_nav() {
$items = array(
'dashboard' => __( 'Dashboard', 'woocommerce' ),
'orders' => __( 'Orders', 'woocommerce' ),
'downloads' => __( 'Downloads', 'woocommerce' ),
'edit-address' => __( 'Addresses', 'woocommerce' ),
'payment-methods' => __( 'Payment Methods', 'woocommerce' ),
'edit-account' => __( 'Account Details', 'woocommerce' ),
'special-page' => __( 'Special Page', 'woocommerce' ), // My custom tab here
'customer-logout' => __( 'Logout', 'woocommerce' ),
);
return $items;
}
重定向到my-account / special-page。如何为特殊页面链接创建自定义链接?
答案 0 :(得分:-1)
此处您的页面slug名称是必需的。
你的代码
inline int& funref() {
int a = 8;
int& refa = a;
return refa; // OK!
}
int main() {
int& refa = funref();
cout << refa;
}
这是你的页面slug名称例如
'special-page' =>