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
### Keybase proof | |
I hereby claim: | |
* I am kwcjr on github. | |
* I am kwcjr (https://keybase.io/kwcjr) on keybase. | |
* I have a public key whose fingerprint is B2ED 100D 4C1F 4EDF 6E4F 461C 4E1A CB3A 3C62 3911 | |
To claim this, I am signing this object: |
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
add_filter( 'admin_notices', 'my_remote_admin_notice' ); | |
add_filter( 'network_admin_notices', 'my_remote_admin_notice' ); | |
function my_remote_admin_notice() { | |
$notice_url = 'INSERT_URL_HERE'; | |
$message = json_decode( wp_remote_retrieve_body( wp_remote_get( $notice_url ) ), true)['content']['rendered']; | |
if( is_wp_error( $message ) ) { | |
return false; |
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_woocommerce_admin_notices() | |
{ | |
// Test to see if WooCommerce is active (including network activated). | |
$plugin_path = trailingslashit( WP_PLUGIN_DIR ) . 'woocommerce/woocommerce.php'; | |
if ( | |
in_array( $plugin_path, wp_get_active_and_valid_plugins() ) | |
|| in_array( $plugin_path, wp_get_active_network_plugins() ) | |
) { | |
do_action( 'admin_notices' ); |
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
ob_start(); // start capturing output. | |
WC_Admin_Notices::template_file_check_notice(); // Check for a notice highlighting bad template files. | |
$notice = ob_get_contents(); // the actions output will now be stored in the variable as a string! | |
ob_end_clean(); // never forget this or you will keep capturing output. | |
echo $notice; // output to screen or do something else with it. |
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
/** | |
* Hide plugin from WordPress Admin. | |
* | |
* @howto: | |
* - Change plugin slug to what you want within `$hidearr` separated by comma. | |
* eg. $hidearr = array('seo-by-rank-math/rank-math.php', users.php ); | |
* | |
* - Change `$submenu['plugin-slug'][0]` to correct plugin slug. | |
*/ |
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
/** | |
* Purge LiteSpeed Cache after updates. | |
* | |
* This snippet will check if LS plugin is activated & then Purge all Cache | |
* after any Core, Theme or Plugin Installation, Update or rollback. Then it | |
* will email the results to the given address on line 35. Disable by commenting out | |
* line 39. | |
* | |
* @howto: Update line 35 with your email address and save the code snippet to Execute on Child Sites. | |
* |
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
/** | |
* Purge LiteSpeed Cache after updates. | |
* | |
* This snippet will check if LS plugin is activated & then Purge all Cache | |
* after any Core, Theme or Plugin Installation, Update or rollback. | |
* | |
* @snippetType: Execute on Child Sites | |
*/ | |
function my_upgrade_function( $upgrader_object, $options ) { | |
// Purge all LS Cache. |
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
/** | |
* Delete WP readme.html file remotely. | |
* | |
* This snippet will delete the readme.html file from your Child Site root dir. | |
* | |
* @snippetType: Return info from Child Site. | |
*/ | |
// Load in WP Core files we need. | |
include_once(ABSPATH . WPINC . '/functions.php'); | |
include_once(ABSPATH . WPINC . '/plugins.php'); |
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
<!-- WordFence Data --> | |
<div class="page-break"></div> | |
<div style="padding:30px;"> | |
<div style="padding:30px;"> | |
<h2><?php echo __( 'WordFence', 'mainwp-pro-reports-extension' ); ?></h2> | |
<h3><?php echo __( 'Total Scan Count: ', 'mainwp-pro-reports-extension' ); ?>[wordfence.scan.count]</h3> | |
<table> | |
<thead> | |
<tr> | |
<th><?php echo __( 'Scanned on', 'mainwp-pro-reports-extension' ); ?></th> |
OlderNewer