',
) );
}
add_action( 'widgets_init', 'appointpres_widgets_init' );
/* Make redify available for translation.*/
load_theme_textdomain( 'appointment', get_template_directory() . '/languages' );
/*Post date show*/
if ( ! function_exists( 'appointment_posted_on' ) ) :
function appointment_posted_on() {
printf( __( 'Posted by %7$son ', 'appointment' ),
esc_url( get_permalink() ),
esc_attr( get_the_time() ),
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
sprintf( esc_attr__( 'View all posts by %s', 'appointment' ), get_the_author() ),
esc_html( get_the_author() )
);
}
endif;
// code for comment
if ( ! function_exists( 'appointment_comment' ) ) :
/**
* Template for comments and pingbacks.
*
* To override this walker in a child theme without modifying the comments template
* simply create your own appointment(), and that function will be used instead.
*
* Used as a callback by wp_list_comments() for displaying the comments.
*
* @since appointment
*/
function appointment_comment( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
//get theme data
global $data;
//translations
$leave_reply = $data['translation_reply_to_coment'] ? $data['translation_reply_to_coment'] : __('Reply','appointment');
?>
0,
);
return apply_filters( 'appointment_option_defaults', $defaults );
}
add_action('after_setup_theme', 'appointment_setup');
if (!function_exists('appointment_setup')):
function appointment_setup() {
$appointment_options = get_option( 'appointment_theme_options' );
//print_r($appointment_options);
if( $appointment_options && isset( $_GET['activated'] ) ) {
// If front_page is not in theme option previously then set it.
if( !isset( $appointment_options['front_page'] )) {
// Get template of page which is set as static front page
$template = get_post_meta( get_option( 'page_on_front' ), '_wp_page_template', true );
// If static front page template is set to default then set front page toggle of theme option to 1
if( 'page' == get_option( 'show_on_front' ) && $template == 'default' ) {
$appointment_options['front_page'] = 0;
}
else {
$appointment_options['front_page'] = 1;
}
update_option( 'appointment_theme_options', $appointment_options );
}
}
}
endif;
?>