. */ add_image_size( 'mini-thumbnail', 45, 45 ); // mini thumbnails add_image_size( 'medium-thumbnail', 95, 75 ); // medium thumbnails if ( ! function_exists( 'twentytencart_posted_on' ) ) : /** * Prints HTML with meta information for the current post—date/time and author. * * @since Twenty Ten 1.0 */ function twentytencart_posted_on() { printf( __( 'Posted on %2$s %3$s', 'twentyten' ), 'meta-prep meta-prep-author', sprintf( '%3$s', get_permalink(), esc_attr( get_the_time() ), get_the_date() ), sprintf( '', get_author_posts_url( get_the_author_meta( 'ID' ) ), sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ), get_the_author() ) ); } endif; if ( ! function_exists( 'twentytencart_posted_in' ) ) : /** * Prints HTML with meta information for the current post (category, tags and permalink). * * @since Twenty Ten 1.0 */ function twentytencart_posted_in() { // Retrieves tag list of current post, separated by commas. $tag_list = get_the_term_list(0, 'tcp_product_tag', '', ', '); $supplier_list = get_the_term_list(0, 'tcp_product_supplier', '', ', '); if ( $tag_list && $supplier_list ) { $posted_in = __( 'This entry was posted in %1$s and tagged %2$s and supplied by %3$s. Bookmark the permalink.', 'twentytencart' ); } elseif ( $tag_list ) { $posted_in = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the permalink.', 'twentyten' ); } elseif ( $supplier_list ) { $posted_in = __( 'This entry was posted in %1$s and supplied by %3$s. Bookmark the permalink.', 'twentytencart' ); } elseif ( is_object_in_taxonomy( get_post_type(), 'tcp_product_category' ) ) { $posted_in = __( 'This entry was posted in %1$s. Bookmark the permalink.', 'twentyten' ); } else { $posted_in = __( 'Bookmark the permalink.', 'twentyten' ); } // Prints the string, replacing the placeholders. printf( $posted_in, get_the_term_list(0, 'tcp_product_category', '', ' , '), $tag_list, $supplier_list, get_permalink(), the_title_attribute( 'echo=0' ) ); } endif; add_action( 'admin_menu', 'twentytencart_admin_menu', 99 ); add_action( 'admin_init', 'twentytencart_admin_init' ); add_action( 'twentyten_credits', 'twentytencart_credits' ); function twentytencart_admin_menu() { //add_options_page( __( 'TwentytenCart', 'tcp' ), __( 'TwentytenCart settings', 'tcp' ), 'tcp_edit_settings', 'themes', 'twentytencart_show_settings' ); add_submenu_page( 'themes.php', __( 'TCP Loop settings', 'tcp' ), __( 'TCP Loop settings', 'tcp' ), 'tcp_edit_settings', __FILE__, 'twentytencart_show_settings' ); } function twentytencart_admin_init() { register_setting( 'twentytencart_options', 'ttc_settings', 'twentytencart_validate' ); add_settings_section( 'main_section', __( 'Main settings', 'tcp' ) , 'twentytencart_show_main_section', __FILE__ ); add_settings_field( 'see_title', __( 'See title:', 'tcp' ), 'twentytencart_see_title', __FILE__ , 'main_section' ); add_settings_field( 'see_image', __( 'See image:', 'tcp' ), 'twentytencart_see_image', __FILE__ , 'main_section' ); add_settings_field( 'image_size', __( 'Image size:', 'tcp' ), 'twentytencart_image_size', __FILE__ , 'main_section' ); add_settings_field( 'see_excerpt', __( 'See excerpt:', 'tcp' ), 'twentytencart_see_excerpt', __FILE__ , 'main_section' ); add_settings_field( 'see_content', __( 'See content:', 'tcp' ), 'twentytencart_see_content', __FILE__ , 'main_section' ); add_settings_field( 'see_author', __( 'See author:', 'tcp' ), 'twentytencart_see_author', __FILE__ , 'main_section' ); add_settings_field( 'see_price', __( 'See price:', 'tcp' ), 'twentytencart_see_price', __FILE__ , 'main_section' ); add_settings_field( 'see_buy_button', __( 'See buy button:', 'tcp' ), 'twentytencart_see_buy_button', __FILE__ , 'main_section' ); add_settings_field( 'see_meta_data', __( 'See meta data:', 'tcp' ), 'twentytencart_see_meta_data', __FILE__ , 'main_section' ); add_settings_field( 'see_meta_utilities', __( 'See meta utilities:', 'tcp' ), 'twentytencart_see_meta_utilities', __FILE__ , 'main_section' ); add_settings_field( 'columns', __( 'Columns:', 'tcp' ), 'twentytencart_columns', __FILE__ , 'main_section' ); add_settings_field( 'see_first_custom_area', __( 'See first custom area', 'tcp' ), 'twentytencart_see_first_custom_area', __FILE__ , 'main_section' ); add_settings_field( 'see_second_custom_area', __( 'See second custom area', 'tcp' ), 'twentytencart_see_second_custom_area', __FILE__ , 'main_section' ); add_settings_field( 'see_third_custom_area', __( 'See third custom area', 'tcp' ), 'twentytencart_see_third_custom_area', __FILE__ , 'main_section' ); } function twentytencart_credits() { ?>