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
[xdebug] | |
{{#if os.windows}} | |
zend_extension = php_xdebug.dll | |
{{else}} | |
zend_extension = {{extensionsDir}}/xdebug.so | |
{{/if}} | |
{{#if xdebugEnabled}} | |
{{!-- xdebug.mode=debug,develop --}} | |
xdebug.mode=profile |
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
@echo off | |
setlocal enabledelayedexpansion | |
set url=https://next-level-racing-new.local/sample-home/ | |
set runs=10 | |
for /L %%i in (1,1,%runs%) do ( | |
curl -o NUL -s -w "%%{time_total}\n" -H "Pragma: no-cache" "!url!" | |
) |
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
export function batch_items(items, items_per_batch){ | |
let batched_items = []; | |
let group_items = []; | |
let group_index = 0; | |
for( let i = 0; i < items.length; i++ ) { | |
group_index++; | |
group_items.push(items[i]); |
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
@echo off | |
setlocal | |
set "plugin_name=plugin-boilerplate" | |
set "zip_file=%plugin_name%.zip" | |
set "source_path=%CD%" | |
set "exclude=node_modules;.git;_temp;zip.ps1;publish.bat;.gitignore;jsconfig.json;package.json;package-lock.json;wp-manifest.cjs;vite.config.js;%zip_file%" | |
echo Creating zip file... |
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
export default class Before_After_Slider { | |
constructor(el){ | |
this.el = el; | |
this.init(); | |
} | |
init(){ | |
this.before = this.el.querySelector('.before_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
@echo off | |
setlocal | |
set install_name=bigdaddylocal | |
set theme_folder=fivebyfive | |
REM Set variables | |
set remote_base_dir=/sites/%install_name%/wp-content/themes/%theme_folder%/ | |
set ssh_host=%install_name%@%install_name%.ssh.wpengine.net |
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('wp_ajax_ACTION_HERE', function(){ | |
$response = [ | |
'post' => $_POST, | |
]; | |
wp_send_json($response); | |
}); | |
?> | |
<script> |
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
function script_ready_check(script, cb, interval, limit){ | |
var time = 0; | |
var check = setInterval(function(){ | |
if( typeof script !== 'undefined' ) { | |
clearInterval(check); | |
cb(); | |
} | |
time += interval; | |
if( time >= limit ) { | |
clearInterval(check); |
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
function group_items(items, items_per_group){ | |
var groups = [ | |
[], | |
]; | |
var current_group = 0; | |
var group_items_count = 0; | |
for( var i = 0; i < items.length; i++ ) { |
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 | |
namespace FF\Vite; | |
function get_manifest(){ | |
$manifest_file = __DIR__ . '/dist/.vite/manifest.json'; | |
$manifest = wp_json_file_decode( $manifest_file ); | |
return $manifest; | |
} | |
function get_mode(){ |