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: Project Access Control | |
* Description: When a post of post type "project" is displayed and the current user is not logged-in, they are redirected to the login form. | |
* Version: 1 | |
* Author: nikolov.tmw | |
* Author URI: http://paiyakdev.com/ | |
* License: GPL2 | |
*/ | |
/* |
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: Multiple Roles per User | |
* Description: Allows anyone who can edit users to set multiple roles per user. In a default WordPress environment that wouldn't have much of an effect, since the user would have the privileges of the top-privileged role that you assign to him. But if you have custom roles with custom privileges, this might be helpful. | |
* Version: 1 | |
* Author: nikolov.tmw | |
* Author URI: http://paiyakdev.com/ | |
* License: GPL2 | |
*/ | |
/* |
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 this code to the .htaccess in your root WordPress directory | |
# If your wordpress files are in a sub-directory, just change the RewriteBase | |
# to something like: | |
# RewriteBase /wordpress/ | |
# If your wordpress files are in a sub-directory called "wordpress" | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
# Redirect to home page upon log-out |
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_action( 'init', 'register_faq_post_type' ); | |
function register_faq_post_type() { | |
register_post_type( 'faq', | |
array( | |
'labels' => array( | |
'name' => 'Frequently Asked Questions', | |
'menu_name' => 'FAQ Manager', | |
'singular_name' => 'Question', |
NewerOlder