*/ /** * wrapper to template hack for archive-aml_review * * @param string found template * @return string path to template */ function aml_review_archive_template ($template) { return aml_insert_template ($template, 'aml_review', 'archive'); } /** * wrapper to template hack for single-aml_review * * @param string found template * @return string path to template */ function aml_review_single_template ($template) { return aml_insert_template ($template, 'aml_review', 'single'); } /** * wrapper to template hack for taxonomy-aml_tag * * @param string found template * @return string path to template */ function aml_tags_taxonomy_template ($template) { return aml_insert_template ($template, 'aml_tag', 'taxonomy'); } // Also not finished and subject to change /** * Retrieve the time at which the specified event occured * * @param string $d Optional, default is 'U'. Either 'G', 'U', or php date format. * @param string $which Optional, default is added to shelf. The meta timestamp to get * @param bool $translate Optional, default is false. Whether to translate the result * @return string Returns timestamp */ function get_review_custom_time ($d='U', $which='aml_added', $translate=true) { $post = get_post(); $which_time = get_post_meta($post->ID, $which, true); $time = mysql2date($d, $which_time, $translate); return apply_filters('get_post_modified_time', $time, $d); } /** * Retrieve the time at which the specified event occured * * @param string $d Optional Either 'G', 'U', or php date format defaults to the value specified in the time_format option. * @param string $which Optional, default is added to shelf. The meta timestamp to get * @return string */ function get_the_review_custom_time ($d='', $which='aml_added') { if ( '' == $d ) $the_time = get_review_custom_time(get_option('time_format'), $which); else $the_time = get_review_custom_time($d, $which); return apply_filters('get_the_modified_time', $the_time, $d); } /** * Display the time at which the specified event occured * * @param string $d Optional Either 'G', 'U', or php date format defaults to the value specified in the time_format option. * @param string $which Optional, default is added to shelf. The meta timestamp to get */ function the_review_custom_time ($d='', $which='aml_added') { echo apply_filters('the_modified_time', get_the_review_custom_time($d, $which), $d); } /** * Retrieve the date on which the specified event occured * * @param string $d Optional. PHP date format. Defaults to the "date_format" option * @param string $which Optional, default is added to shelf. The meta timestamp to get * @return string */ function get_the_review_custom_date ($d='', $which='aml_added') { if ( '' == $d ) $the_time = get_the_review_custom_time(get_option('date_format'), $which); else $the_time = get_the_review_custom_time($d, $which); return apply_filters('get_the_modified_date', $the_time, $d); } /** * Display the date on which the specified event occured * * @param string $d Optional. PHP date format defaults to the date_format option if not specified. * @param string $which Optional, default is added to shelf. The meta timestamp to get * @param string $before Optional. Output before the date. * @param string $after Optional. Output after the date. * @param bool $echo Optional, default is display. Whether to echo the date or return it. * @return string|null Null if displaying, string if retrieving. */ function the_review_custom_date ($d='', $which='aml_added', $before='', $after='', $echo=true) { $the_modified_date = $before . get_the_review_custom_date($d, $which) . $after; $the_modified_date = apply_filters('the_modified_date', $the_modified_date, $d, $before, $after); if ( $echo ) echo $the_modified_date; else return $the_modified_date; } /** * Display post submit form fields. * * @since 2.7.0 * * @param object $post */ function aml_pubdel_box($post) { ?>
ID ) ) { if ( !EMPTY_TRASH_DAYS ) { $delete_text = __('Delete Permanently'); } else { $delete_text = __('Move to Trash'); } ?>
ID) { ?> '5', 'accesskey' => 'p' ) ); } else { ?>
post_status]['label']); ?>
%1$s'); $date = date_i18n($datef, strtotime($time)); ?>
:
\n"; for ( $i = 1; $i < 13; $i = $i +1 ) { $month .= "\t\t\t" . '\n"; } $month .= ''; $day = ''; $year = ''; $hour = ''; $minute = ''; $ret = '
'; $ret .= sprintf(__('%1$s%2$s, %3$s @ %4$s : %5$s'), $month, $day, $year, $hour, $minute); $ret .= '
'; $ret .= "\n\n"; foreach ( array('mm', 'jj', 'aa', 'hh', 'mn') as $timeunit ) { $ret .= '' . "\n"; $cur_timeunit = 'cur_' . $timeunit; $ret .= '' . "\n"; } $ret .= '

'; $ret .= '' . __('OK') . ''; $ret .= '' . __('Cancel') . ''; $ret .= '

'; if (!$echo) { return $ret; } echo $ret; } function review_stars ($check='', $readonly=false, $split=true) { $values = ($split) ? array('0.5', '1', '1.5', '2', '2.5', '3', '3.5', '4', '4.5', '5') : array('1', '2', '3', '4', '5'); $disabled = disabled($readonly, true, false); $split = ($split) ? ' {split:2}' : ''; echo '
'; foreach ($values as $val) { $checked = checked($check, $val, false); echo ''; } echo '


'; } ?>