Skip to content

Commit

Permalink
Merge pull request #475 from vektor-inc/develop
Browse files Browse the repository at this point in the history
13.0.0
  • Loading branch information
kurudrive authored Nov 4, 2020
2 parents 9011240 + 45eacad commit 83e349d
Show file tree
Hide file tree
Showing 36 changed files with 957 additions and 187 deletions.
2 changes: 1 addition & 1 deletion assets/css/common.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/common_editor.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/css/map/common.css.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/css/map/common_editor.css.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/css/map/wp-embed.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions design-skin/origin2/css/map/editor.css.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions design-skin/origin2/css/map/style.css.map

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions functions-compatible.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,27 @@ function lightning_deactive_adv_unit() {
$plugin_path = 'lightning-advanced-unit/lightning_advanced_unit.php';
VK_Helpers::deactivate_plugin( $plugin_path );
}

function lightning_pageheader_and_breadcrumb_compatible(){

$post_types = get_post_types();
foreach ( $post_types as $key => $post_type ){
$args = array(
'post_type' => $key,
'posts_per_page' => -1,
);
$posts = get_posts( $args );

foreach ( $posts as $post ){
setup_postdata( $post );
$meta_value = $post->_lightning_design_setting;
if ( ! empty( $meta_value['hidden_page_header_and_breadcrumb'] ) ){
unset( $meta_value['hidden_page_header_and_breadcrumb'] );
$meta_value['hidden_page_header'] = true;
$meta_value['hidden_breadcrumb'] = true;
update_post_meta( $post->ID, '_lightning_design_setting', $meta_value );
}
wp_reset_postdata();
}
}
}
3 changes: 3 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ function lightning_load_common_editor_css_to_gutenberg() {
if ( is_plugin_active( 'polylang/polylang.php' ) ) {
require get_parent_theme_file_path( '/plugin-support/polylang/functions-polylang.php' );
}
if ( is_plugin_active( 'bbpress/bbpress.php' ) ) {
require get_parent_theme_file_path( '/plugin-support/bbpress/functions-bbpress.php' );
}

/*
WidgetArea initiate
Expand Down
58 changes: 54 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const cleanCss = require('gulp-clean-css')
const cssmin = require('gulp-cssmin')
const cmq = require('gulp-merge-media-queries')
const path = require('path')
var sourcemaps = require('gulp-sourcemaps');

let error_stop = true

Expand Down Expand Up @@ -48,6 +49,28 @@ gulp.task('text-domain', function (done) {
done();
});

gulp.task('sass_common_dev', function (done) {
src(['./assets/_scss/**/*.scss'])
.pipe(sourcemaps.init())
.pipe(
sass({
includePaths: [
'./assets/scss',
'./inc/vk-components/package/_scss'
]
}
))
.pipe(cmq(
{
log: true
}
))
.pipe(autoprefixer())
.pipe(sourcemaps.write('./map/'))
.pipe(gulp.dest('../lightning-pro/assets/css'))
.pipe(gulp.dest('./assets/css'))
done()
});
gulp.task('sass_common', function (done) {
src(['./assets/_scss/**/*.scss'])
.pipe(
Expand All @@ -65,7 +88,6 @@ gulp.task('sass_common', function (done) {
))
.pipe(autoprefixer())
.pipe(cleanCss())
.pipe(gulp.dest('../lightning-pro/assets/css'))
.pipe(gulp.dest('./assets/css'))
done()
});
Expand Down Expand Up @@ -103,6 +125,21 @@ gulp.task('sass_skin', function (done) {
done();
});

gulp.task('sass_skin2_dev', function (done) {
src(['design-skin/origin2/_scss/**/*.scss'])
.pipe(sourcemaps.init())
.pipe(sass())
.pipe(cmq(
{
log: true
}
))
.pipe(autoprefixer())
.pipe(sourcemaps.write('./map/'))
.pipe(gulp.dest('./design-skin/origin2/css'))
.pipe(gulp.dest('../lightning-pro/design-skin/origin2/css'));
done();
});
gulp.task('sass_skin2', function (done) {
src(['design-skin/origin2/_scss/**/*.scss'])
.pipe(sass())
Expand Down Expand Up @@ -130,6 +167,18 @@ gulp.task('sass_woo', function (done) {
.pipe(gulp.dest('../lightning-pro/plugin-support/woocommerce/css/'));
});

gulp.task('sass_bbpress', function (done) {
return src(['./plugin-support/bbpress/_scss/**.scss'])
.pipe(sass())
.pipe(cmq({
log: true
}))
.pipe(autoprefixer())
.pipe(cleanCss())
.pipe(gulp.dest('./plugin-support/bbpress/css/'))
.pipe(gulp.dest('../lightning-pro/plugin-support/bbpress/css/'));
});

gulp.task('components_copy', function (done) {
return gulp.src(['inc/components/*.php'])
.pipe(gulp.dest('./inc/components'))
Expand Down Expand Up @@ -173,11 +222,12 @@ gulp.task('dist_pro_dev', function () {
// Watch
gulp.task('watch', function (done) {
error_stop = false
gulp.watch(['./assets/_scss/**','./inc/vk-mobile-nav/package/css/**','./inc/vk-components/**/*.css'], gulp.series('sass_common'));
gulp.watch(['./assets/_scss/**','./inc/vk-mobile-nav/package/css/**','./inc/vk-components/**/*.css'], gulp.series('sass_common_dev'));
gulp.watch(['./plugin-support/woocommerce/_scss/**'], gulp.series('sass_woo'));
gulp.watch(['./plugin-support/bbpress/_scss/**'], gulp.series('sass_bbpress'));
gulp.watch(['./library/bootstrap-4/scss/**.scss'], gulp.series('sass_bs4'));
gulp.watch(['./design-skin/origin/_scss/**/*.scss'], gulp.series('sass_skin'));
gulp.watch(['./design-skin/origin2/_scss/**/*.scss'], gulp.series('sass_skin2'));
gulp.watch(['./design-skin/origin2/_scss/**/*.scss'], gulp.series('sass_skin2_dev'));
gulp.watch(['./design-skin/foundation/_scss/**/*.scss'], gulp.series('sass_skin2', 'dist_foundation'));
done();
});
Expand Down Expand Up @@ -250,7 +300,7 @@ gulp.task('dist_pro', function () {
return files.pipe(gulp.dest('../lightning-pro/'))
});

gulp.task('dist', gulp.series('text-domain','sass_common','copy_dist'));
gulp.task('dist', gulp.series('text-domain','sass_common','sass_skin2','copy_dist'));
gulp.task('default', gulp.series('text-domain', 'watch'));


Expand Down
19 changes: 13 additions & 6 deletions inc/layout-controller/admin-post-meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,25 @@ function lightning_design_setting_meta_fields() {
/*-------------------------------------------*/
$form .= '<h4>' . __( 'Page Header and Breadcrumb', 'lightning' ) . '</h4>';

$id = '_lightning_design_setting[hidden_page_header_and_breadcrumb]';
$name = '_lightning_design_setting[hidden_page_header_and_breadcrumb]';
$label = __( 'Don\'t display', 'lightning' );

$form .= '<ul>';

// Page Header
$id = '_lightning_design_setting[hidden_page_header]';
$checked = '';
if ( ! empty( $saved_post_meta['hidden_page_header_and_breadcrumb'] ) ) {
if ( ! empty( $saved_post_meta['hidden_page_header'] ) ) {
$checked = ' checked';
}
$form .= '<li class="vk_checklist_item vk_checklist_item-style-vertical">' . '<input type="checkbox" id="' . $id . '" name="' . $id . '" value="true"' . $checked . ' class="vk_checklist_item_input"><label for="' . $id . '" class="vk_checklist_item_label">' . wp_kses_post( __( 'Don\'t display Page Header', 'lightning' ) ) . '</label></li>';

$form .= '<li class="vk_checklist_item vk_checklist_item-style-vertical">' . '<input type="checkbox" id="' . esc_attr( $id ) . '" name="' . esc_attr( $name ) . '" value="true"' . $checked . ' class="vk_checklist_item_input"><label for="' . esc_attr( $name ) . '" class="vk_checklist_item_label">' . wp_kses_post( $label ) . '</label></li>';

// Bread Crumb
$id = '_lightning_design_setting[hidden_breadcrumb]';
$checked = '';
if ( ! empty( $saved_post_meta['hidden_breadcrumb'] ) ) {
$checked = ' checked';
}
$form .= '<li class="vk_checklist_item vk_checklist_item-style-vertical">' . '<input type="checkbox" id="' . $id . '" name="' . $id . '" value="true"' . $checked . ' class="vk_checklist_item_input"><label for="' . $id . '" class="vk_checklist_item_label">' . wp_kses_post( __( 'Don\'t display Breadcrumb', 'lightning' ) ) . '</label></li>';

$form .= '</ul>';

/*
Expand Down
37 changes: 26 additions & 11 deletions inc/layout-controller/functions-layout-controll.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,30 +246,45 @@ function lightning_is_subsection_display() {
}

/**
* Page header and Breadcrumb Display or hidden
* Page header Display or hidden
*
* The purpose of preparing a unique function is to enable batch control using a filter hook.
*
* @since Lightning 9.0.0
* @since Lightning 13.0.0
* @return boolean
*/
function lightning_is_page_header_and_breadcrumb() {
function lightning_is_page_header() {
$return = true;
if ( is_singular() ) {

global $post;

if ( ! empty( $post->_lightning_design_setting['hidden_page_header_and_breadcrumb'] ) ) {
if ( ! empty( $post->_lightning_design_setting['hidden_page_header'] ) ) {
$return = false;
}

}
return apply_filters( 'lightning_is_page_header_and_breadcrumb', $return );
return apply_filters( 'lightning_is_page_header', $return );
}

function lightning_is_siteContent_padding_off() {
$return = false;
/**
* Breadcrumb Display or hidden
*
* The purpose of preparing a unique function is to enable batch control using a filter hook.
*
* @since Lightning 13.0.0
* @return boolean
*/
function lightning_is_breadcrumb() {
$return = true;
if ( is_singular() ) {

global $post;
if ( ! empty( $post->_lightning_design_setting['siteContent_padding'] ) ) {
$return = true;

if ( ! empty( $post->_lightning_design_setting['hidden_breadcrumb'] ) ) {
$return = false;
}

}
return apply_filters( 'lightning_is_siteContent_padding_off', $return );
}
return apply_filters( 'lightning_is_breadcrumb', $return );
}
37 changes: 37 additions & 0 deletions inc/template-tags-old.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,40 @@ function lightning_deactivate_plugin( $plugin_path ){
VK_Helpers::deactivate_plugin( $plugin_path );
}
}

/**
* Page header and Breadcrumb Display or hidden
*
* @since Lightning 9.0.0
* @repeal Lightning 13.0.0
* @return boolean
*/
function lightning_is_page_header_and_breadcrumb() {
$return = true;
if ( is_singular() ) {
global $post;

if ( ! empty( $post->_lightning_design_setting['hidden_page_header_and_breadcrumb'] ) ) {
$return = false;
}

if (
! empty( $post->_lightning_design_setting['hidden_page_header'] ) &&
! empty( $post->_lightning_design_setting['hidden_breadcrumb'] )
) {
$return = false;
}
}
return apply_filters( 'lightning_is_page_header_and_breadcrumb', $return );
}

function lightning_is_siteContent_padding_off() {
$return = false;
if ( is_singular() ) {
global $post;
if ( ! empty( $post->_lightning_design_setting['siteContent_padding'] ) ) {
$return = true;
}
}
return apply_filters( 'lightning_is_siteContent_padding_off', $return );
}
13 changes: 6 additions & 7 deletions inc/vk-components/package/_scss/_vk-post-type-card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,22 @@ https://github.com/vektor-inc/vektor-wp-libraries
/*-------------------------------------------*/
/* .card-noborder
/*-------------------------------------------*/
:root {
--vk-color-border-hr: #e5e5e5;
}
.card-noborder {
&.card {
/*.card.card-noborder にしないと負ける */
border: none;
background: none;
}
.vk_post_imgOuter {
border: none;
border : 1px solid var(--vk-color-border-hr);
}
.card-body {
padding-left: 0;
padding-right: 0;
padding-bottom:0;
}
&.vk_post-btn-display {
.card-body {
Expand Down Expand Up @@ -223,6 +227,7 @@ https://github.com/vektor-inc/vektor-wp-libraries
}
.card-body {
height: 100%;
padding-bottom: 1.5em;
}
}

Expand All @@ -242,9 +247,3 @@ https://github.com/vektor-inc/vektor-wp-libraries
line-height: 1.1;
}
}

.card-post {
.card-body {
padding-bottom: 1.5em;
}
}
Loading

0 comments on commit 83e349d

Please sign in to comment.