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
// Save ACF JSON for specific field groups only | |
add_filter('acf/update_field_group', 'hof_acf_json_save_for_specific_groups', 10, 1); | |
function hof_acf_json_save_for_specific_groups($field_group) | |
{ | |
// Define your allowed field groups | |
$allowed_field_groups = array('group_650da9580c565'); // Replace with your actual field group keys | |
// Check if the current field group is allowed |
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
# WP Config | |
wp-config.php | |
# ignore these plugins | |
wp-content/plugins/hello.php | |
# ignore specific themes | |
wp-content/themes/twenty*/ |
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
span.number span { | |
padding: 10px 5px; | |
/* border: 1px solid #ccc; */ | |
/* border-radius: 5px; */ | |
display: inline-block; | |
/* cursor: move; */ | |
} | |
.popup { | |
width: 100%; |
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
name: SCSS Build and Deploy | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: |
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 | |
/** | |
* Get all the user ID's for the specified user roles | |
* | |
* @param array $role | |
* @return array User ID's | |
*/ | |
function get_all_user_ids_by_user_roles($role) | |
{ |
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
// this is the background code... | |
// listen for our browerAction to be clicked | |
chrome.browserAction.onClicked.addListener(function (tab) { | |
// for the current tab, inject the "inject.js" file & execute it | |
chrome.tabs.executeScript(tab.ib, { | |
file: 'inject.js' | |
}); | |
}); |
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
SELECT | |
wp_posts.ID, | |
wp_posts.post_title, | |
bill.meta_value AS bill, | |
year.meta_value AS year, | |
chapter.meta_value AS chapter, | |
house.meta_value AS house | |
FROM | |
wp_posts | |
LEFT JOIN wp_postmeta AS bill ON wp_posts.ID = bill.post_id |
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 | |
/** | |
* Disable Fullscreen Gutenberg. | |
*/ | |
if (is_admin()) { | |
function ca_disable_editor_fullscreen_by_default() | |
{ | |
$script = "jQuery( window ).load(function() { const isFullscreenMode = wp.data.select( 'core/edit-post' ).isFeatureActive( 'fullscreenMode' ); if ( isFullscreenMode ) { wp.data.dispatch( 'core/edit-post' ).toggleFeature( 'fullscreenMode' ); } });"; | |
wp_add_inline_script('wp-blocks', $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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="$HOME/.oh-my-zsh" | |
# ZSH=/usr/share/oh-my-zsh/ | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME |
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
add_filter('allowed_block_types', 'ca_allowed_block_types'); | |
function ca_allowed_block_types($allowed_blocks) | |
{ | |
$allowed_blocks = []; | |
$block_types = WP_Block_Type_Registry::get_instance()->get_all_registered(); | |
$blocks = array_keys($block_types); | |
foreach ($blocks as $block => $block_name) { |
NewerOlder