我正在使用WP Business Directory Manager插件,我遇到了一些问题。作为一名管理员,我一直想在我的目录中添加一个列表,但它显示为挂起,所以我查看了一下插件a,找到了在backoffice中更改它的方法,但它发布了每个列表。有没有办法让管理员在默认情况下发布他的列表
在listing.php
:
if ( !$data->listing_id && ( !$listing_cost || current_user_can( \'administrator\' ) ) ) {
wp_update_post( array( \'ID\' => $listing_id, \'post_status\' => wpbdp_get_option( \'new- post-status\' ) ) );
}
的设置new-post-status
:$this->add_setting($s, \'new-post-status\', _x(\'Default new post status\', \'admin settings\', \'WPBDM\'), \'choice\', \'pending\', \'\',
array(\'choices\' => array(\'publish\', \'pending\'))
);
非常感谢。