PATH:
home
/
letacommog
/
newrdv1
/
wp-content
/
plugins1
/
wilcity-shortcodes
/
app
/
ParseShortcodeAtts
<?php namespace WILCITY_SC\ParseShortcodeAtts; use Wilcity\Term\TermCount; use WilokeListingTools\Framework\Helpers\TermSetting; trait CountPostsInTerm { public function countPostsInTerm($oTerm) { if (!$oTerm instanceof \WP_Term) { return 0; } if (isset($this->aScAttributes['terms_in_sc'])) { $aTaxQuery = $this->aScAttributes['terms_in_sc']; } else { $aTaxQuery = []; } $aTaxQuery[$oTerm->taxonomy] = $oTerm->term_id; if ($this->aScAttributes['post_type'] === 'flexible') { $this->aScAttributes['post_type'] = TermSetting::getDefaultPostType($oTerm->term_id, $oTerm->taxonomy); } $aArgs = [ 'post_type' => $this->aScAttributes['post_type'], 'posts_per_page' => 1, 'post_status' => 'publish' ]; $oCount = new TermCount($aTaxQuery, $aArgs); return $oCount->count(); } }
[+]
..
[-] 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]