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
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js?ver=1.7.1"></script> | |
<script src="js/jquery.slider.js"></script> | |
<script src="js/theme.js"></script> |
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 | |
// Add action to enqueue scripts | |
add_action('wp_enqueue_scripts','theme_javascript'); | |
// Function to load theme javascript | |
function theme_javascript() { | |
// Register slider script |
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 | |
// Add action to wp_head | |
add_action('wp_head','move_admin_bar_bottom'); | |
// Move admin bar to bottom of page | |
function move_admin_bar_bottom() { | |
if(is_user_logged_in()) { | |
echo " |
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 | |
// Add Action : Unregister default WordPress widgets | |
add_action('widgets_init', 'unregister_default_wp_widgets', 1); | |
// Unregister default WordPress widgets | |
function unregister_default_wp_widgets() { | |
unregister_widget('WP_Widget_Archives'); | |
unregister_widget('WP_Widget_Calendar'); | |
unregister_widget('WP_Widget_Categories'); |
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 | |
// Filter JPEG compression | |
add_filter('jpeg_quality', function($arg) { return 100; }); | |
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 check_user_role($roles,$user_id=NULL) { | |
// Get user by ID, else get current user | |
if ($user_id) | |
$user = get_userdata($user_id); | |
else | |
$user = wp_get_current_user(); | |
// No user found, return |