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
/** | |
* Clone Elements by Alexander Conroy | |
* Copyright 2012 Esotech Inc. | |
* MIT License | |
* http://opensource.org/licenses/MIT | |
*/ | |
$(document).on('click', '.clone', function() { | |
// This should be a generic class you give to the element you want to clone. The clone button should be inside the element. | |
var clone = $(this).closest('.skeleton') | |
var newClone = clone.clone(); |
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
/** | |
* Excerpt by Alexander Conroy | |
* Copyright 2012 Esotech Inc. | |
* MIT License | |
* http://opensource.org/licenses/MIT | |
*/ | |
<?php | |
if(!function_exists( 'excerpt' ) ): | |
function excerpt( $size = '165', $content = NULL, $echo = TRUE, $ellipsis = TRUE, $wrap = TRUE ) { | |
if(!$content): |
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 | |
/** | |
* SimpulMeta by Alexander Conroy | |
* Copyright 2012 Esotech Inc. | |
* MIT License | |
* http://opensource.org/licenses/MIT | |
* | |
* args = array() | |
* Valid Values: | |
* post_type - Which post type to attach meta to. |
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 | |
/** | |
* Thumb by Alexander Conroy | |
* Copyright 2012 Esotech Inc. | |
* MIT License | |
* http://opensource.org/licenses/MIT | |
*/ | |
$thumb = get_template_directory_uri() . "/includes/timthumb.php?"; | |
if(!function_exists( 'thumb' ) ): | |
function thumb( $args = array(), $echo = true) { |
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('wp_enqueue_scripts', 'register_my_scripts'); | |
if(!function_exists('register_my_scripts')): | |
function register_my_scripts() { | |
//wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer ); | |
wp_enqueue_script('scripts', get_template_directory_uri() . '/js/scripts.js', array('jquery') ); | |
//wp_enqueue_style( $handle, $src, $deps, $ver, $media ); | |
wp_enqueue_style( 'style', get_template_directory_uri() . '/style.css', false, false, 'screen' ); | |
} |
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
var original_send_to_editor = ""; | |
var modified_send_to_editor = ""; | |
var formfield = ''; | |
var hrefurl = ''; | |
jQuery(document).ready( function() { | |
original_send_to_editor = window.send_to_editor; | |
modified_send_to_editor = function(html) { |
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 insert_attachment($file_handler,$post_id,$setthumb='false') { | |
// check to make sure its a successful upload | |
if ($_FILES[$file_handler]['error'] !== UPLOAD_ERR_OK) __return_false(); | |
require_once(ABSPATH . "wp-admin" . '/includes/image.php'); | |
require_once(ABSPATH . "wp-admin" . '/includes/file.php'); | |
require_once(ABSPATH . "wp-admin" . '/includes/media.php'); | |
$attach_id = media_handle_upload( $file_handler, $post_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
<?php | |
function isBot(){ | |
if(!empty($_SERVER['VIA'])): | |
return true; | |
endif; | |
if(!empty($_SERVER['REMOTE_PORT']) && in_array($_SERVER['REMOTE_PORT'], array(8080,80,6588,8000,3128,553,554))): | |
return true; | |
endif; | |
//if(!empty($_SERVER['REMOTE_ADDR']) && fsockopen($_SERVER['REMOTE_ADDR'], 80, $errno, $errstr, 30)): // this Causes Lag... | |
// return false; |
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 | |
// Queue: Queues a function or object method to be run during do_action | |
function add_action($action, $function, $priority = 10, $args = array()){ | |
$GLOBALS['actions'][$action][$priority][] = array('function' => $function, 'args' => $args); | |
} | |
// Hook: Runs a function or a object method based on add_action | |
function do_action($action){ | |
$done = ''; | |
if(!empty($GLOBALS['actions'][$action])): | |
foreach($GLOBALS['actions'][$action] as $priorities): |
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 | |
/* | |
* Title: News Meta Function | |
* Author: Alexander Conroy | |
* Version: 1.0.1 | |
* Website: http://www.esotech.org | |
* Purpose: Tags Tags for Current Post and puts it in the header meta comma separated maximum 10 tags. | |
* License: GPLv3+ | |
*/ | |
OlderNewer