Skip to content

Instantly share code, notes, and snippets.

@kagg-design
kagg-design / remote-post-with-files.php
Created April 7, 2021 15:47
Example of how to send files to the remote server.
$boundary = str_repeat( '-', 24 ) . wp_generate_password( 16 );
$headers = array(
'content-type' => 'multipart/form-data; boundary=' . $boundary,
);
if ( ! isset( $files['path'] ) ) {
$error_message = 'Invalid arguments';
return array( $success, $error_message, $word_count, $individual_word_count );
}
@artikus11
artikus11 / rank-math-cleanup.php
Last active February 2, 2024 18:30
Rank Math SEO plugin cleanup
<?php
/**
* Plugin Name: Rank Math SEO plugin cleanup
* Description: A cached translation override for WordPress.
* Author: Artem Abramovich
* Plugin URI: https://gist.github.com/artikus11/0d7a52273bd8bdc85f0d3010f156cd5f
*
* @link https://rankmath.com/kb/filters-hooks-api-developer/
*
* @see https://gist.github.com/timbowen/c5c00667c4c48f8ec3f5706b686d6f00