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
$(".videobox").click(function() { | |
/* html | |
* <div class="videobox" id="youtube-id"> | |
* <img src="previewimage.jpg" /> | |
* </div> | |
*/ | |
console.log('clicked' + $(this).attr('id')); |
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
$("#fancybox-youtube-link").click(function(e) { | |
e.preventDefault(); | |
var url = $(this).attr('href'); | |
$.fancybox({ | |
'width': 660, | |
'height': 380, | |
'href' : this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'), | |
'type': 'iframe' // see this? | |
}); | |
}); |
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
$(".vimeobox").click(function(e) { | |
e.preventDefault(); | |
var id = $(this).attr('id'); | |
var title = 0; // hide vimeo title | |
var byline = 0; // hide byline | |
var portrait = 0; // hide thumbnail portrait | |
var autoplay = 1; | |
var url = "http://player.vimeo.com/video/" + id + | |
"?title=" + title + | |
"&byline="+ byline + |
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
jQuery(document).ready(function($) { | |
/* | |
* <textarea id="custom_excerpt">Text</textarea> | |
* <p id="error"></p> | |
*/ | |
$('#custom_excerpt').keyup(function() { | |
// get the limit from the maxlength attribute | |
var limit = 100; | |
// get the current text inside the textarea |
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
add_action('restrict_manage_posts','restrict_menu_post'); | |
function restrict_menu_post() { | |
global $typenow; | |
global $wp_query; | |
if ($typenow=='menu') { | |
$taxonomy = 'menutype'; | |
$menu_taxonomy = get_taxonomy($taxonomy); | |
wp_dropdown_categories(array( | |
'show_option_all' => __("Show All {$menu_taxonomy->label}"), | |
'taxonomy' => $taxonomy, |
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
# BEGIN WordPress | |
Options +FollowSymLinks | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase /your-site/ | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /your-site/index.php [L] | |
</IfModule> |
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
function remove_menus () { | |
global $menu; | |
if( (current_user_can('install_themes')) ) { | |
$restricted = array(); } // check if admin and hide nothing | |
else { // for all other users | |
if ($current_user->user_level < 10) | |
$restricted = array(__('Dashboard'), __('Posts'), __('Media'), __('Links'), __('Pages'), __('Appearance'), __('Tools'), __('Users'), __('Settings'), __('Comments'), __('Plugins')); // this removes a lot! Just delete the ones you want to keep showing | |
end ($menu); |
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
/* less file */ | |
.my_mixin { | |
display: block; | |
text-indent: -9999em; | |
background-color: transparent; | |
background-position: 0 0; | |
background-repeat: no-repeat; | |
overflow: hidden; | |
} | |
h1 a, .pagination em, .cog a { |
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
<IfModule mod_rewrite.c> | |
Options +FollowSymLinks | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php?/$1 [L] | |
</IfModule> | |
<IfModule !mod_rewrite.c> | |
# If we don't have mod_rewrite installed, all 404's |
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
<Directory "/Users/your-username/Sites/"> | |
Options Indexes MultiViews FollowSymlinks | |
AllowOverride all | |
Order allow,deny | |
Allow from all | |
</Directory> |
OlderNewer