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 my_acf_admin_footer() { | |
| ?> | |
| <script> | |
| ( function( $) { | |
| acf.add_filter( 'wysiwyg_tinymce_settings', function( mceInit, id ) { | |
| if ( id === 'special-wysiwyg-field' ) { | |
| mceInit.body_class += ' magical-field-class'; | |
| } | |
| return mceInit; |
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 | |
| if( function_exists('acf_add_local_field_group') ): | |
| acf_add_local_field_group(array ( | |
| 'key' => 'acf_product_options', | |
| 'title' => 'Product Options', | |
| 'fields' => array ( | |
| array ( | |
| 'key' => 'acf_product_options_tabbedcontent_label', | |
| 'label' => 'Tabbed 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
| <?php | |
| add_filter('wp_get_attachment_image_attributes', 'interchange_the_images', 10, 2); | |
| function interchange_the_images ( $attr, $attachment ) | |
| { | |
| /* Use ID to get the attachment object */ | |
| $lg_hero_array = wp_get_attachment_image_src( $attachment->ID, 'large', true ); //Large Hero | |
| $md_hero_array = wp_get_attachment_image_src( $attachment->ID, 'medium', true ); // Medium Hero | |
| $sm_hero_array = wp_get_attachment_image_src( $attachment->ID, 'thumbnail', true ); // Mobile Hero |
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_filter( 'pre_comment_content', function( $content ) { | |
| if ( strlen( $content ) > 64000 ) | |
| wp_die( 'Invalid comment.' ); | |
| return $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
| .ui-dialog { | |
| * { | |
| box-sizing: content-box; | |
| } | |
| .ui-dialog-titlebar { | |
| border-bottom: none; | |
| } | |
| .page { | |
| width: 100% !important; | |
| } |
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
| angular | |
| .module( 'yourAppName' ) | |
| .directive( 'bindOnce', BindOnce ); | |
| function BindOnce() { | |
| return { | |
| scope: true, | |
| link: function( $scope ) { | |
| setTimeout(function() { | |
| $scope.$destroy(); |
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
| #!/bin/sh | |
| # creates a zip archive of the files modified in a merge. | |
| args=("$@") | |
| git archive -o deploy/deploy-${args[1]:0:7}.zip HEAD $(git diff-tree --no-commit-id --name-only -r ${args[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 | |
| Class Media extends MediaCore | |
| { | |
| public static function deferScript($matches) | |
| { | |
| if (!is_array($matches)) | |
| return false; | |
| $inline = ''; | |
| if (isset($matches[0])) |
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
| #!/bin/sh | |
| args=("$@") | |
| git archive -o deploy/deploy-devcompare.zip HEAD $(git diff-tree --no-commit-id --name-only -r master..development) |
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 | |
| //Auctions should be geocoded on save | |
| function geocode_auction($post_id){ | |
| $auction_slug = 'auctions'; | |
| $_POST += array("{$auction_slug}_edit_nonce" => ''); | |
| if ( $auction_slug == $_POST['post_type'] && current_user_can( 'edit_post', $post_id )) { | |
| $address = get_post_meta(get_the_ID(), 'Location', true); |