This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
// Reduce Snapshot Table Query Chunks | |
define('SNAPSHOT_TABLESET_CHUNK_SIZE', 100); | |
// Reduce Snapshot File Chunks | |
define('SNAPSHOT_FILESET_CHUNK_SIZE', 10); | |
// DEV Plugins w/o DEV Dashboard | |
define( 'WPMUDEV_APIKEY', 'YOUR-API-KEY'); | |
//Enable conditional debug mode in wordpress: |
This file contains 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
<!DOCTYPE html> | |
<head> | |
<title>Info</title> | |
<style type="text/css" media="screen"> | |
body{ | |
margin:0; | |
padding:0; | |
text-align:left; | |
} | |
.info { |
This file contains 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 | |
/* | |
Plugin Name: Simple Login Redirect | |
Plugin URI: https://premium.wpmudev.org/support/ | |
Description: A simple mu-plugin that redirects users to their subsite on login. | |
Version: 0.0.1 | |
Author: James Morris - WPMU DEV | |
Author URI: https://premium.wpmudev.org/profile/jrmorris77 | |
Network: true | |
*/ |
This file contains 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 | |
// This changes the color of the login page | |
function hook_css() { | |
?> | |
<style> | |
body.login { | |
background: #006699; | |
} | |
</style> | |
<?php |
This file contains 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_action('admin_head', 'disable_notice'); | |
function disable_notice() { | |
echo '<style> | |
.wp-core-ui .notice.is-dismissible { | |
display: none; | |
} | |
</style>'; | |
} |
This file contains 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 | |
if (isDEVAvailible('http://premium.wpmudev.org')) | |
{ | |
echo "<h1>premium.wpmudev.org is Up and running!</h1>"; | |
} | |
else | |
{ | |
echo "<h1>Woops, nothing found at premium.wpmudev.org.</h1>"; | |
} |
This file contains 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> | |
//Add HTML elements around text strings inside of a parent element. | |
jQuery("div.feature-text:contains('products')").html(function(_, html) { | |
return html.split('products').join("<a class='a'>products</a>"); | |
}); | |
jQuery("div.feature-text:contains('100')").html(function(_, html) { | |
return html.split('100').join("<a class='b'>100</a>"); | |
}); | |
</script> |
This file contains 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 | |
/* | |
Plugin Name: Geotag my posts | |
Description: Allows you to add location context to your posts, pages or custom post types.<br />Activate the Add-on and then select which post-types you want to geotag. After this you will find a new metabox in the post editor where you can enter an address. <br>To display a map with all geo-tagged posts use the shortcode <code>[agm_gwp_geocoded_posts]</code> | |
Example: [agm_gwp_geocoded_posts] | |
Plugin URI: http://premium.wpmudev.org/project/wordpress-google-maps-plugin | |
Version: 1.0 | |
Author: Ve Bailovity (Incsub) | |
*/ |
OlderNewer