PATH:
home
/
letacommog
/
newrdv1
/
wp-content
/
plugins1
/
wilcity-shortcodes
/
app
/
ParseShortcodeAtts
<?php namespace WILCITY_SC\ParseShortcodeAtts; use WilokeListingTools\Framework\Helpers\General; use WilokeListingTools\Framework\Helpers\TermSetting; trait ParsePostType { private function parsePostType() { if (!isset($this->aScAttributes['post_type'])) { return false; } if ( (isset($this->aScAttributes['isRequiredPostType']) && $this->aScAttributes['isRequiredPostType'] === 'yes') || ($this->aScAttributes['post_type'] === 'flexible') ) { if (is_tax()) { if ($this->aScAttributes['post_type'] !== 'flexible') { // Customer is using Term Group shortcode but the term box is not using current taxonomy. // EG: Customer is using Listing Category on Listing Location page if (isset($this->aScAttributes['taxonomy']) && $this->aScAttributes['taxonomy'] !== get_queried_object()->taxonomy) { return true; } } $postType = TermSetting::getDefaultPostType(get_queried_object_id(), get_queried_object()->taxonomy); if (empty($postType)) { $postType = General::getFirstPostTypeKey(false, true); } $this->aScAttributes['post_type'] = $postType; } } return true; } }
[+]
..
[-] MergeIsAppRenderingAtts.php
[edit]
[-] CountPostsInTerm.php
[edit]
[-] .ParseShortcodeAtts.php
[edit]
[-] ParseImageSize.php
[edit]
[-] ParsePostType.php
[edit]
[-] ParseTermArgs.php
[edit]
[-] BuildTermQueryArgs.php
[edit]
[-] GetPostsInTerm.php
[edit]
[-] ParseColumnClasses.php
[edit]
[-] ParseTermsInSc.php
[edit]
[-] ParseTermLink.php
[edit]
[-] PrepareHeading.php
[edit]
[-] ParseShortcodeAtts.php
[edit]