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 | |
| $current_url = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; | |
| if ( $current_url == 'http://example.com/example' ) { | |
| // DO YOUR THING HERE, THEN REDIRECT | |
| wp_redirect( 'http://example.com' ) ); | |
| exit; | |
| } | |
| ?> |
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
| $nationals = array( | |
| 'Afghan', | |
| 'Albanian', | |
| 'Algerian', | |
| 'American', | |
| 'Andorran', | |
| 'Angolan', | |
| 'Antiguans', | |
| 'Argentinean', | |
| 'Armenian', |
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
| //How to edit a user profile on the front end? | |
| //http://wordpress.stackexchange.com/questions/9775/how-to-edit-a-user-profile-on-the-front-end | |
| //Forcing nickname as display_name in custom edit profile template | |
| //http://wordpress.stackexchange.com/questions/35403/forcing-nickname-as-display-name-in-custom-edit-profile-template | |
| /////// | |
| <?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 | |
| class File_Upload | |
| { | |
| /** | |
| * Index key from upload form | |
| * @var string | |
| */ | |
| public $index_key = ''; | |
| /** |
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 | |
| if ($_FILES['userfile']['size'] > 5 * 1024 * 1024) { | |
| $error = 'File is too large.'; | |
| @unlink($_FILES['userfile']['tmp_name']) || $error .= $php_errormsg; | |
| } |
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 | |
| /** | |
| * Converts the advanced search output into acceptable input for findBy(). | |
| * | |
| * @see Omeka_Db_Table::findBy() | |
| * @param array $query HTTP query string array | |
| * @return array Array of findBy() parameters | |
| */ | |
| function neatlinetime_convert_search_filters($query) { |
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 | |
| /** | |
| * Front to the WordPress application. This file doesn't do anything, but loads | |
| * wp-blog-header.php which does and tells WordPress to load the theme. | |
| * | |
| * @package WordPress | |
| */ | |
| /** | |
| * Tells WordPress to load the WordPress theme and output it. |
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 filter_message_button_link( $link ) { | |
| $link = wp_nonce_url( bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r=' . bp_core_get_username( bp_get_member_user_id() ) ); | |
| return $link; | |
| } | |
| function display_private_message_button() { | |
| if( bp_get_member_user_id() != bp_loggedin_user_id() ) { | |
| bp_send_message_button(); | |
| add_filter('bp_get_send_private_message_link', 'filter_message_button_link', 1, 1 ); |