Skip to content

Commit

Permalink
Merge pull request #712 from live-composer/improvement
Browse files Browse the repository at this point in the history
Improvement
  • Loading branch information
Dima authored May 31, 2017
2 parents 32f803a + 68e37fb commit d459335
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 13 deletions.
14 changes: 7 additions & 7 deletions css/frontend/modules.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
#dslc-content .dslc-cpt-post {
}

#dslc-content .dslc-cpt-post-main {
/*#dslc-content .dslc-cpt-post-main {
border: 0px solid transparent;
}
}*/

#dslc-content .dslc-cpt-post-thumb {
margin-bottom: 20px;
Expand Down Expand Up @@ -214,7 +214,7 @@
}

#dslc-content .dslc-blog-post-meta {
border: 1px solid #e5e5e5;
/*border: 1px solid #e5e5e5;*/
border-left: 0;
border-right: 0;
margin-bottom: 20px;
Expand Down Expand Up @@ -1150,9 +1150,9 @@ input[type="button"], input[type="submit"], input[type="reset"], input[type="fil
height: auto;
}

.dslc-text-module-content {
/*.dslc-text-module-content {
border: 0px solid transparent;
}
}*/

/**
* WIDGETS MODULE
Expand Down Expand Up @@ -1211,9 +1211,9 @@ input[type="button"], input[type="submit"], input[type="reset"], input[type="fil
margin-right: 0;
}

#dslc-content .dslc-widget li {
/*#dslc-content .dslc-widget li {
border-style: solid;
}
}*/

/**
* PRODUCTS MODULE
Expand Down
2 changes: 1 addition & 1 deletion ds-live-composer.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ function lc_welcome( $plugin ) {
}

// Bail if activating from network, or bulk.
if ( is_network_admin() || isset( $_GET['activate-multi'] ) || isset( $_GET['tgmpa-activate'] ) ) {
if ( is_network_admin() || isset( $_GET['activate-multi'] ) || isset( $_GET['tgmpa-activate'] ) || isset( $_GET['tgmpa-install'] ) ) {
return;
}

Expand Down
11 changes: 10 additions & 1 deletion includes/display-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -775,8 +775,17 @@ function dslc_filter_content( $content ) {
if ( dslc_is_editor_active( 'access' ) ) {
$composer_wrapper_after .= '<div class="lc-scroll-top-area"></div><div class="lc-scroll-bottom-area"></div>';
}

// Before Content.
$content_before = '';
$dslc_content_before = apply_filters( 'dslc_content_before', $content_before );

// After Content.
$content_after = '';
$dslc_content_after = apply_filters( 'dslc_content_after', $content_after );

// Pass the filtered content output.
return $composer_wrapper_before . do_action( 'dslc_output_prepend' ) . $composer_header . '<div id="dslc-main">' . $composer_prepend . $composer_content . '</div>' . $composer_append . $composer_footer . do_action( 'dslc_output_append' ) . $composer_wrapper_after;
return $dslc_content_before . $composer_wrapper_before . do_action( 'dslc_output_prepend' ) . $composer_header . '<div id="dslc-main">' . $composer_prepend . $composer_content . '</div>' . $composer_append . $composer_footer . do_action( 'dslc_output_append' ) . $composer_wrapper_after . $dslc_content_after;

// If LC should not filter the content
} else {
Expand Down
27 changes: 27 additions & 0 deletions includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,33 @@ function dslc_code_migration( $settings ) {
/* Fix bug with disappearing borders when migrating to new version */
$settings[ $id ] = $control['std'];
}
} elseif ( 'elements' === $id ) {

if ( isset( $settings[ $id ] ) && '' === $settings[ $id ] ) {
$settings[ $id ] = '';
} elseif ( ! isset( $settings[ $id ] ) ) {
$settings[ $id ] = $control['std'];
}
} elseif ( 'content' === $id ) {

if ( isset( $settings[ $id ] ) && '' === $settings[ $id ] ) {
$settings[ $id ] = '';
}
} elseif ( 'button_text' === $id ) {

if ( isset( $settings[ $id ] ) && '' === $settings[ $id ] ) {
$settings[ $id ] = '';
}
} elseif ( 'main_heading_link_title' === $id ) {

if ( isset( $settings[ $id ] ) && '' === $settings[ $id ] ) {
$settings[ $id ] = '';
}
} elseif ( stristr( $id, 'font_family' ) ) {

if ( isset( $settings[ $id ] ) && '' === $settings[ $id ] ) {
$settings[ $id ] = '';
}
} elseif ( ( ! isset( $settings[ $id ] ) || '' === $settings[ $id ] ) &&
isset( $control['std'] ) ) {

Expand Down
24 changes: 20 additions & 4 deletions includes/header-footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,14 @@ function dslc_hf_get_header( $post_ID = false ) {
// Get header/footer ID associated with the post
$header_footer = dslc_hf_get_ID( $post_ID );

// Before Header.
$header_before = '';
$dslc_header_before = apply_filters( 'dslc_header_before', $header_before );

// After Header.
$header_after = '';
$dslc_header_after = apply_filters( 'dslc_header_after', $header_after );

// If there is a header applied
if ( $header_footer['header'] && is_numeric ( $header_footer['header'] ) ) {

Expand Down Expand Up @@ -606,11 +614,11 @@ function dslc_hf_get_header( $post_ID = false ) {
$header_render = dslc_render_content( $header_code );

// Add the header code to the variable holder.
return $wrapper_start . '<div id="dslc-header" class="dslc-header-pos-' . $header_position . '">' . $header_render . $append . '</div>';
return $dslc_header_before . $wrapper_start . '<div id="dslc-header" class="dslc-header-pos-' . $header_position . '">' . $header_render . $append . '</div>' . $dslc_header_after;

} else {
// If no header applied.
return $wrapper_start . '';
return $dslc_header_before . $wrapper_start . '' . $dslc_header_after;
}
}

Expand Down Expand Up @@ -641,6 +649,14 @@ function dslc_hf_get_footer( $post_ID = false ) {
// Get header/footer ID associated with the post
$header_footer = dslc_hf_get_ID( $post_ID );

// Before Footer.
$footer_before = '';
$dslc_footer_before = apply_filters( 'dslc_footer_before', $footer_before );

// After Footer.
$footer_after = '';
$dslc_footer_after = apply_filters( 'dslc_footer_after', $footer_after );

// If there is a footer applied
if ( $header_footer['footer'] && is_numeric ( $header_footer['footer'] ) ) {

Expand Down Expand Up @@ -682,12 +698,12 @@ function dslc_hf_get_footer( $post_ID = false ) {
$footer_render = dslc_render_content( $footer_code );

// Add the header code to the variable holder.
return '<div id="dslc-footer" class="dslc-footer-pos-' . $footer_position . '">' . $footer_render . $append . '</div>' . $wrapper_end;
return $dslc_footer_before . '<div id="dslc-footer" class="dslc-footer-pos-' . $footer_position . '">' . $footer_render . $append . '</div>' . $wrapper_end . $dslc_footer_after;

// If no header applied
} else {

return '' . $wrapper_end;
return $dslc_footer_before . '' . $wrapper_end . $dslc_footer_after;

}

Expand Down
1 change: 1 addition & 0 deletions modules/testimonials/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ function dslc_testimonials_module_cpt() {
'not_found_in_trash' => __( 'No Testimonials found in Trash', 'live-composer-page-builder' ),
'parent' => __( 'Parent Testimonial', 'live-composer-page-builder' ),
),
'publicly_queryable' => false,
'public' => true,
'rewrite' => array('slug' => dslc_get_option( 'testimonials_slug', 'dslc_plugin_options_cpt_slugs' ), 'with_front' => $with_front),
'supports' => array('title', 'custom-fields', 'excerpt', 'editor', 'author', 'thumbnail'),
Expand Down

0 comments on commit d459335

Please sign in to comment.