You rarely instance this class directly. The WPDK provides three classes for manage error, warning and status information feedback. Please check in wpdk-functions.php for is_wpdk_error() too.
Author: =undo= (info@wpxtre.me)
Inheritance: extends WP_Error
示例#1
0
 /**
  * Looks at the object and if a WPDKStatus class. Does not check to see if the parent is also WPDKStatus or a
  * WPDKResult, so can't inherit both the classes and still use this function.
  *
  * @brief      Check whether variable is a WPDK result status.
  *
  * @param mixed $thing Check if unknown variable is WPDKStatus object.
  *
  * @return bool TRUE, if WPDKStatus. FALSE, if not WPDKStatus.
  *
  * @deprecated Since 1.2.0 Use WPDKResult::isStatus() instead
  */
 function is_wpdk_status($thing)
 {
     _deprecated_function(__FUNCTION__, '1.2.0', 'WPDKResult::isStatus()');
     return WPDKResult::isWarning($thing);
 }
示例#2
0
 /**
  * Create an instance of WPDKError class
  *
  * @brief Construct
  *
  * @param string $code    Error code, ie. wpxss_to_many_files
  * @param string $message Error message
  * @param mixed  $data    Optional. Error data.
  *
  * @return WPDKStatus
  */
 public function __construct($code, $message = '', $data = '')
 {
     parent::__construct($code, WPDKResultType::STATUS, $message, $data);
 }