Skip to content

Commit

Permalink
Merge branch 'master' into bugfix/KAD-3244
Browse files Browse the repository at this point in the history
  • Loading branch information
oakesjosh authored Nov 19, 2024
2 parents f4fddfa + fbf548a commit ae4c24e
Show file tree
Hide file tree
Showing 20 changed files with 830 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
# For posting a rich message using Block Kit
payload: |
{
"text": "🚀 ${{ github.event.repository.name }} version ${{ github.event.release.tag_name }} has been released!\n\nView on GitHub: ${{ github.event.release.html_url }}"
"text": "<!subteam^kadencewp-team> 🚀 ${{ github.event.repository.name }} version ${{ github.event.release.tag_name }} has been released!\n\nView on GitHub: ${{ github.event.release.html_url }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
Expand Down
2 changes: 2 additions & 0 deletions .puprc
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"build": [
"rm -rf vendor",
"@composer install --no-dev --no-scripts",
"@composer run strauss-release",
"npm install --legacy-peer-deps",
"npm run build"
],
"build_dev": [
"rm -rf vendor",
"@composer install --no-dev --no-scripts",
"@composer run strauss-release",
"npm install --legacy-peer-deps",
Expand Down
4 changes: 4 additions & 0 deletions includes/advanced-form/advanced-form-cpt.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ function( string $column_name, int $post_id ) {
new Kadence_Blocks_Duplicate_Post( self::SLUG );
}
}

if( is_admin() && class_exists( 'Kadence_Blocks_Cpt_Import_Export' ) ) {
new Kadence_Blocks_Cpt_Import_Export( self::SLUG );
}
}
/**
* Filters the block area post type columns in the admin list table.
Expand Down
6 changes: 6 additions & 0 deletions includes/blocks/class-kadence-blocks-column-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,12 @@ public function build_css( $attributes, $css, $unique_id, $unique_style_id ) {
}
break;
}
// Backdrop Filter (pro)
if ( ! empty( $attributes['backdropFilterType'] ) && $attributes['backdropFilterType'] !== 'none' ) {
$css->set_selector( '.kadence-column' . $unique_id . ' > .kt-inside-inner-col');
$css->add_property( '-webkit-backdrop-filter', $attributes['backdropFilterString'] );
$css->add_property( 'backdrop-filter', $attributes['backdropFilterString'] );
}
// Overlay.
$overlay_type = ! empty( $attributes['overlayType'] ) ? $attributes['overlayType'] : 'normal';
$css->set_selector( '.kadence-column' . $unique_id . ' > .kt-inside-inner-col:before' );
Expand Down
7 changes: 6 additions & 1 deletion includes/blocks/class-kadence-blocks-header-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,17 @@ public function build_css( $attributes, $css, $unique_id, $unique_style_id ) {
}
$css->set_media_state( 'desktop' );

// Normal state styles.
// Normal state styles.-cpt-id .kb-header-container
$css->set_selector( '.wp-block-kadence-header' . $unique_id . ' .kb-header-container' );
$css->render_measure_output( $header_attributes, 'margin', 'margin', [ 'unit_key' => 'marginUnit' ] );
$css->render_measure_output( $header_attributes, 'padding', 'padding', [ 'unit_key' => 'paddingUnit' ] );
$css->render_typography( $header_attributes );

if ( ! empty( $header_attributes['pro_backdropFilterString'] ) && class_exists( 'Kadence_Blocks_Pro' ) ) {
$css->add_property( 'backdrop-filter', $header_attributes['pro_backdropFilterString'] );
$css->add_property( '-webkit-backdrop-filter', $header_attributes['pro_backdropFilterString'] );
}

return $css->css_output();
}

Expand Down
16 changes: 16 additions & 0 deletions includes/blocks/class-kadence-blocks-navigation-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,22 @@ public function sized_dynamic_styles( $css, $attributes, $unique_id, $size = 'De
$css->add_property( '--kb-nav-top-not-last-link-border-right', 'var(--kb-nav-link-border-right)' );
}

//link, description, and media alignment
if ($sized_attributes['linkHorizontalAlignment']) {
$css->add_property('--kb-nav-top-link-align', $sized_attributes['linkHorizontalAlignment']);
$link_flex_align = $sized_attributes['linkHorizontalAlignment'] == 'right' ? 'end' : ( $sized_attributes['linkHorizontalAlignment'] == 'center' ? 'center' : 'start' );
$css->add_property('--kb-nav-top-link-flex-justify', $link_flex_align);
$css->add_property('--kb-nav-top-link-media-container-align-self', $link_flex_align);
}

//dropdown link, description, and media alignment
if ($sized_attributes['dropdownLinkHorizontalAlignment']) {
$css->add_property('--kb-nav-dropdown-link-align', $sized_attributes['dropdownLinkHorizontalAlignment']);
$link_flex_align = $sized_attributes['dropdownLinkHorizontalAlignment'] == 'right' ? 'end' : ( $sized_attributes['dropdownLinkHorizontalAlignment'] == 'center' ? 'center' : 'start' );
$css->add_property('--kb-nav-dropdown-link-flex-justify', $link_flex_align);
$css->add_property('--kb-nav-dropdown-link-media-container-align-self', $link_flex_align);
}

if ( str_contains( $sized_attributes['style'], 'fullheight' ) ) {
$css->add_property( '--kb-nav-height', '100%' );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,8 @@ public function sized_dynamic_styles( $css, $attributes, $unique_id, $size = 'De
}

//link, description, and media alignment
$css->add_property( '--kb-nav-link-align', $sized_attributes['align'] ? $sized_attributes['align'] : 'left' );
if ($sized_attributes['align']) {
$css->add_property('--kb-nav-link-align', $sized_attributes['align'] != '' ? $sized_attributes['align'] : 'left');
$css->add_property( '--kb-nav-link-align', $sized_attributes['align'] );
$sized_flex_align = $sized_attributes['align'] == 'right' ? 'end' : ( $sized_attributes['align'] == 'center' ? 'center' : 'start' );
$css->add_property('--kb-nav-link-flex-justify', $sized_flex_align);
$css->add_property('--kb-nav-link-media-container-align-self', $sized_flex_align);
Expand Down
Loading

0 comments on commit ae4c24e

Please sign in to comment.