displayFrameworkError() публичный статический Метод

Displays an error notice
С версии: 1.0
public static displayFrameworkError ( string $message, array | object $errorObject = null ) : void
$message string The error message to display.
$errorObject array | object The object to dump inside the error message.
Результат void
 /**
  * Constructor
  *
  * @since	1.4
  */
 function __construct($settings, $owner)
 {
     if (defined('WP_DEBUG')) {
         if (WP_DEBUG == true) {
             // Warn about deprecation, refer to `font` option
             TitanFramework::displayFrameworkError(sprintf(__('%s has been deprecated and will be removed in version %s! Please use %s instead to avoid errors in the future.', TF_I18NDOMAIN), '<code>select-googlefont</code>', '<code>1.5</code>', '<code>font</code>'));
         }
     }
     parent::__construct($settings, $owner);
     add_filter('tf_generate_css_select-googlefont_' . $this->getOptionNamespace(), array($this, 'generateCSS'), 10, 2);
 }
Пример #2
0
 public static function factory($settings, $owner)
 {
     $settings = array_merge(self::$defaultSettings, $settings);
     $className = 'TitanFrameworkOption' . str_replace(' ', '', ucwords(str_replace('-', ' ', $settings['type'])));
     // assume all the classes are already required
     if (!class_exists($className) && !class_exists($settings['type'])) {
         TitanFramework::displayFrameworkError(sprintf(__('Option type or extended class %s does not exist.', 'gossip'), '<code>' . $settings['type'] . '</code>', $settings), $settings);
         return null;
     }
     if (class_exists($className)) {
         $obj = new $className($settings, $owner);
         return $obj;
     }
     $className = $settings['type'];
     $obj = new $className($settings, $owner);
     return $obj;
 }