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 | |
class StophaMultipleAuthentication | |
{ | |
// declare your active directory domain here | |
CONST domain = 'your domain'; | |
/** | |
* Class Construct | |
* |
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 | |
/** | |
* Check for City Email | |
* | |
* If a user tries to register with a city email address an error is returned. | |
* | |
* @author Nate Jacobs | |
* @link http://gist.github.com/1257325 | |
*/ | |
add_action( 'registration_errors', 'check_user_email',10, 3 ); |
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 | |
/** | |
* Last Post by Author | |
* | |
* Must be used in conjunction with the User Access Expiration Plugin | |
* http://wordpress.org/extend/plugins/user-access-expiration/ | |
* | |
* Get each users's most recent post as determined by post date. | |
* Disable the user's access if his/her last post is more than a certain |
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 part goes in your functions.php */ | |
/** | |
* Get Some Posts | |
* | |
* Use get_posts to get an array of posts matching a set of criteria. | |
* The category_name is passed to the function. | |
* get_posts uses the same parameters as WP_query. See the Codex for the full details.. | |
* http://codex.wordpress.org/Template_Tags/get_posts |
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 | |
/** | |
* Updated User Profile Notification | |
* | |
* Every time a user updates his/her profile an email is sent | |
* to the site administrator. | |
* | |
* @author Nate Jacobs | |
* @link https://gist.github.com/1286583 | |
*/ |
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: Specific User Notification | |
Plugin URI: https://gist.github.com/1306710 | |
Description: Pick the specific users to send an email to notifying them about a new post. | |
Version: 0.2 | |
Author: Nate Jacobs | |
Author URI: http://natejacobs.org | |
License: GPLv2 or later |
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 | |
/** | |
* List Users Alphabetically | |
* | |
* Create a list of all authors of a WordPress blog. | |
* Names are grouped by first name with a single letter | |
* as a header character. | |
* | |
* Call the function with <?php ngtj_list_users_alphabetically(); ?> | |
* where you want the list to appear. |
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: Cactus Brick Flickr Widget | |
Plugin URI: http://cactusbrick.org | |
Description: Grab photos from Flickr | |
Version: 1.0 | |
Author: Nate Jacobs | |
Author URI: http://natejacobs.org | |
License: GPLv2 or later | |
*/ |
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 | |
/** | |
* Hide Default Registration | |
* | |
* This is for use with the TNG User Meta plugin: https://github.com/HeatherFeuer/tng_user_meta | |
* Function 1 will redirect the user to the custom registration page when they visit /wp-login.php?action=register | |
* Function 2 will hide all the links to the default register page. Even if the user does get there they will be redirected. | |
* | |
* @author Nate Jacobs |
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
add_filter( 'posts_request', function($input){ | |
var_dump($input); | |
return $input; | |
}); |
OlderNewer