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($) { | |
| $(document).ready(function() { | |
| var $search_form = $('#header #form-search'), | |
| search_cache = []; | |
| $search_form.find('input[name="q"]').attr('autocomplete', 'off'); | |
| function hide_search_form_autocomplete() { | |
| $search_form.removeClass('show-autocomplete'); | |
| } | |
| function show_search_form_autocomplete() { |
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
| .has-constrained-float { position: relative; /* This container div should have a defined height of its own, that defines the range the floating child could travel. In general use, this could be a child of a flex parent, as that would automatically take the height of its sibling */ } | |
| .constrained-float.fixed { position: fixed; top: 0 } | |
| .constrained-float.absolute { bottom: 0; position: absolute; top: auto } |
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
| {% assign bucket_width_class = 'one-half' %} | |
| {% if section.settings.columns == '3' %} | |
| {% assign bucket_width_class = 'one-third' %} | |
| {% elsif section.settings.columns == '4' %} | |
| {% assign bucket_width_class = 'one-quarter' %} | |
| {% endif %} | |
| <section class="wrapper main-content{% if section.settings.width == 'width-full' %} full-width{% endif %}" style="{% | |
| if section.settings.width == 'width-1200' or section.settings.width == 'width-custom' | |
| %}max-width: {% if section_settings.width == 'width-custom' %}{{ section.settings.custom_width }}{% else %}1200{% endif %}px;{% | |
| else %}{% endif %}"> |
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 = '/path/to/file.png'; | |
| $filename = basename($file); | |
| $upload_file = wp_upload_bits($filename, null, file_get_contents($file)); | |
| if (!$upload_file['error']) { | |
| $wp_filetype = wp_check_filetype($filename, null ); | |
| $attachment = array( | |
| 'post_mime_type' => $wp_filetype['type'], | |
| 'post_parent' => $parent_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
| jQuery(document).ready(function($){ | |
| var _custom_media = true, | |
| _orig_send_attachment = wp.media.editor.send.attachment; | |
| $('.stag-metabox-table .button').click(function(e) { | |
| var send_attachment_bkp = wp.media.editor.send.attachment; | |
| var button = $(this); | |
| var id = button.attr('id').replace('_button', ''); | |
| _custom_media = true; | |
| wp.media.editor.send.attachment = function(props, attachment){ | |
| if ( _custom_media ) { |
NewerOlder