View tos-pp-bp-registration.php
<?php
/*
Plugin Name: Add TOS/PP checkbox To BuddyPress Registration
Plugin URI: https://premium.wpmudev.org/
Description: Inserts text links and checkbox to BuddyPress regtration form to confirm acceptance of terms and privacy policy prior to registration. Submit button is disabled if check box is not selected. To install on your site, upload to wp-content/mu-plugins/
Author: James Morris @ WPMUDEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/
add_action('bp_before_registration_submit_buttons', 'bph_show_privacy_link');
View getcleanfeed.php
<?php
/*
Script Name: getcleanfeed
Plugin URI: https://premium.wpmudev.org/
Description: Removes invalid line breaks and returns from source feed
Author: James Morris @ WPMUDEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/
$ch = curl_init();
View force_mp_variation_modal_full_width.php
<?php
/* The following code forces the WPMU DEV MarketPress plugin variation
* modal (popup) to use 100% of the active window width. This works for
* both desktop and mobile. The code also applies custom CSS that makes
* the product image take 100% width of the parent container. The code
* applies to both the Store homepage and Products page. This should be
* added to the active theme's functions.php AFTER MarketPress has been
* installed and activated.
*/
add_action( 'wp_footer', function(){
View realIP.php
/*
There are times when you need to find out of the IP address your domain maps to in DNS is the same
as the IP address of your web server's outgoing interface. This is particularly useful when dealing
with APIs such as eNOM. The following just performs a simple query agains http://ipecho.net/plain to
optain your server's outgoing IP. This can be modified with any number of similar services.
*/
$realIP = file_get_contents("http://ipecho.net/plain");
echo $realIP;
View wpmudev-debug-tools.php
<?php
/*
Plugin Name: WPMU DEV Tools
Plugin URI: https://premium.wpmudev.org/
Version: 0.5.2
Description: Shows diagnostic information about the current server environment as well as tests cURL connectivity to <a href="https://premium.wpmudev.org" target="_blank">premium.wpmudev.org</a> and displays the debug.log. <br /><strong>Notice</strong>: This plugin utilizes <a href="http://php.net/manual/en/function.shell-exec.php" target="_blank">shell_exec()</a>. This must be enabled in PHP for full functionality.
Author: WPMU DEV
Author URI: https://premium.wpmudev.org/
License: GPLv2 or later
*/
View remove-admin-notices.php
<?php
// Removes Notices from WordPress Admin pages.
function remove_admin_notices() {
remove_all_actions( 'admin_notices' );
echo "<style>.wp-admin .notice {display:none !important;}</style>";
}
add_action( 'admin_head', 'remove_admin_notices' );
View before-after-content.php
<?php
// This particular example adds Hustle Social Sharing shortcode after content without editing template files on single posts/pages only.
function jmorris_before_after($content) {
$beforecontent = '';
if ( is_single() ) {
$aftercontent = '[wd_hustle_ss id="jmorris-online"]';
} else {
$aftercontent = '';
}
$fullcontent = $beforecontent . $content . $aftercontent;
View tools.php
<?php
/**
* Script Name: WPMU DEV SLS Diagnostics
* Script URI: https://premium.wpmudev.org/
* Description: Misc diagnostic tools used by WPMU DEV SLS Tech Support
* Author: WPMU DEV
* Version: 0.5.2
* Author URI: https://premium.wpmudev.org/
*
*/
View geotag-wp.php
<?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)
*/
View wrap-text-with-html-jquery.js
<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>