Skip to content

Commit

Permalink
Merge pull request #16 from themebeez/dev
Browse files Browse the repository at this point in the history
2.0.8 update
  • Loading branch information
Asok17 authored Feb 28, 2020
2 parents 875ae79 + 41ccf36 commit 2708d61
Show file tree
Hide file tree
Showing 19 changed files with 248 additions and 170 deletions.
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
*.log
wp-config.php
wp-content/advanced-cache.php
wp-content/backup-db/
wp-content/backups/
wp-content/blogs.dir/
wp-content/cache/
wp-content/upgrade/
wp-content/uploads/
wp-content/mu-plugins/
wp-content/wp-cache-config.php
wp-content/plugins/hello.php
/node_modules/

/.htaccess
/license.txt
/readme.html
/sitemap.xml
/sitemap.xml.gz
/gulpfile.js
/package-lock.json
8 changes: 4 additions & 4 deletions archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
<div class="container">
<div class="row">
<?php
$sidebar_position = royale_news_get_option( 'royale_news_sidebar_position' );
$royale_news_sidebar_position = royale_news_get_option( 'royale_news_sidebar_position' );

if( $sidebar_position == 'none' || !is_active_sidebar( 'sidebar-1' ) ) {
if( $royale_news_sidebar_position == 'none' || !is_active_sidebar( 'sidebar-1' ) ) {
$class = 'col-md-12';
} else {
$class = 'col-md-8 sticky-section';
}

if( $sidebar_position == 'left' ) {
if( $royale_news_sidebar_position == 'left' ) {
get_sidebar();
}
?>
Expand Down Expand Up @@ -79,7 +79,7 @@
</div><!--.row.clearfix.news-section.news-section-three-->
</div>
<?php
if( $sidebar_position == 'right' ) {
if( $royale_news_sidebar_position == 'right' ) {
get_sidebar();
}
?>
Expand Down
8 changes: 4 additions & 4 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
if ( have_comments() ) : ?>
<h3 class="comments-title">
<?php
$comment_count = get_comments_number();
if ( 1 === $comment_count ) {
$royale_news_comment_count = get_comments_number();
if ( 1 === $royale_news_comment_count ) {
printf(
/* translators: 1: title. */
esc_html_e( 'One thought on &ldquo;%1$s&rdquo;', 'royale-news' ),
Expand All @@ -38,8 +38,8 @@
} else {
printf( // WPCS: XSS OK.
/* translators: 1: comment count number, 2: title. */
esc_html( _nx( '%1$s thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', $comment_count, 'comments title', 'royale-news' ) ),
number_format_i18n( $comment_count ),
esc_html( _nx( '%1$s thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', $royale_news_comment_count, 'comments title', 'royale-news' ) ),
number_format_i18n( $royale_news_comment_count ),
'<span>' . get_the_title() . '</span>'
);
}
Expand Down
4 changes: 2 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
* @package Royale_News
*/

$current_theme = wp_get_theme( 'royale-news' );
$royale_news_current_theme = wp_get_theme( 'royale-news' );

define( 'ROYALE_NEWS_VERSION', $current_theme->get( 'Version' ) );
define( 'ROYALE_NEWS_VERSION', $royale_news_current_theme->get( 'Version' ) );

if ( ! function_exists( 'royale_news_setup' ) ) :
/**
Expand Down
70 changes: 52 additions & 18 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,50 +11,84 @@ var uglify = require('gulp-uglify');

var rename = require('gulp-rename');

var cache = require('gulp-cache');
// var cache = require('gulp-cache');

var wpPot = require( 'gulp-wp-pot' );


// SCSS Compiler

var sass = require('gulp-sass');

sass.compiler = require('node-sass');


// CSS properties auto vendor prefixer

var autoprefixer = require( 'gulp-autoprefixer' );


// Constanly watch changes

var watch = require('gulp-watch');


// Task defined for java scripts bundling and minifying

gulp.task('scripts', function() {
// gulp.task( 'scripts', function() {

// return gulp.src([
// //'assets/src/js/vendor/*.js',
// 'assets/src/js/plugins/*.js',
// 'assets/src/js/custom/*.js',
// ])
// .pipe(concat('bundle.js'))
// .pipe(rename({ suffix: '.min' }))
// .pipe(uglify())
// .pipe(gulp.dest('assets/dist/js/'));
// } );

return gulp.src([
'assets/src/js/vendor/*.js',
'assets/src/js/plugins/*.js',
'assets/src/js/custom/*.js',
])
// gulp.task( 'stream', function () {

.pipe(concat('bundle.js'))
// gulp.watch( 'assets/src/js/**/*.js', gulp.series('scripts') );

.pipe(rename({ suffix: '.min' }))
// });

.pipe(uglify())

.pipe(gulp.dest('assets/dist/js/'));

gulp.task( 'makepot', function () {

});
return gulp.src( ['**/*.php', '!node_modules/**', '!themebeez/third-party/class-tgm-plugin-activation.php'] )
.pipe( wpPot( {
domain: 'royale-news',
package: 'Royale News'
} ))
.pipe( gulp.dest( 'languages/royale-news.pot' ) );
} );

gulp.task( 'default', gulp.series( 'makepot' ) );

// Task watch

gulp.task('watch', function() {

// Watch .js files
// gulp.task( 'sass', function () {

gulp.watch('assets/src/js/**/**.js', ['scripts']);
// return gulp.src( 'assets/scss/theme.scss' )
// .pipe( sass().on( 'error', sass.logError ) )
// .pipe( autoprefixer() )
// .pipe( gulp.dest( 'assets/css/' ) );
// });

// gulp.task( 'stream', function () {

});
// gulp.watch( 'assets/scss/**/*.scss', gulp.series('sass') );
// });


// declaring final task and command tasker

// just hit the command "gulp" it will run the following tasks...


gulp.task('default', ['watch', 'scripts']);
// gulp.task( 'default', gulp.series( 'makepot' ) );

// gulp.task( 'default', gulp.series( 'stream' ) );
12 changes: 6 additions & 6 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<main id="main" class="site-main">
<?php

$enable_feature = royale_news_get_option( 'royale_news_enable_featured_post' );
$royale_news_enable_feature = royale_news_get_option( 'royale_news_enable_featured_post' );

if ( is_active_sidebar( 'sidebar-2' ) && $enable_feature == 1 ) {
if ( is_active_sidebar( 'sidebar-2' ) && $royale_news_enable_feature == 1 ) {
?>
<div class="featured-widget-container">
<div class="container">
Expand All @@ -32,15 +32,15 @@
<div class="container">
<div class="row">
<?php
$sidebar_position = royale_news_get_option( 'royale_news_sidebar_position' );
$royale_news_sidebar_position = royale_news_get_option( 'royale_news_sidebar_position' );

if( $sidebar_position == 'none' || !is_active_sidebar( 'sidebar-1' ) ) {
if( $royale_news_sidebar_position == 'none' || !is_active_sidebar( 'sidebar-1' ) ) {
$class = 'col-md-12';
} else {
$class = 'col-md-8 sticky-section';
}

if( $sidebar_position == 'left' ) {
if( $royale_news_sidebar_position == 'left' ) {
get_sidebar();
}
?>
Expand Down Expand Up @@ -83,7 +83,7 @@
</div><!-- .esc_attr( $class ) -->

<?php
if( $sidebar_position == 'right' ) :
if( $royale_news_sidebar_position == 'right' ) :
get_sidebar();
endif;
?>
Expand Down
Loading

0 comments on commit 2708d61

Please sign in to comment.