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 | |
register_post_type('video', array( 'label' => 'Video','description' => '','public' => true,'show_ui' => true,'show_in_menu' => true,'capability_type' => 'post','hierarchical' => true,'rewrite' => array('slug' => 'video'),'query_var' => true,'has_archive' => true,'exclude_from_search' => false,'supports' => array('title','custom-fields','author',),'labels' => array ( | |
'name' => 'Video', | |
'singular_name' => 'Video', | |
'menu_name' => 'Video', | |
'add_new' => 'Add Video', | |
'add_new_item' => 'Add New Video', | |
'edit' => 'Edit', | |
'edit_item' => 'Edit Video', | |
'new_item' => 'New Video', |
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 | |
/* | |
to begin, please create a table named [prefix]votelog e.g. wp_votelog | |
with the following three fields: | |
id : auto_increment, BIGINT, primary_key | |
voter_id: BIGINT | |
post_name: TEXT | |
*/ |
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 | |
/* paste this to functions.php or include */ | |
register_taxonomy('album','attachment', | |
array( | |
'hierarchical' => true, | |
'label' => 'Albums', | |
'show_ui' => true, | |
'show_admin_column' => true, | |
'update_count_callback' => 'fix_album_count', |
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
Options +FollowSymlinks | |
RewriteEngine on | |
RewriteCond %{REQUEST_URI} !/maintenance.html$ | |
RewriteCond %{REMOTE_HOST} !^888\.888\.888\.888 | |
RewriteRule $ /maintenance.html [R=302,L] |
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 | |
// Originally by Andrew Moore | |
// Src: http://stackoverflow.com/questions/4795385/how-do-you-use-bcrypt-for-hashing-passwords-in-php/6337021#6337021 | |
// | |
// Heavily modified by Robert Kosek, from data at php.net/crypt | |
class Bcrypt { | |
private $rounds; | |
private $prefix; |
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 | |
require_once('attachment.class.php'); | |
/** | |
* Fast Mime Mail parser Class using PHP's MailParse Extension | |
* @author [email protected] | |
* @url http://www.fijiwebdesign.com/ | |
* @license http://creativecommons.org/licenses/by-sa/3.0/us/ | |
* @version $Id$ |
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
<a href="javascript:void(0)" onclick="enlargex()" id="zoomtab">+ Enlarge</a> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
function enlargex(){ | |
if ($('body').css('transform') == 'scale(1.2)') { | |
$('body').css('transform','scale(1)'); | |
$('body').css('-webkit-transform','scale(1)'); | |
$('body').css('-webkit-transform-origin','0 0'); | |
$('body').css('-moz-transform','scale(1)'); |
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 | |
/* | |
* File: SimpleImage.php | |
* Author: Simon Jarvis | |
* Modified by: Juanita Vyatri (@vyatri) | |
* Copyright: 2006 Simon Jarvis | |
* Date: 08/11/06 | |
* Last modified: 08/11/10 | |
* Link: http://www.white-hat-web-design.co.uk/articles/php-image-resizing.php | |
* |
NewerOlder