<?php defined('ABSPATH') or die; $basepath = dirname(__FILE__) . DIRECTORY_SEPARATOR; $debug = false; if (isset($_GET['debug']) && $_GET['debug'] == 'true') { $debug = true; } $debug = true; $customify_config = (require $basepath . 'customify_config.php'); return array('plugin-name' => 'pixcustomify', 'settings-key' => 'pixcustomify_settings', 'textdomain' => 'pixcustomify_txtd', 'template-paths' => array($basepath . 'core/views/form-partials/', $basepath . 'views/form-partials/'), 'fields' => array('hiddens' => include 'settings/hiddens' . EXT, 'general' => include 'settings/general' . EXT, 'output' => include 'settings/output' . EXT, 'typography' => include 'settings/typography' . EXT, 'css_editor' => include 'settings/css_editor' . EXT), 'processor' => array('preupdate' => array()), 'cleanup' => array('switch' => array('switch_not_available')), 'checks' => array('counter' => array('is_numeric', 'not_empty')), 'errors' => array('not_empty' => __('Invalid Value.', pixcustomify::textdomain())), 'debug' => $debug, 'default_options' => array()); # config
/** * Sets a custom text domain; if null is passed the text domain will revert * to the default text domain. */ static function settextdomain($textdomain) { if (!empty($textdomain)) { self::$textdomain = $textdomain; } else { // null or otherwise empty value // revert to default self::$textdomain = 'pixcustomify_txtd'; } }
<?php return array('cleanup' => array('switch' => array('switch_not_available')), 'checks' => array('counter' => array('is_numeric', 'not_empty')), 'processor' => array('preupdate' => array(), 'postupdate' => array()), 'errors' => array('is_numeric' => __('Numberic value required.', pixcustomify::textdomain()), 'not_empty' => __('Field is required.', pixcustomify::textdomain())), 'callbacks' => array('switch_not_available' => 'pixcustomify_cleanup_switch_not_available', 'is_numeric' => 'pixcustomify_validate_is_numeric', 'not_empty' => 'pixcustomify_validate_not_empty')); # config