Usage:
gitmerged.sh
Shows all open feature branches and their respective merge status to common root branches; master, main, staging, acc, develop
gitmerged.sh master staging
#!/usr/bin/env bash | |
# place file one folder above the public_html to prevent access from world. | |
cd "$(dirname "$0")/public_html" | |
for subsite in $(wp site list --format=csv --fields=url 2>/dev/null | tail -n+2); do | |
echo $subsite; | |
wp cron event run --due-now --url=$subsite 2>/dev/null | |
done | |
## IF YOUR SERVER tail DOES NOT SUPPORT OFFSET; |
<?php | |
// sent an updated nonce to the front-end on each request | |
add_filter( 'rest_post_dispatch', function( WP_REST_Response $response, WP_REST_Server $rest, WP_REST_Request $request) { | |
$response->header('X-WP-Nonce', wp_create_nonce( 'wp_rest' )); | |
return $response; | |
}, PHP_INT_MAX, 3); | |
// wp_create_nonce relies on user-id from global user object, and authentication cookie. | |
// both are INCORRECT after programmatic log-in or log-out. | |
// Really, WordPress? You should do this for us! |
<?php | |
/** | |
* Filters that assist in uploading additional filetypes. | |
* | |
* @package Your_Package | |
* @subpackage Your_Package/Includes | |
*/ | |
namespace Your_Package\Includes; |
<?php | |
/** | |
* Translate post-type-archive-slug when different from post-type-slug. | |
* | |
* You can have your archive slug set to, for example /books and the singles on /book/title by setting | |
* $args['rewrite'] => [ 'slug' => 'book', ... ]; | |
* $args['has_archive'] => 'books'; | |
* when registering your post_type | |
* |
<?php | |
/** | |
* Plugin Name: Prevent Redirect Loop | |
* Description: Prevent redirect loops if user adds a redirect to the same page in Yoast SEO Premium or other plugins. | |
* Version: 1.0.0 | |
* Author: Remon Pel | |
*/ | |
// Prevent redirect loops. | |
add_filter( |
#!/usr/bin/env bash | |
######### | |
## Configration: | |
## Set your primary and secondary development paths. | |
## YOU CANNOT HAVE SPACES IN THE PRIMARY PATH - If you have, then most tooling here will fail because of limitations in macOS Terminal. | |
## AND NO - This tool is not built to use a different terminal. | |
## | |
PRIMARY_LOCATION=~/Development | |
SECONDARY_LOCATION=/Volumes/Macintosh\ SD/Development |
<?php | |
/** | |
* @file proxy.php Proxy requests to a different server. Very useful for example to set-up Let's Encrypt on a new server without the domain resolving to it. | |
* | |
* Step 1: set-up a domain pointer on the target server that DOES resolve to the same webspace as the original domain. | |
* Step 2: place code in the .htaccess in the source server as well as this php file. | |
* Step 3: configure the $target_domain to point to your newly set-up domain pointer. | |
* | |
* Final note: the 'verbose' function is for debugging this code only. It will probably be of no use to you. | |
*/ |
update wp_posts SET post_title = REPLACE(post_title, UNHEX('e280a8'), '') WHERE post_title LIKE concat('%', UNHEX('e280a8'), '%'); | |
update wp_posts SET post_content = REPLACE(post_content, UNHEX('e280a8'), '') WHERE post_content LIKE concat('%', UNHEX('e280a8'), '%'); |