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 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 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
| 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 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('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 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 | |
| /** | |
| * 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 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 | |
| /** | |
| * 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 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
| /** | |
| * 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 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
| /** | |
| * 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(); |
NewerOlder