Consider supporting my work by purchasing the course this tutorial is a part of i.e. VSCode Power User →
- Make sure your
Local by FlyWheel
WordPress install is a custom install
/* | |
Purpose: Export the configuration settings for GitHub Labels. | |
(c) James Perrin, MIT License, https://www.countrydawgg.com, | @jamesperrin | |
Exporting Instructions: | |
1. Open a web browser. | |
2. Navigate to the desired GitHub repository. | |
3. Navigate to Issues tab. |
/* | |
--PIETZ OBFUSCATE CODE-- | |
2019-06-01 | |
from MAKEbook.io | |
Instructions: | |
1) put this in your functions.php file | |
2) add this to the post you want to obfuscate, on top | |
3) [obfuscate] | |
4) to start obfuscating, add a HTML code or HTML block with <start></start> |
<?php | |
add_action( 'parse_request', 'disable_front_end', 99 ); | |
function disable_front_end() { | |
global $wp; | |
/** | |
* If the request is not part of a CRON, REST Request, GraphQL Request or Admin request, |
Consider supporting my work by purchasing the course this tutorial is a part of i.e. VSCode Power User →
Local by FlyWheel
WordPress install is a custom installconst setup = () => { | |
const nearestColorScript = document.createElement('script'); | |
document.body.appendChild(nearestColorScript); | |
nearestColorScript.onload = onScriptLoad; | |
nearestColorScript.src = 'https://cdn.rawgit.com/dtao/nearest-color/a017c25b/nearestColor.js'; | |
} | |
const onScriptLoad = () => { | |
console.log('nearest color script loaded'); |
<?php | |
/** | |
* Heavily borrowed from: http://xplus3.net/2010/08/08/filtering-on-a-non-standard-database-field-with-wordpress/ | |
**/ | |
class CoordinatesTable extends DB { | |
protected $db_option = "coordinates_db"; |
<?php | |
/** | |
* This adds back an option to resend the admin new order email from the order edit screen that was removed in WooCommerce 3.2 | |
*/ | |
/** | |
* Filter to add a new menu to the dropdown | |
* | |
* @param array $actions | |
* @return array |
<? | |
// | |
// [ BUY BTC & ETH DAILY ON BITSTAMP ] | |
// by @levelsio | |
// | |
// 2017-08-23 | |
// | |
// 1) buy $40/day BTC | |
// 2) buy $10/day ETH | |
// |
<?php // do not copy this line | |
/** | |
* add_new_topic_hooks will add a new webhook topic hook. | |
* @param array $topic_hooks Esxisting topic hooks. | |
*/ | |
function add_new_topic_hooks( $topic_hooks ) { | |
// Array that has the topic as resource.event with arrays of actions that call that topic. |
Using the REST API to upload a file to WordPress is
quite simple. All you need is to send the file in a
POST
-Request to the wp/v2/media
route.
There are two ways of sending a file. The first method simply sends the file in the body of the request. The following PHP script shows the basic principle: