This file contains 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 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 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 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 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 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( |
This file contains 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 block styles. | |
* | |
* @return void | |
*/ | |
function prefix_register_block_styles() { | |
$site_icon = get_site_icon_url(); | |
if ( $site_icon ) { |
This file contains 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 | |
/** | |
* Custom login page design | |
*/ | |
function custom_login_page_design() { | |
$colors = wp_get_global_styles( array( 'color' ) ); | |
$variables = wp_get_global_stylesheet( array( 'variables' ) ); | |
?> | |
<style type="text/css"> |
This file contains 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
<script type="text/javascript"> | |
document.querySelectorAll('.consent-link').forEach(el => { | |
el.addEventListener('click', event => { | |
if(! Osano) { | |
return | |
} | |
event.preventDefault(); | |
Osano.cm.showDrawer(); | |
}) | |
}) |
This file contains 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 | |
/** | |
* Render columns block with extra class | |
* | |
* @param string $block_content The block content about to be rendered. | |
* @param array $block The full block, including name and attributes. | |
* @return string | |
*/ | |
function render_columns_block_class( $block_content, $block ) { |
NewerOlder