PATH:
home
/
letacommog
/
laindinois
/
wp-content
/
plugins
/
wiloke-listing-tools
/
app
/
MetaBoxes
<?php namespace WilokeListingTools\MetaBoxes; use WilokeListingTools\Framework\Helpers\GetSettings; class Promotion { protected $aPromotionPlans; public function __construct() { add_action('cmb2_admin_init', array($this, 'renderMetaboxFields')); } public function renderMetaboxFields(){ $aMetaBoxes = wilokeListingToolsRepository()->get('promotion-metaboxes'); $aPlanSettings = GetSettings::getPromotionPlans(); $aAdditionalFields = array(); if ( empty($aPlanSettings) ){ return false; } foreach ($aPlanSettings as $key => $aPlan){ $aAdditionalFields[] = array( 'type' => 'text_datetime_timestamp', 'id' => 'wilcity_promote_'.$key, 'name' => 'Position ' . $aPlan['name'] . ' Until' ); } $aMetaBoxes['promotion_information']['fields'] = array_merge($aMetaBoxes['promotion_information']['fields'], $aAdditionalFields); foreach ($aMetaBoxes as $aMetaBox){ new_cmb2_box($aMetaBox); } } }
[+]
..
[-] 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]