| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Old Sites/Engineering/V1/iimec/wp-content/themes/annotum-base/plugins/workflow/ |
Upload File : |
<?php
/**
*
* @param string $key option name to get
* @param mixed $default What to return if the given option is not set
* @return mixed
*/
function annowf_get_option($key, $default = false) {
$option = cfct_get_option('workflow_settings');
if (is_null($option[$key])) {
return $default;
}
else {
return $option[$key];
}
}
/**
* Helper function to determine if the workflow is enabled
*
* @param string $option Name of the workflow option to check. Defaults to workflow (entire workflow enabled/disabled)
* @return mixed true(1) if the workflow is enabled, false(null) otherwise
*/
function anno_workflow_enabled($option = null) {
if (empty($option)) {
$option = 'workflow';
}
return annowf_get_option($option);
}
function annowf_setup() {
if (anno_workflow_enabled()) {
// Used in generating save buttons and proccess state changes
global $anno_post_save;
$anno_post_save = array(
'approve' => _x('Approve', 'Publishing box action button text', 'anno'),
'publish' => _x('Publish', 'Publishing box action button text', 'anno'),
'reject' => _x('Reject', 'Publishing box action button text', 'anno'),
'review' => _x('Submit For Review', 'Publishing box action button text', 'anno'),
'revisions' => _x('Request Revisions', 'Publishing box action button text', 'anno'),
'clone' => _x('Clone', 'Publishing box action button text', 'anno'),
'revert' => _x('Revert To Draft', 'Publishing box action button text', 'anno'),
);
include_once(ANNO_PLUGIN_PATH.'/workflow/users.php');
include_once(ANNO_PLUGIN_PATH.'/workflow/workflow.php');
include_once(ANNO_PLUGIN_PATH.'/workflow/audit.php');
include_once(ANNO_PLUGIN_PATH.'/workflow/internal-comments/internal-comments.php');
include_once(ANNO_PLUGIN_PATH.'/workflow/publishing-meta-box.php');
include_once(ANNO_PLUGIN_PATH.'/workflow/notification.php');
}
}
add_action('after_setup_theme', 'annowf_setup');
?>