Skip to content

Commit

Permalink
Merge pull request #40 from pattyok/modal
Browse files Browse the repository at this point in the history
fix to linked modal
  • Loading branch information
pattyok authored Jun 19, 2024
2 parents 4812a9a + 55bec23 commit d05a994
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build/custom-archive/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"list",
"custom"
],
"version": "1.0.2",
"version": "1.0.3",
"textdomain": "carkeek-blocks",
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
Expand Down
2 changes: 1 addition & 1 deletion build/custom-archive/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('lodash', 'react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => 'b71dbe5a44b6fd675dad');
<?php return array('dependencies' => array('lodash', 'react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => 'e7348085dcba10a14c9b');
2 changes: 1 addition & 1 deletion build/custom-archive/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/modal-item/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "carkeek-blocks/modal-item",
"version": "0.1.1",
"version": "0.1.2",
"title": "Modal Item",
"category": "widgets",
"description": "Block that opens additional content in a modal window.",
Expand Down
2 changes: 1 addition & 1 deletion build/modal-item/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => 'ef4fdf37ce9701868fd8');
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => '28ba7c6d009ba0a64829');
2 changes: 1 addition & 1 deletion build/modal-item/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion carkeek-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Primary Branch: main
* Description: Series of blocks designed to work with this site's custom Theme
* Author: Patty O'Hara
* Version: 3.2.27
* Version: 3.2.28
* Author URI https://carkeekstudios.com/
* Text Domain: carkeek-blocks
*/
Expand Down
2 changes: 1 addition & 1 deletion src/custom-archive/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"category": "widgets",
"description": "Block showing the latest items by post type.",
"keywords": [ "archive", "posts", "list", "custom" ],
"version": "1.0.2",
"version": "1.0.3",
"textdomain": "carkeek-blocks",
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
Expand Down
2 changes: 1 addition & 1 deletion src/modal-item/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "carkeek-blocks/modal-item",
"version": "0.1.1",
"version": "0.1.2",
"title": "Modal Item",
"category": "widgets",
"description": "Block that opens additional content in a modal window.",
Expand Down
11 changes: 9 additions & 2 deletions templates/custom-archive/modal_item_v2_linked.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
error_log(print_r($post->post_title, true));


$item_id = $data->blockId . '_' . $post->ID;
$image = '';
Expand All @@ -10,6 +10,9 @@
$modal_body_image = '<div class="ck-modal-item-image">' . $image . '</div>';
}
$modal_body_image = apply_filters( 'ck_custom_archive_layout_modal_dialog__image', $modal_body_image );

$html_before_excerpt = CarkeekBlocks_Helpers::make_meta_fields( $data->addlContentBefore, $post->ID, 'before', $data->postTypeSelected );
$html_after_excerpt = CarkeekBlocks_Helpers::make_meta_fields( $data->addlContentAfter, $post->ID, 'after', $data->postTypeSelected );
?>

<div class="ck-columns__item ck-custom-archive__item ck-modal-item <?php echo esc_attr( $post->name ); ?>" data-id="<?php echo esc_attr( $item_id ); ?>" >
Expand All @@ -31,7 +34,11 @@ class="ck-modal-item-image"

<?php echo sprintf( '<span class="ck-custom-archive-title_link">%s</span>', esc_html( get_the_title() ) ); ?>


<?php
if ( ! empty( $html_before_excerpt ) ) {
echo wp_kses_post( $html_before_excerpt );
}
?>
<?php do_action( 'ck_custom_archive_layout__after_title', $data ); ?>
</div>
</a>
Expand Down

0 comments on commit d05a994

Please sign in to comment.