/** * Theme default values * * @since 1.0 * * @return array default values */ function wpmedium_default() { $defaults = array('Basics' => array('description' => '<strong>WPMedium</strong>, a <em>nice</em> WordPress blog theme based on Medium.com, by <a href="http://www.caercam.org/">Charlie MERLAND</a>.', 'logo' => get_template_directory_uri() . '/img/WPMedium-logo-simple-32.png', 'post_thumbnail' => get_template_directory_uri() . '/img/wpmedium-post-thumbnail.jpg', 'copyright' => sprintf('© %s — <a href="%s">%s</a>', date('Y'), home_url(), get_bloginfo('name')), 'credit' => sprintf('%s <a href="http://wordpress.org">WordPress</a> — %s <a href="http://www.caercam.org/wpmedium">WPMedium</a> %s <a href="http://www.caercam.org/">CaerCam</a>', __('Proudly Powered By', 'wpmedium'), __('Theme', 'wpmedium'), __('By', 'wpmedium')), 'footer_display' => 'none'), 'Colors' => array('w_background' => array('color' => '#dfdfdf', 'label' => __('W Background Color', 'wpmedium')), 'text' => array('color' => '#1d1d1d', 'label' => __('Text Color', 'wpmedium')), 'header_overlay' => array('color' => '#000000', 'label' => __('Header Overlay Color', 'wpmedium')), 'header_sidebar' => array('color' => '#ffffff', 'label' => __('Header Sidebar Color', 'wpmedium')), 'header_title' => array('color' => '#444444', 'hover' => '#45568c', 'label' => __('Title Color', 'wpmedium'), 'label_hover' => __('Title Hover Color', 'wpmedium')), 'menu_background' => array('color' => '#424242', 'label' => __('Site Menu Background Color', 'wpmedium')), 'link' => array('color' => '#5765ad', 'hover' => '#45568c', 'label' => __('Link Color', 'wpmedium'), 'label_hover' => __('Link Hover Color', 'wpmedium')), 'footer' => array('color' => '#aaa', 'label' => __('Footer Text Color', 'wpmedium')), 'footer_background' => array('color' => '#d6d6d6', 'label' => __('Footer Background Color', 'wpmedium')), 'footer_widgettitle' => array('color' => '#424242', 'label' => __('Footer Titles Color', 'wpmedium'))), 'Images' => array('logo' => array('url' => wpmedium_o('logo'), 'label' => __('Logo', 'wpmedium')), 'w' => array('url' => wpmedium_o('w'), 'label' => __('W Image', 'wpmedium')), 'post_thumbnail' => array('url' => wpmedium_o('default_post_thumbnail'), 'label' => __('Default Post Thumbnail', 'wpmedium')))); return $defaults; }
<?php $class = ''; if (is_sticky() && !is_paged()) { $class .= 'sticky'; } if (!has_post_thumbnail() && !wpmedium_o('use_post_thumbnail')) { $class .= ' no-thumbnail'; } ?> <article id="post-<?php the_ID(); ?> " <?php post_class($class); ?> > <header class="entry-header"> <div class="entry-header-image"> <a href="<?php the_permalink(); ?> " title="<?php the_title(); ?> "><?php wpmedium_the_post_thumbnail(null, 'medium-featured-image'); ?> </a> </div>