_settings = $settings;
}
$call = $options['type'];
$this->$call($options, $saved);
}
private function header( $opt ){
?>
$value){
if(is_array($value)){
foreach($value as $k => $i){
if(strpos($k, 'athena_profile') !== false && ($post_id = strrchr($k, '_')) !== false){
$post_id = substr($post_id, 1);
$profiles[$key] = get_post( $post_id );
}
if(strpos($k, 'athena_post') !== false && ($post_id = strrchr($k, '_')) !== false){
$post_id = substr($post_id, 1);
$posts[$key] = get_post( $post_id );
}
}//end array foreach loop
}//end check if value is an array
}//end of foreach look
if(!empty($profiles) || !empty($posts)){
if(!empty($profiles)){
echo '
Profile Scheduled
';
ksort($profiles, SORT_NUMERIC);
foreach($profiles as $t => $v){
$date = new DateTime();
$date->setTimestamp($t);
$timezone = get_option('timezone_string');
$timezone = !empty($timezone) ? $timezone : get_option('gmt_offset');
date_timezone_set($date, timezone_open($timezone));
echo '
' . $v->post_title . '
';
echo 'Runs: '. date_format($date, $this->_settings['date_time_format']);
}
}
if(!empty($posts)){
echo '
Posts Scheduled
';
ksort($posts, SORT_NUMERIC);
foreach($posts as $t => $v){
$date = new DateTime();
$date->setTimestamp($t);
$timezone = get_option('timezone_string');
$alt_timezone = get_option('gmt_offset');
if(empty($timezone)){
if(!empty($alt_timezone)){
$timezone = $alt_timezone;
}else{
$timezone = date_default_timezone_get();
}
}
date_timezone_set($date, timezone_open($timezone));
echo '
' . $v->post_title . '
';
echo 'Runs: '. date_format($date, $this->_settings['date_time_format']);
}
}
}else{
echo '
There are no expirations scheduled
';
}
?>
'athenaprofile',
'posts_per_page' => -1,
'meta_key' => '_post_expiration_timestamp',
'meta_value' => current_time('timestamp', 1),
'meta_compare' => '>'
);
$profiles = get_posts( $args );
?>
Enable >
Profile
Or
_settings['future_date_'.$post_type]['count'];
$type = athena_date_time( $count );
$time_string = strtotime('+'.$count . ' ' .$type[$this->_settings['future_date_'.$post_type]['type']]);
?>
';
return;
}else{
echo '';
return;
}
}
private function onChange( $opt ){
?>