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
function custom_prefix_warn_about_old_refunds_js() { | |
if ( ! isset( $_GET['prevent_accidental_refunds_js'] ) ) { | |
return false; | |
} | |
header('Content-Type: application/javascript'); | |
?> |
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
function my_prefix_hide_everything_if_javascript_disabled() { | |
?> | |
<noscript id="javascript_test"> | |
<style type="text/css"> | |
body > * {display:none!important;} | |
#javascript_test{ | |
display:block!important; | |
} | |
</style> | |
<div class="noscriptmsg"> |
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
function get_dir_and_filename_of_active_plugin( $plugin_filename = 'akismet.php' ) { | |
$plugin_dir_and_filename = false; | |
$active_plugins = get_option( 'active_plugins' ); | |
foreach ( $active_plugins as $active_plugin ) { | |
if ( false !== strpos( $active_plugin, $plugin_filename ) ) { | |
$plugin_dir_and_filename = $active_plugin; | |
break; | |
} | |
} | |
return $plugin_dir_and_filename; |
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
#!/bin/bash | |
FILES_CHANGED=$(find /var/www -type f -mmin -$((60*24)) -printf '%TY-%Tm-%Td %TT %p\n' | sort -r) | |
if [ !$FILES_CHANGED ] | |
then | |
curl -s --user 'api:MAILGUN_API_KEY' \ | |
https://api.mailgun.net/v3/YOURMAILGUNDOMAIN/messages \ | |
-F from='Name of your server<[email protected]>' \ | |
-F [email protected] \ |
OlderNewer