Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

Commit c0a2c16

Browse files
authored
Merge pull request #11 from creode/feature/add_match_height
Feature/add match height
2 parents 01d4228 + b2b5300 commit c0a2c16

4 files changed

Lines changed: 25 additions & 0 deletions

File tree

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"phpcs.standard": "WordPress"
3+
}

docs/.vitepress/config.mts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ export default defineConfig({
4545
text: 'Block Style Modifier',
4646
link: '/js-libraries/block-style-modifier'
4747
},
48+
{
49+
text: 'Match Height Library',
50+
link: '/js-libraries/match-height'
51+
},
4852
]
4953
}
5054
]

docs/js-libraries/match-height.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
outline: deep
3+
---
4+
5+
# Match Height
6+
7+
## Introduction
8+
Match Height is a jQuery plugin that automatically matches the heights of elements. This is particularly useful for creating uniform card layouts, grid systems, or any scenario where you need multiple elements to have the same height regardless of their content.
9+
10+
The library is automatically registered and available for both front-end and admin scripts, with jQuery as a dependency.
11+
12+
## Usage
13+
For complete usage documentation, options, examples, and advanced features, please refer to the official [jquery-match-height repository](https://github.com/liabru/jquery-match-height).
14+

theme-template/includes/register-scripts.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
'wp_enqueue_scripts',
1616
function () {
1717
$asset_enqueue = Asset_Enqueue::get_instance();
18+
19+
wp_register_script( 'match-height', 'https://cdnjs.cloudflare.com/ajax/libs/jquery.matchHeight/0.7.2/jquery.matchHeight-min.js', array( 'jquery' ), '0.7.2', true );
1820

1921
$asset_enqueue->register_vite_script( 'example_script', 'js/example-script.js' );
2022
wp_enqueue_script( 'example_script' );
@@ -29,6 +31,8 @@ function () {
2931
function () {
3032
$asset_enqueue = Asset_Enqueue::get_instance();
3133

34+
wp_register_script( 'match-height', 'https://cdnjs.cloudflare.com/ajax/libs/jquery.matchHeight/0.7.2/jquery.matchHeight-min.js', array( 'jquery' ), '0.7.2', true );
35+
3236
$asset_enqueue->register_vite_script( 'block_styles', 'js/admin/block-styles.js', array( 'block_style_modifier' ) );
3337
wp_enqueue_script( 'block_styles' );
3438
}

0 commit comments

Comments
 (0)