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 | |
/** | |
* @param string $redirect_to URL to redirect to. | |
* @param string $request URL the user is coming from. | |
* @param object $user Logged user's data. | |
* @return string | |
*/ | |
function ja_login_redirect( $redirect_to, $request, $user ) { |
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
sudo apt-get update | |
sudo apt-get install apache2 | |
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql | |
sudo mysql_install_db | |
sudo /usr/bin/mysql_secure_installation | |
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt | |
sudo service apache2 restart |
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('save_post', 'jay_check_thumbnail'); | |
add_action('admin_notices', 'jay_thumbnail_error'); | |
function jay_check_thumbnail($post_id) { | |
// change to any custom post type | |
if(get_post_type($post_id) != 'post') | |
return; |
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 | |
function jay_query_shortcode($atts) { | |
// Example usage of this shortcode: | |
// [loop the_query="showposts=100&post_type=page&post_parent=453"] | |
// Defaults | |
extract(shortcode_atts(array( | |
"the_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
sudo adduser <username> www-data | |
sudo chown -R www-data:www-data /var/www | |
sudo chmod -R g+rw /var/www |
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
sudo add-apt-repository ppa:fossfreedom/indicator-sysmonitor | |
sudo apt-get update | |
sudo apt-get install indicator-sysmonitor |
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 | |
// Use the shortcode [jay-login-form] to embed the login form | |
// Create shortcode | |
function jay_add_shortcodes() { | |
add_shortcode( 'jay-login-form', 'jay_login_form_shortcode' ); | |
} | |
// Shortcode callback |
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 | |
// Form function | |
$default = array( 'recent_post_count' => '2' ); | |
$instance = wp_parse_args( (array) $instance, $default ); |
OlderNewer