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 | |
// Creation Websites | |
// Add filter to change form '2' for Web Design prior to rendering | |
add_filter("wsf_pre_render_2", "fws_create_websites", 10, 1); // <=== CHANGE THE FUNCTION NAME | |
function fws_create_websites($form) { | |
// Get MetaBox Custom Fields - Setting Page -- Master Pricing | |
$setting_page = "master-pricing"; | |
$field_name = "creation_services"; // <=== CHANGE ME WITH THE RIGHT CUSTOM FIELD ID (METABOX) |
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
import { exists } from '@/helpers/utilities'; | |
export let mixin = ({ node = null, config = {} } = {}) => { | |
if (!node) return false; | |
let state = { | |
node, | |
config, | |
}; |
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 | |
public function delete_thumbnails( $args, $assoc_args ) { | |
global $wpdb; | |
if ( isset( $assoc_args['dry-run'] ) && 'false' === $assoc_args['dry-run'] ) { | |
$dry_run = false; | |
} else { | |
$dry_run = true; | |
WP_CLI::line( '!!! Doing a dry-run, no thumbnails will be deleted.' ); | |
} |
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 the below to your functions file | |
// then visit the page that you want to see | |
// the enqueued scripts and stylesheets for | |
function se_inspect_styles() { | |
global $wp_styles; | |
echo "<h2>Enqueued CSS Stylesheets</h2><div>"; | |
foreach( $wp_styles->queue as $handle ) : |
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
/** | |
* Proxy for the `wp` object, with fallback | |
* to experimental names and error throwing | |
* when accessing a non-existent item (intended | |
* for debugging purposes). | |
*/ | |
export default new Proxy( {}, { | |
get( cache, moduleName, reciever ) { | |
if ( typeof cache[ moduleName ] === 'undefined' ) { | |
if ( typeof wp[ moduleName ] === 'undefined' ) { |
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 | |
/** | |
* Plugin Name: WP Sticky Custom Post Types | |
* Plugin URI: https://gist.github.com/19h47/c54fd0e7a5c6fbc99a6087e7606054c0 | |
* Description: WP Sticky Custom Post Types is a plugin that enables support for sticky custom post types. | |
* Version: 0.0.1 | |
* Author: Jérémy Levron | |
* Author URI: https://19h47.fr | |
* | |
* @package WordPress |
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 | |
/* | |
Plugin Name: ACF Date Time Picker - set end date to after start date | |
Plugin URI: https://www.damiencarbery.com/2021/10/acf-date-time-picker-set-end-date-to-after-start-date/ | |
Description: With two related Date Time Picker fields limit the end date to be after the start date. | |
Author: Damien Carbery | |
Version: 0.3 | |
*/ | |
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 data attributes to the query block to describe the block query. | |
* | |
* @param string $block_content Default query content. | |
* @param array $block Parsed block. | |
* @return string | |
*/ | |
function query_render_block( $block_content, $block ) { | |
global $wp_query; |
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
// Usage | |
// <x-card-weather-forecast location="Guwahati" api-key="your-weatherapi.com-api-key" /> | |
@props([ | |
"location" => "Guwahati", | |
"apiKey" => "", | |
"poll" => 10000 | |
]) | |
<div class="bg-white shadow rounded-lg p-5 dark:bg-gray-800 max-w-full" |