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
#!/bin/sh | |
# By Mike Jolley, based on work by Barry Kooij ;) | |
# License: GPL v3 | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. |
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 | |
function add_custom_query_vars($vars) { | |
$vars[] = "past_events"; | |
return $vars; | |
} | |
// hook add_query_vars function into query_vars | |
add_filter('query_vars', 'add_custom_query_vars'); |
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 | |
function customQueryVar($vars) { | |
$vars[] = "year_filter"; | |
return $vars; | |
} | |
// hook add_query_vars function into query_vars | |
add_filter('query_vars', 'customQueryVar'); |
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 | |
function add_custom_query_vars($vars) { | |
$vars[] = "sociallogin"; | |
return $vars; | |
} | |
// hook add_query_vars function into query_vars | |
add_filter('query_vars', 'add_custom_query_vars'); |
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 | |
global $current_user; // Use global | |
get_currentuserinfo(); // Make sure global is set, if not set it. | |
if ( user_can( $current_user, "subscriber" ) ) { | |
// Disable admin bar for subscribers | |
show_admin_bar(false); |