public function prepare_items() { $this->_column_headers = array($this->get_columns(), array(), $this->get_sortable_columns()); $api = wpbdp_fees_api(); $this->items = $api->get_fees(); }
/** * Finds fees available for one or more directory categories. * @param int|array $categories term ID or array of term IDs * @return object| * @since 3.0.3 */ function wpbdp_get_fees_for_category($categories = null) { $categories_ = is_array($categories) ? $categories : array($categories); $results = wpbdp_fees_api()->get_fees($categories_); return is_array($categories) ? $results : array_pop($results); }
foreach ($cat->subcategories as $subcat) { $html .= _wpbdp_render_category($subcat, $selected, $level + 1); } } return $html; } } ?> <?php echo wpbdp_admin_header(_x('Add Listing Fee', 'fees admin', 'WPBDM')); wpbdp_admin_notices(); ?> <?php $api = wpbdp_fees_api(); $post_values = isset($_POST['fee']) ? $_POST['fee'] : array(); $fee = isset($fee) ? $fee : null; ?> <form id="wpbdp-fee-form" action="" method="POST"> <?php if (isset($fee)) { ?> <input type="hidden" name="fee[id]" value="<?php echo $fee->id; ?> " /> <?php } ?>
function register_fees_strings() { if (isset($_GET['action']) || !function_exists('icl_register_string')) { return; } $fees = wpbdp_fees_api()->get_fees(); foreach ($fees as &$f) { icl_register_string('Business Directory Plugin', sprintf('Fee label (#%d)', $f->id), $f->label); } }