Snippets frequently used with Sage
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 | |
/* | |
First, create API Projects at https://www.vimexx.nl/api | |
Second, replace all vars between [] with credentials from previous step! | |
Third, see below; | |
$vimexx = (new \Vimexx([account], 'wefact')); | |
var_export($vimexx->post('/domains')); | |
var_dump($vimexx->client('whmcs')->post('/domain/dns', ['sld' => 'achterstraat', 'tld' => 'com'])); | |
var_export($vimexx->client('wefact')->post('/domains')); | |
*/ |
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 | |
/* https://wordpress.org/plugins/media-file-renamer/ */ | |
add_filter( 'mfrh_new_filename', 'my_filter_filename', 10, 3 ); | |
function my_filter_filename( $filename, $old, $post ) { | |
$sanitized_filename = remove_accents( $filename ); // Convert to ASCII |