我正在使用wp众筹插件,并尝试在过滤器中添加一些内容。这里是原始过滤器:
apply_filters(\'wpneo_crowdfunding_frontend_dashboard_menus\', array(
\'dashboard\' =>
array(
\'tab\' => \'dashboard\',
\'tab_name\' => __(\'Dashboard\',\'wp-crowdfunding\'),
\'load_form_file\' => WPNEO_CROWDFUNDING_DIR_PATH.\'includes/woocommerce/dashboard/dashboard.php\'
),
\'profile\' =>
array(
\'tab\' => \'account\',
\'tab_name\' => __(\'Profile\',\'wp-crowdfunding\'),
\'load_form_file\' => WPNEO_CROWDFUNDING_DIR_PATH.\'includes/woocommerce/dashboard/profile.php\'
),
\'contact\' =>
array(
\'tab\' => \'account\',
\'tab_name\' => __(\'Contact\',\'wp-crowdfunding\'),
\'load_form_file\' => WPNEO_CROWDFUNDING_DIR_PATH.\'includes/woocommerce/dashboard/contact.php\'
),
\'campaign\' =>
array(
\'tab\' => \'campaign\',
\'tab_name\' => __(\'My Campaigns\',\'wp-crowdfunding\'),
\'load_form_file\' => WPNEO_CROWDFUNDING_DIR_PATH.\'includes/woocommerce/dashboard/campaign.php\'
),
\'backed_campaigns\' =>
array(
\'tab\' => \'campaign\',
\'tab_name\' => __(\'Backed Campaigns\',\'wp-crowdfunding\'),
\'load_form_file\' => WPNEO_CROWDFUNDING_DIR_PATH.\'includes/woocommerce/dashboard/investment.php\'
),
\'pledges_received\' =>
array(
\'tab\' => \'campaign\',
\'tab_name\' => __(\'Pledges Received\',\'wp-crowdfunding\'),
\'load_form_file\' => WPNEO_CROWDFUNDING_DIR_PATH.\'includes/woocommerce/dashboard/order.php\'
),
\'bookmark\' =>
array(
\'tab\' => \'campaign\',
\'tab_name\' => __(\'Bookmarks\',\'wp-crowdfunding\'),
\'load_form_file\' => WPNEO_CROWDFUNDING_DIR_PATH.\'includes/woocommerce/dashboard/bookmark.php\'
),
\'password\' =>
array(
\'tab\' => \'account\',
\'tab_name\' => __(\'Password\',\'wp-crowdfunding\'),
\'load_form_file\' => WPNEO_CROWDFUNDING_DIR_PATH.\'includes/woocommerce/dashboard/password.php\'
),
\'rewards\' =>
array(
\'tab\' => \'account\',
\'tab_name\' => __(\'Rewards\',\'wp-crowdfunding\'),
\'load_form_file\' => WPNEO_CROWDFUNDING_DIR_PATH.\'includes/woocommerce/dashboard/rewards.php\'
),
));
我需要的是在末尾添加以下内容,我想是相同的过滤器:
\'myform\' =>
array(
\'tab\' => \'myform\',
\'tab_name\' => __(\'My Form\'),
\'load_form_file\' => MY_THEME_DIR.\'wpcrowdfunding/dashboard/myform.php\'
),
有可能吗?