ID, '_slider', true);
if($slider=='yes')
$slider_ck = ' checked="checked"';
else
$slider_ck = '';
// The actual fields for data entry
echo ' ';
echo '';
}
/* When the post is saved, saves our custom data */
function sienna_save_postdata( $post_id ) {
// verify this came from the our screen and with proper authorization,
// because save_post can be triggered at other times
if ( !wp_verify_nonce( $_POST['sienna_noncename'], plugin_basename(__FILE__) )) {
return $post_id;
}
// verify if this is an auto save routine. If it is our form has not been submitted, so we dont want
// to do anything
if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE )
return $post_id;
// Check permissions
if ( 'page' == $_POST['post_type'] ) {
if ( !current_user_can( 'edit_page', $post_id ) )
return $post_id;
} else {
if ( !current_user_can( 'edit_post', $post_id ) )
return $post_id;
}
// OK, we're authenticated: we need to find and save the data
$_slider = $_POST['_slider'];
esc_attr( $_slider );
update_post_meta($post_id, '_slider', $_slider);
// Do something with $mydata
// probably using add_post_meta(), update_post_meta(), or
// a custom table (see Further Reading section below)
return $mydata;
}
add_filter( 'the_content_more_link', 'sienna_more_link', 10, 2 );
function sienna_more_link( $more_link, $more_link_text ) {
return '
'.$more_link;
}
add_filter('the_title','sienna_has_title');
function sienna_has_title($title){
global $post;
if($title == ''){
return get_the_time(get_option( 'date_format' ));
}else{
return $title;
}
}
?>