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 | |
| function my_filter_acf_pro_license_option( $pre ) { | |
| if ( ! defined( 'ACF_PRO_LICENSE' ) || empty( ACF_PRO_LICENSE ) ) { | |
| return $pre; | |
| } | |
| $data = array( | |
| 'key' => ACF_PRO_LICENSE, | |
| 'url' => home_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
| <script> | |
| function my_remove_utms() { | |
| if ( window.location.search.indexOf( 'utm_' ) != -1 && history.replaceState ) { | |
| var clean_search = window.location.search.replace( /utm_[^&]+&?/g, '' ).replace( /&$/, '' ).replace( /^\?$/, '' ); | |
| history.replaceState( {}, '', window.location.pathname + clean_search + window.location.hash ); | |
| } | |
| } | |
| if ( -1 === document.cookie.indexOf( 'my_admin=1' ) ) { | |
| (function( i, s, o, g, r, a, m ) { |
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 this file to `wp-content/mu-plugins/` | |
| */ | |
| add_filter( 'igp_google_maps_api_key', 'my_igp_google_maps_api_key' ); | |
| function my_igp_google_maps_api_key( $key ) { | |
| return 'XXXXXX'; // replace with your key | |
| } |
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 DeliciousBrains\Admin; | |
| use DeliciousBrains\DBI; | |
| class ACF { | |
| public function init() { | |
| add_filter( 'acf/settings/save_json', array( $this, 'get_local_json_path' ) ); |
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_filter( 'wpmdb_transfers_requests_options', function ( $options ) { | |
| $hooks = new Requests_Hooks(); | |
| $hooks->register( 'curl.before_send', function ( $handle ) { | |
| curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, 0 ); | |
| curl_setopt( $handle, CURLOPT_TIMEOUT, 0 ); | |
| } ); |
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_filter( 'ninja_forms_uploads_temp_file_delete_time', 'my_ninja_forms_uploads_temp_file_delete_time' ); | |
| function my_ninja_forms_uploads_temp_file_delete_time( $time ) { | |
| return WEEK_IN_SECONDS; | |
| } |
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 | |
| // Always use PayPal test mode when on dev or staging | |
| // The standard PayPal gateway controls IPN and other URLs even if using PayPal Express gateway. | |
| add_filter( 'option_woocommerce_paypal_settings', function( $value ) { | |
| // Maybe make this a better conditional with speciic environment constants | |
| $value['testmode'] = defined( 'WP_DEBUG' ) && WP_DEBUG ? 'yes' : 'no'; | |
| return $value; | |
| }); |
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
| #!/usr/bin/env bash | |
| cd `dirname $0`/../ | |
| rm -rf ./hooks | |
| mkdir ./hooks | |
| for d in ./src/*/ ; do | |
| PLUGIN=$(basename "$d"); | |
| if [ "common" != $PLUGIN ]; |
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 | |
| function my_igp_date_format( $format ) { | |
| return 'd. F Y | H:i Uhr'; | |
| } | |
| add_filter( 'igp_date_format', 'my_igp_date_format' ); |
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_filter( 'wpmdb_preserved_options', 'my_wpmdb_preserved_options' ); | |
| function my_wpmdb_preserved_options( $options ) { | |
| $options[] = 'blog_public'; | |
| return $options; | |
| } |