PATH:
home
/
letacommog
/
laindinois
/
wp-content
/
plugins
/
wiloke-listing-tools
/
app
/
Framework
/
Helpers
<?php namespace WilokeListingTools\Framework\Helpers; use WilokeListingTools\Frontend\User; class Validation { private static $cb; private static $jsonDecoded; public static function isUrl($url) { return filter_var($url, FILTER_VALIDATE_URL); } public static function isEmail($url) { return filter_var($url, FILTER_VALIDATE_EMAIL); } public static function isPostAuthor($postID, $isCheckEventAdmin = false) { if (!$isCheckEventAdmin) { if (User::can('administrator')) { return true; } } return $postID == User::getCurrentUserID(); } public static function deepValidation($input, $cb = 'sanitize_text_field') { if (!is_array($input)) { if (!empty(self::$cb)) { $cb = self::$cb; self::$cb = ""; } return $cb($input); } self::$cb = $cb; return array_map([__CLASS__, 'deepValidation'], $input); } public static function isValidJson($data, $decodeToArray = true) { self::$jsonDecoded = json_decode($data, $decodeToArray); if (json_last_error() !== JSON_ERROR_NONE) { self::$jsonDecoded = json_decode(stripslashes($data), $decodeToArray); return json_last_error() === JSON_ERROR_NONE; } return true; } public static function getJsonDecoded() { return self::$jsonDecoded; } }
[+]
..
[-] SearchFieldSkeleton.php
[edit]
[-] FileSystem.php
[edit]
[-] Response.php
[edit]
[-] GetWilokeSubmission.php
[edit]
[-] AbstractSkeleton.php
[edit]
[-] InheritCMB2Styles.php
[edit]
[-] ReviewSkeleton.php
[edit]
[-] RestaurantMenu.php
[edit]
[-] WooCommerce.php
[edit]
[-] MapHelpers.php
[edit]
[-] .DS_Store
[edit]
[-] Message.php
[edit]
[-] GetSettings.php
[edit]
[-] QueryHelper.php
[edit]
[+]
Collection
[-] Inc.php
[edit]
[-] UserSkeleton.php
[edit]
[-] Firebase.php
[edit]
[-] Repository.php
[edit]
[-] DebugStatus.php
[edit]
[-] MapFactory.php
[edit]
[-] SetSettings.php
[edit]
[-] AddListingFieldSkeleton.php
[edit]
[-] VideoHelper.php
[edit]
[-] SearchFormSkeleton.php
[edit]
[-] PostSkeleton.php
[edit]
[-] KCHelpers.php
[edit]
[-] ProductSkeleton.php
[edit]
[-] QRCodeGenerator.php
[edit]
[-] HTML.php
[edit]
[-] Time.php
[edit]
[-] PlanHelper.php
[edit]
[-] SemanticUi.php
[edit]
[-] AjaxMsg.php
[edit]
[-] Logger.php
[edit]
[-] Cookie.php
[edit]
[-] Validation.php
[edit]
[-] GalleryHelper.php
[edit]
[-] AuthorSkeleton.php
[edit]
[-] General.php
[edit]
[-] Submission.php
[edit]
[-] TermSetting.php
[edit]