PATH:
home
/
letacommog
/
laindinois
/
wp-content
/
plugins
/
wiloke-listing-tools
/
app
/
MetaBoxes
<?php namespace WilokeListingTools\MetaBoxes; use WilokeListingTools\Framework\Helpers\General; use WilokeListingTools\Framework\Helpers\GetSettings; class Report { public function __construct() { add_action('cmb2_admin_init', [$this, 'renderMetaboxFields']); } public function renderMetaboxFields() { $aReports = wilokeListingToolsRepository()->get('report'); $aAdditionalFields = GetSettings::getOptions('report_fields'); if (!empty($aAdditionalFields)) { foreach ($aAdditionalFields as $aField) { if ($aField['key'] === 'content') { continue; } switch ($aField['type']) { case 'text': $aReports['report_information']['fields'][] = [ 'type' => 'text', 'id' => 'wilcity_'.$aField['key'], 'name' => $aField['label'] ]; break; case 'textarea': $aReports['report_information']['fields'][] = [ 'type' => 'textarea', 'id' => 'wilcity_'.$aField['key'], 'name' => $aField['label'] ]; break; case 'select': if (!empty($aField['options'])) { $aSelectField = [ 'type' => 'select', 'id' => 'wilcity_'.$aField['key'], 'name' => $aField['label'] ]; $aSelectField['options'] = General::parseSelectFieldOptions($aField['options']); $aReports['report_information']['fields'][] = $aSelectField; } break; } } } new_cmb2_box($aReports['report_information']); new_cmb2_box($aReports['report_my_note']); } }
[+]
..
[-] ListingLocation.php
[edit]
[-] ListingCustomTaxonomy.php
[edit]
[-] Review.php
[edit]
[-] CustomFieldTools.php
[edit]
[-] Listing.php
[edit]
[+]
assets
[-] BookingComBannerCreator.php
[edit]
[-] Promotion.php
[edit]
[-] EventPlan.php
[edit]
[-] ListingPlan.php
[edit]
[-] Coupon.php
[edit]
[-] Post.php
[edit]
[-] CMB2PostSearchField.php
[edit]
[-] Report.php
[edit]
[-] CustomCMB2Fields.php
[edit]
[-] UserMeta.php
[edit]
[-] ListingCategory.php
[edit]
[-] CustomFieldsForPostType.php
[edit]
[-] EventComment.php
[edit]
[-] ListingTag.php
[edit]
[-] WooCommerce.php
[edit]
[-] ClaimListing.php
[edit]
[-] Event.php
[edit]
[-] Discount.php
[edit]