This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- wp:columns {"align":"wide"} --> | |
<div class="wp-block-columns alignwide"><!-- wp:column {"width":"512px"} --> | |
<div class="wp-block-column" style="flex-basis:512px"><!-- wp:woocommerce/product-gallery --> | |
<div class="wp-block-woocommerce-product-gallery wc-block-product-gallery"><!-- wp:woocommerce/product-gallery-thumbnails /--> | |
<!-- wp:woocommerce/product-gallery-large-image --> | |
<div class="wp-block-woocommerce-product-gallery-large-image wc-block-product-gallery-large-image__inner-blocks"><!-- wp:woocommerce/product-image {"showProductLink":false,"showSaleBadge":false} --> | |
<div class="is-loading"></div> | |
<!-- /wp:woocommerce/product-image --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- wp:group {"metadata":{"name":"Product grids with filters","patternName":"purple/product-grid-with-filters","categories":["woo-commerce"]},"align":"wide","layout":{"type":"constrained"}} --> | |
<div class="wp-block-group alignwide"><!-- wp:columns {"align":"wide"} --> | |
<div class="wp-block-columns alignwide"><!-- wp:column {"width":"22%"} --> | |
<div class="wp-block-column" style="flex-basis:22%"><!-- wp:heading {"level":3,"style":{"margin":{"top":"0","bottom":"0"},"spacing":{"margin":{"top":"0","bottom":"0"}},"typography":{"lineHeight":1.6,"fontStyle":"normal","fontWeight":"400"}}} --> | |
<h3 class="wp-block-heading" style="margin-top:0;margin-bottom:0;font-style:normal;font-weight:400;line-height:1.6">Filter by:</h3> | |
<!-- /wp:heading --></div> | |
<!-- /wp:column --> | |
<!-- wp:column {"width":"88%"} --> | |
<div class="wp-block-column" style="flex-basis:88%"><!-- wp:group {"className":"alignwide","style":{"spacing":{"margin":{"bottom":"var:preset|spacing|50"}}},"layout":{"type":"flex","flexWrap":"nowrap","justifyContent": |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'init', function() { | |
$all_patterns = WP_Block_Patterns_Registry::get_instance()->get_all_registered(); | |
foreach ( $all_patterns as $pattern ) { | |
if ( isset( $pattern['name'] ) && strpos( $pattern['name'], 'woocommerce-blocks' ) === 0 ) { | |
// $pattern['name'] is a WooCommerce pattern name. | |
unregister_block_pattern($pattern['name'] ); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Credit to https://github.com/rizaardiyanto1412/rizaardiyanto1412/blob/main/installwp.sh | |
# Check if WP-CLI is installed | |
if ! command -v wp &> /dev/null | |
then | |
echo "WP-CLI is not installed. Please install it first." | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Configuration variables - replace with your values | |
REMOTE_HOST="[email protected]" | |
REMOTE_PATH="files" | |
LOCAL_PATH="wp-content" | |
# Database name | |
TIMESTAMP=$(date +%Y%m%d_%H%M%S) | |
DB_BACKUP="wp_backup_${TIMESTAMP}.sql" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://schemas.wp.org/trunk/theme.json", | |
"version": 3, | |
"title": "Section Dark Mode", | |
"slug": "section-dark", | |
"blockTypes": ["core/group"], | |
"styles": { | |
"color": { | |
"background": "var:preset|color|foreground", | |
"text": "var:preset|color|background" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Register custom block template | |
* | |
* @return void | |
*/ | |
function prefix_register_block_templates() { | |
// Theme pattern example: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<pre><code class="language-typescript"> | |
import { faker } from "@faker-js/faker"; | |
const attachmentBlueprint = async (data?: Partial<Attachment>) => { | |
const messageId = data?.messageId ?? (await messageBlueprint()).id; | |
return await prisma.attachment.create({ | |
data: { | |
messageId, | |
filename: faker.system.fileName(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Font variable overrides | |
* | |
* @package Wpdev\FontOverrides | |
*/ | |
namespace Wpdev\FontOverrides; | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Enqueue block editor assets. | |
* | |
* @return void | |
*/ | |
function enqueue_custom_block_editor_modifications() { | |
$asset_file = include PLUGIN_PATH . '/build/editor-modifications/index.asset.php'; | |
wp_enqueue_script( |
NewerOlder