Skip to content

Commit

Permalink
Merge pull request #4 from FameThemes/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
shrimp2t committed Feb 23, 2016
2 parents 7ec9e80 + 1172f8d commit 63eacfa
Show file tree
Hide file tree
Showing 17 changed files with 48 additions and 44 deletions.
2 changes: 1 addition & 1 deletion 404.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<a href="<?php echo esc_url( get_permalink() ); ?>" title="<?php the_title(); ?>">
<?php
if ( has_post_thumbnail( ) ) {
the_post_thumbnail( 'block_2_medium' );
the_post_thumbnail( 'codilight_lite_block_2_medium' );
} else {
echo '<img alt="'. esc_html( get_the_title() ) .'" src="'. esc_url( get_template_directory_uri() . '/assets/images/blank325_170.png' ) .'">';
}
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
====================================================================
CHANGELOG
====================================================================
## 1.0.3
* Add prefix for custom image size names.
* Fixed header translate texts.
* Remove widget notices with themecheck plugin.
* Disabled logo by default.

## 1.0.2
* Fixed customizer select sanitize callback.
* All text in theme dashboard are now internationalized.
Expand Down
2 changes: 1 addition & 1 deletion assets/sass/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Theme URI: http://www.famethemes.com/themes/codilight-lite
Author: FameThemes
Author URI: http://www.famethemes.com
Description: Codilight Lite is a news magazine style WordPress theme from FameThemes which is a perfect option to create any kind of magazine or blog websites.
Version: 1.0.2
Version: 1.0.3
Text Domain: codilight-lite
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down
8 changes: 4 additions & 4 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ function codilight_lite_setup() {
* @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
*/
add_theme_support( 'post-thumbnails' );
add_image_size( 'block_small', 90, 60, true ); // Archive List Posts
add_image_size( 'block_1_medium', 250, 170, true ); // Archive List Posts
add_image_size( 'block_2_medium', 325, 170, true ); // Archive Grid Posts
add_image_size( 'single_medium', 700, 350, true ); // Archive Grid Posts
add_image_size( 'codilight_lite_block_small', 90, 60, true ); // Archive List Posts
add_image_size( 'codilight_lite_block_1_medium', 250, 170, true ); // Archive List Posts
add_image_size( 'codilight_lite_block_2_medium', 325, 170, true ); // Archive Grid Posts
add_image_size( 'codilight_lite_single_medium', 700, 350, true ); // Archive Grid Posts

// This theme uses wp_nav_menu() in one location.
register_nav_menus( array(
Expand Down
6 changes: 3 additions & 3 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<div class="topbar-left pull-left">
<nav id="site-navigation" class="main-navigation" role="navigation">
<span class="home-menu"> <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><i class="fa fa-home"></i></a></span>
<span class="nav-toggle"><a href="#0" id="nav-toggle">Menu<span></span></a></span>
<span class="nav-toggle"><a href="#0" id="nav-toggle"><?php esc_html_e( 'Menu', 'codilight-lite' ); ?><span></span></a></span>
<ul class="ft-menu">
<?php wp_nav_menu( array('theme_location' => 'primary', 'container' => '', 'items_wrap' => '%3$s', 'fallback_cb' => 'codilight_lite_link_to_menu_editor' ) ); ?>
</ul>
Expand All @@ -39,7 +39,7 @@
<ul class="topbar-elements">
<?php do_action( '_before_topbar_search' ); ?>
<li class="topbar-search">
<a href="javascript:void(0)"><i class="search-icon fa fa-search"></i><span>Search</span></a>
<a href="javascript:void(0)"><i class="search-icon fa fa-search"></i><span><?php esc_html_e( 'Search', 'codilight-lite' ); ?></span></a>
<div class="dropdown-content dropdown-search">
<?php get_search_form( true ); ?>
</div>
Expand All @@ -65,7 +65,7 @@
<div class="container">
<div class="site-branding">
<?php
$codilight_lite_site_logo = get_theme_mod( 'codilight_lite_site_logo', apply_filters('customizer_default_logo', esc_url( get_template_directory_uri() . '/assets/images/logo.png' ) ) );
$codilight_lite_site_logo = get_theme_mod( 'codilight_lite_site_logo', apply_filters('customizer_default_logo', '' ) );
if ( isset( $codilight_lite_site_logo ) && $codilight_lite_site_logo != '' ) {
echo '<a title="'. get_bloginfo( 'name' ) .'" class="site-logo" href="' . esc_url( home_url( '/' ) ) . '" rel="home"><img src="'. esc_url( $codilight_lite_site_logo ) .'" alt="'. get_bloginfo( 'name' ) .'"></a>';
} else {
Expand Down
2 changes: 0 additions & 2 deletions inc/customizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ function codilight_lite_customize_register( $wp_customize ) {
$wp_customize->add_setting( 'codilight_lite_site_logo',
array(
'sanitize_callback' => 'codilight_lite_sanitize_file_url',
// 'default' => esc_url( get_template_directory_uri() . '/assets/images/logo.png' )
'default' => apply_filters('customizer_default_logo', esc_url( get_template_directory_uri() . '/assets/images/logo.png' ) )
)
);
$wp_customize->add_control( new WP_Customize_Image_Control(
Expand Down
4 changes: 2 additions & 2 deletions inc/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function codilight_lite_theme_info_page() {
<div class="wrap about-wrap theme_info_wrapper">
<h1><?php printf(esc_html__('Welcome to %1s - Version %2s', 'codilight-lite'), $theme_data->Name, $theme_data->Version ); ?></h1>
<div class="about-text"><?php esc_html_e( 'Codilight Lite is a news magazine style WordPress theme from FameThemes which is a perfect option to create any kind of magazine or blog websites.', 'codilight-lite' ) ?></div>
<a target="_blank" href="<?php echo esc_url('http://www.famethemes.com/?utm_source=theme_dashboard_page&utm_medium=badge_link&utm_campaign=theme_admin'); ?>" class="famethemes-badge wp-badge"><span>FameThemes</span></a>
<a target="_blank" href="<?php echo esc_url('http://www.famethemes.com/?utm_source=theme_dashboard_page&utm_medium=badge_link&utm_campaign=theme_admin'); ?>" class="famethemes-badge wp-badge"><span><?php _e( 'FameThemes', 'codilight-lite' ); ?></span></a>
<h2 class="nav-tab-wrapper">
<a href="?page=ft_codilight_lite" class="nav-tab nav-tab-active"><?php echo $theme_data->Name; ?></a>
</h2>
Expand Down Expand Up @@ -48,7 +48,7 @@ function codilight_lite_theme_info_page() {
</div>

<div class="theme_info_right">
<img src="<?php echo get_template_directory_uri(); ?>/screenshot.png" alt="Theme Screenshot" />
<img src="<?php echo get_template_directory_uri(); ?>/screenshot.png" alt="<?php esc_attr_e( 'Theme Screenshot', 'codilight-lite' ); ?>" />
</div>
</div>
</div>
Expand Down
12 changes: 6 additions & 6 deletions inc/widgets/block_1_widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ public function __construct() {
parent::__construct('ft_block1', esc_html__('FT Block 1 - Recent Posts', 'codilight-lite'), $widget_ops);
$this->alt_option_name = 'widget_block1';

add_action( 'save_post', array($this, 'flush_widget_cache') );
add_action( 'deleted_post', array($this, 'flush_widget_cache') );
add_action( 'switch_theme', array($this, 'flush_widget_cache') );
add_action( 'save_post', array($this, 'remove_cache') );
add_action( 'deleted_post', array($this, 'remove_cache') );
add_action( 'switch_theme', array($this, 'remove_cache') );
}

/**
Expand Down Expand Up @@ -78,7 +78,7 @@ public function widget( $args, $instance ) {
<a href="<?php echo esc_url( get_permalink() ); ?>" title="<?php the_title(); ?>">
<?php
if ( has_post_thumbnail( ) ) {
the_post_thumbnail( 'block_2_medium' );
the_post_thumbnail( 'codilight_lite_block_2_medium' );
} else {
echo '<img alt="'. esc_html( get_the_title() ) .'" src="'. esc_url( get_template_directory_uri() . '/assets/images/blank325_170.png' ) .'">';
}
Expand Down Expand Up @@ -139,7 +139,7 @@ public function widget( $args, $instance ) {
public function update( $new_instance, $old_instance ) {
$instance = $old_instance;

$this->flush_widget_cache();
$this->remove_cache();
$alloptions = wp_cache_get( 'alloptions', 'options' );
if ( isset($alloptions['widget_recent_entries']) ) delete_option('widget_recent_entries');

Expand All @@ -158,7 +158,7 @@ public function update( $new_instance, $old_instance ) {
/**
* @access public
*/
public function flush_widget_cache() {
public function remove_cache() {
wp_cache_delete('widget_block1', 'widget');
}

Expand Down
12 changes: 6 additions & 6 deletions inc/widgets/block_2_widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ public function __construct() {
parent::__construct('ft_block2', esc_html__('FT Block 2 - Slider', 'codilight-lite'), $widget_ops);
$this->alt_option_name = 'widget_block2';

add_action( 'save_post', array($this, 'flush_widget_cache') );
add_action( 'deleted_post', array($this, 'flush_widget_cache') );
add_action( 'switch_theme', array($this, 'flush_widget_cache') );
add_action( 'save_post', array($this, 'remove_cache') );
add_action( 'deleted_post', array($this, 'remove_cache') );
add_action( 'switch_theme', array($this, 'remove_cache') );
}

/**
Expand Down Expand Up @@ -80,7 +80,7 @@ public function widget( $args, $instance ) {
<article class="slider-item">
<div class="slider-thumb">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail( 'single_medium' ); ?>
<?php the_post_thumbnail( 'codilight_lite_single_medium' ); ?>
</a>
</div>
<div class="slider-content">
Expand Down Expand Up @@ -139,7 +139,7 @@ public function widget( $args, $instance ) {
public function update( $new_instance, $old_instance ) {
$instance = $old_instance;

$this->flush_widget_cache();
$this->remove_cache();
$alloptions = wp_cache_get( 'alloptions', 'options' );
if ( isset($alloptions['widget_recent_entries']) ) delete_option('widget_recent_entries');

Expand All @@ -155,7 +155,7 @@ public function update( $new_instance, $old_instance ) {
/**
* @access public
*/
public function flush_widget_cache() {
public function remove_cache() {
wp_cache_delete('widget_block2', 'widget');
}

Expand Down
14 changes: 7 additions & 7 deletions inc/widgets/block_3_widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ public function __construct() {
parent::__construct('ft_block3', esc_html__('FT Block 3', 'codilight-lite'), $widget_ops);
$this->alt_option_name = 'widget_block3';

add_action( 'save_post', array($this, 'flush_widget_cache') );
add_action( 'deleted_post', array($this, 'flush_widget_cache') );
add_action( 'switch_theme', array($this, 'flush_widget_cache') );
add_action( 'save_post', array($this, 'remove_cache') );
add_action( 'deleted_post', array($this, 'remove_cache') );
add_action( 'switch_theme', array($this, 'remove_cache') );
}

/**
Expand Down Expand Up @@ -83,10 +83,10 @@ public function widget( $args, $instance ) {
<article class="block-item">
<div class="block-thumb">
<a href="<?php the_permalink(); ?>">
<?php //the_post_thumbnail( 'block_small' ); ?>
<?php //the_post_thumbnail( 'codilight_lite_block_small' ); ?>
<?php
if ( has_post_thumbnail( ) ) {
the_post_thumbnail( 'block_small' );
the_post_thumbnail( 'codilight_lite_block_small' );
} else {
echo '<img alt="'. esc_html( get_the_title() ) .'" src="'. esc_url( get_template_directory_uri() . '/assets/images/blank90_60.png' ) .'">';
}
Expand Down Expand Up @@ -134,7 +134,7 @@ public function widget( $args, $instance ) {
public function update( $new_instance, $old_instance ) {
$instance = $old_instance;

$this->flush_widget_cache();
$this->remove_cache();
$alloptions = wp_cache_get( 'alloptions', 'options' );
if ( isset($alloptions['widget_recent_entries']) ) delete_option('widget_recent_entries');

Expand All @@ -150,7 +150,7 @@ public function update( $new_instance, $old_instance ) {
/**
* @access public
*/
public function flush_widget_cache() {
public function remove_cache() {
wp_cache_delete('widget_block3', 'widget');
}

Expand Down
14 changes: 7 additions & 7 deletions inc/widgets/block_4_widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ public function __construct() {
parent::__construct('ft_block4', esc_html__('FT Block 4', 'codilight-lite'), $widget_ops);
$this->alt_option_name = 'widget_block4';

add_action( 'save_post', array($this, 'flush_widget_cache') );
add_action( 'deleted_post', array($this, 'flush_widget_cache') );
add_action( 'switch_theme', array($this, 'flush_widget_cache') );
add_action( 'save_post', array($this, 'remove_cache') );
add_action( 'deleted_post', array($this, 'remove_cache') );
add_action( 'switch_theme', array($this, 'remove_cache') );
}

/**
Expand Down Expand Up @@ -70,10 +70,10 @@ public function widget( $args, $instance ) {
<article class="block-item">
<div class="block-thumb">
<a href="<?php the_permalink(); ?>">
<?php //the_post_thumbnail( 'block_small' ); ?>
<?php //the_post_thumbnail( 'codilight_lite_block_small' ); ?>
<?php
if ( has_post_thumbnail( ) ) {
the_post_thumbnail( 'block_small' );
the_post_thumbnail( 'codilight_lite_block_small' );
} else {
echo '<img alt="'. esc_html( get_the_title() ) .'" src="'. esc_url( get_template_directory_uri() . '/assets/images/blank90_60.png' ) .'">';
}
Expand Down Expand Up @@ -121,7 +121,7 @@ public function widget( $args, $instance ) {
public function update( $new_instance, $old_instance ) {
$instance = $old_instance;

$this->flush_widget_cache();
$this->remove_cache();
$alloptions = wp_cache_get( 'alloptions', 'options' );
if ( isset($alloptions['widget_recent_entries']) ) delete_option('widget_recent_entries');

Expand All @@ -137,7 +137,7 @@ public function update( $new_instance, $old_instance ) {
/**
* @access public
*/
public function flush_widget_cache() {
public function remove_cache() {
wp_cache_delete('widget_block4', 'widget');
}

Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Theme URI: http://www.famethemes.com/themes/codilight-lite
Author: FameThemes
Author URI: http://www.famethemes.com
Description: Codilight Lite is a news magazine style WordPress theme from FameThemes which is a perfect option to create any kind of magazine or blog websites.
Version: 1.0.2
Version: 1.0.3
Text Domain: codilight-lite
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down
2 changes: 1 addition & 1 deletion template-parts/content-grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<a href="<?php echo esc_url( get_permalink() ); ?>" title="<?php the_title(); ?>">
<?php
if ( has_post_thumbnail( ) ) {
the_post_thumbnail( 'block_2_medium' );
the_post_thumbnail( 'codilight_lite_block_2_medium' );
} else {
echo '<img alt="'. esc_html( get_the_title() ) .'" src="'. esc_url( get_template_directory_uri() . '/assets/images/blank325_170.png' ) .'">';
}
Expand Down
2 changes: 1 addition & 1 deletion template-parts/content-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<a href="<?php echo esc_url( get_permalink() ); ?>" title="<?php the_title(); ?>">
<?php
if ( has_post_thumbnail( ) ) {
the_post_thumbnail( 'block_1_medium' );
the_post_thumbnail( 'codilight_lite_block_1_medium' );
} else {
echo '<img alt="'. esc_html( get_the_title() ) .'" src="'. esc_url( get_template_directory_uri() . '/assets/images/blank250_170.png' ) .'">';
}
Expand Down
2 changes: 1 addition & 1 deletion template-parts/content-search.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<?php if ( has_post_thumbnail( ) ) { ?>
<div class="entry-thumb">
<a href="<?php echo esc_url( get_permalink() ); ?>" title="<?php the_title(); ?>">
<?php the_post_thumbnail( 'block_1_medium' ); ?>
<?php the_post_thumbnail( 'codilight_lite_block_1_medium' ); ?>
</a>
</div>
<?php } ?>
Expand Down
2 changes: 1 addition & 1 deletion template-parts/content-single.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<?php if ( has_post_thumbnail() ) : ?>
<div class="entry-thumb">
<?php the_post_thumbnail( 'single_medium' ); ?>
<?php the_post_thumbnail( 'codilight_lte_codilight_lite_single_medium' ); ?>
</div>
<?php endif; ?>

Expand Down
Empty file removed template-parts/meta-1.php
Empty file.

0 comments on commit 63eacfa

Please sign in to comment.