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 | |
| //Plugin Name: [concept] Protect users in one role from users in another | |
| //Description: Users in custom faux-admin role 'site administrator' cannot modify default admins | |
| add_filter( 'map_meta_cap', 'prevent_edit_of_primary_user', 10, 4 ); | |
| function prevent_edit_of_primary_user( $caps, $cap, $user_id, $args ) { | |
| if ( ! is_user_logged_in() ) return $caps; |
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 | |
| /* | |
| Plugin Name: Network-Wide Tips | |
| Description: Save multiple notices, only activate one at a time. Displayed across WP Network. | |
| Author: Kailey Lampert | |
| Author: http://kaileylampert.com | |
| Version: 1.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 | |
| $posts = multisite_latest_post( array( | |
| "how_many"=>10, | |
| "how_long_days"=>30, | |
| "how_many_words"=>50, | |
| "more_text"=>"[...]", | |
| "remove_html"=>true, | |
| "sort_by"=>"post_date", | |
| // if paginating: | |
| "paginate"=>true, |
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 fs_login($user, $pass) { | |
| $uname = $user; | |
| $pass1 = $pass; | |
| $credentials = array( | |
| 'user_login' => $user, | |
| 'user_password' => $pass, | |
| 'remember' => true | |
| ); | |
| $user = wp_signon($credentials, false); | |
| if( $user->ID ){ |
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( 'wpmu_signup_user_notification', 'dk_wpmu_signup_user_notification', 10, 4 ); | |
| /** | |
| * Problem: WordPress MultiSite sends user signup mails from the main site. This is a problem when using domain mapping functionality as the sender is not the same domain as expected when creating a new user from a blog with another domain. | |
| * Solution: Change the default user notification mail from using the main network admin_email and site_name to the blog admin_email & blogname | |
| * | |
| * @author Daan Kortenbach | |
| * @link http://daankortenbach.nl/wordpress/filter-wpmu_signup_user_notification/ | |
| */ | |
| function dk_wpmu_signup_user_notification($user, $user_email, $key, $meta = '') { |
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 | |
| /** | |
| * Handles most of the work. | |
| * | |
| * @package GSA for WordPress Multisite | |
| * @author Simon Wheatley | |
| **/ | |
| class GSAForWPMS extends GSAForWPMS_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
| url.rewrite-once = ( | |
| "^/(.*/)?files/$" => "/index.php", | |
| "^/(.*/)?files/(.*)" => "/wp-content/blogs.php?file=$2", | |
| "^(/wp-admin/.*)" => "$1", | |
| "^/([_0-9a-zA-Z-]+/)?(wp-.*)" => "/$2", | |
| "^/([_0-9a-zA-Z-]+/)?(.*\.php)" => "/$2", | |
| "^/(.*)/?$" => "/index.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
| <?php | |
| /** | |
| * TC Framework Base | |
| * | |
| * This is an abstract class that creates a standard base for all TC projects. | |
| * | |
| * All options are stored under two WordPress options, one for the standard options | |
| * and another for the multisite options (if the theme/plugin has need for these). | |
| * | |
| * @author Amereservant <amereservant@gmail.com> |
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 the following to your functions file or similar | |
| define( 'FUBLO_GF_PROFILE', 1 ); // define the ID number of your profile form. | |
| // ============================================================= PROFILE EDITING | |
| /** | |
| * These are the user metadata fields, with their names and the data about them. |