public function check_main_page(&$msg) { $msg = ''; $wpbdp = wpbdp(); if (!wpbdp_get_page_id('main')) { if (current_user_can('administrator') || current_user_can('activate_plugins')) { $msg = __('You need to create a page with the [businessdirectory] shortcode for the Business Directory plugin to work correctly.', 'WPBDM'); } else { $msg = __('The directory is temporarily disabled.', 'WPBDM'); } return false; } return true; }
public function __construct() { $this->admin = wpbdp()->admin; $this->api = wpbdp()->fees; }
<?php echo wpbusdirman_post_menu_button_submitlisting(); ?> <?php echo wpbusdirman_post_menu_button_viewlistings(); ?> </div> <div class="right"> <form id="wpbdmsearchform" action="<?php echo esc_url(home_url('/')); ?> " method="get"> <input id="intextbox" maxlength="150" name="s" size="20" type="text" value="" /> <input name="post_type" type="hidden" value="<?php echo wpbdp()->get_post_type(); ?> " /> <input id="wpbdmsearchsubmit" class="wpbdmsearchbutton" type="submit" value="<?php _ex('Search Listings', 'templates', 'WPBDM'); ?> " /> </form> </div> </div> <div id="wpbusdirmancats"> <div style="clear:both;"></div> <ul><?php print wpbusdirman_post_list_categories(); ?>
private function previewForm() { require_once WPBDP_PATH . 'core/view-submit-listing.php'; if (wpbdp()->has_module('featuredlevels')) { wpbdp_admin()->messages[] = _x('This is a preview of the form as it will appear during "Submit a Listing". The users may not see all fields from "Manage Form Fields" because you have "Featured Levels" active and this is showing the base level.', 'formfields-preview', 'WPBDM'); } $html = ''; $html .= wpbdp_admin_header(_x('Form Preview', 'form-fields admin', 'WPBDM'), 'formfields-preview', array(array(_x('← Return to "Manage Form Fields"', 'form-fields admin', 'WPBDM'), esc_url(remove_query_arg('action'))))); $html .= wpbdp_admin_notices(); $controller = new WPBDP_Submit_Listing_Page(0, true); $html .= $controller->preview_listing_fields_form(); $html .= wpbdp_admin_footer(); echo $html; }
function wpbdp_listing_upgrades_api() { return wpbdp()->listings->upgrades; }