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
| function clearFormElements( element ) { | |
| // clear form elements | |
| $( element ).find( ":input" ).each( function () { | |
| switch ( this.type ) { | |
| case "text": | |
| case "email": | |
| case "number": | |
| case "password": | |
| case "tel": | |
| case "date": |
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 | |
| /** | |
| * Clear the cache on specific page | |
| */ | |
| if ( function_exists( 'wp_cache_post_change' ) ) { | |
| $GLOBALS["super_cache_enabled"] = 1; | |
| wp_cache_post_change( $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
| <?php | |
| /** | |
| * Flickr Gallery shortcode | |
| * | |
| * @author Damian Wajer | |
| * @param $atts | |
| * @return string | |
| */ | |
| function prefix_flickr_gallery_shortcode( $atts ) { | |
| $a = shortcode_atts( array( |
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
| // Checkbox | |
| .checkbox-custom { | |
| position: absolute; | |
| opacity: 0; | |
| &__icon-state { | |
| display: inline-block; | |
| margin-right: 5px; | |
| padding: 0; | |
| width: 20px; |
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
| /** | |
| * Add support for <select> <option> to Bootstrap plugins | |
| * | |
| * @link http://getbootstrap.com/javascript/ | |
| */ | |
| $(".js-select-toggle").on("change", function () { | |
| var $select = $(this); | |
| $select.find("option").each(function () { | |
| var $option = $(this), |
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 | |
| /** | |
| * Filter allowed HTML elements. | |
| * | |
| * @param $allowedposttags | |
| * @param $context | |
| * | |
| * @return array | |
| */ | |
| function prefix_filter_allowed_html( $allowedposttags, $context ) { |
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
| $(".image-upload-button").on("click", function (e) { | |
| var $area = $(this).closest(".image-upload-area"), | |
| send_to_editor_backup = window.send_to_editor; | |
| tb_show('', 'media-upload.php?type=image&TB_iframe=true'); | |
| window.send_to_editor = function (html) { | |
| var imgUrl = $("img", html).attr("src"); | |
| $area.find(".image-url").val(imgUrl); |
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 $upgrading = time(); |
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 | |
| /** | |
| * Taxonomy for media files. | |
| */ | |
| function init_media_categories() { | |
| register_taxonomy( 'media_cat', 'attachment', array( | |
| 'label' => __( 'Categories' ), | |
| 'hierarchical' => true, | |
| 'public' => false, | |
| 'show_ui' => true, |