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
| preSelect(fieldSelector, optionValues) { | |
| console.log("run this..."); | |
| [...optionValues].map((value) => { | |
| jQuery(`${fieldSelector} option[value=${value}]`).attr('selected', 'selected'); | |
| }); | |
| jQuery(`${fieldSelector}`).trigger('chosen:updated'); | |
| } | |
| // usage | |
| // GRAVITY_FORM.preSelect(DATA.formFieldSelector, [marketingId]); |
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
| const programCards = document.querySelectorAll('.card-squared-programme'); | |
| if (programCards) { | |
| programCards.forEach(function (card, index) { | |
| const mktID = card.dataset.marketingId; | |
| const productList = document.querySelector('#input_1_5-ts-control'); | |
| card.addEventListener('click', function (event) { | |
| console.log(mktID); | |
| productList.click(); | |
| }) | |
| }); |
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
| " Make IE Better Compatible " | |
| <!--[if IE]> | |
| <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> | |
| <![endif]--> | |
| ====================================================== | |
| IE6 Only | |
| ================== | |
| _selector {...} |
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
| RewriteEngine On | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteRule ^([^\.]+)$ $1.html [NC,L] |
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 ( get_field( 'field_name' ) ): ?> | |
| This is displayed when the field_name is TRUE or has a value. | |
| <?php else: // field_name returned false ?> | |
| This is displayed when the field is FALSE, NULL or the field does not exist. | |
| <?php endif; // end of if field_name logic ?> |
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 _remove_script_version( $src ){ | |
| $parts = explode( '?', $src ); | |
| return $parts[0]; | |
| } | |
| add_filter( 'script_loader_src', '_remove_script_version', 15, 1 ); | |
| add_filter( 'style_loader_src', '_remove_script_version', 15, 1 ); | |
| //https://kinsta.com/knowledgebase/remove-query-strings-static-resources/#remove-query-string-code |
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 global $user_login, $current_user; | |
| if (is_user_logged_in()) { | |
| get_currentuserinfo(); | |
| $user_info = get_userdata($current_user->ID); | |
| if (in_array('subscriber', $user_info->roles)) { | |
| ?> | |
| Content goes here | |
| <?php | |
| } |
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
| <meta name="viewport" content="width=device-width,minimum-scale=1.0,initial-scale=1.0,maximum-scale=1.0,user-scalable=no,viewport-fit=cover"> |
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 global $user_ID; if( $user_ID ) : ?> | |
| <?php if( current_user_can('activate_plugins') ) : ?> | |
| <!-- CONTENT HERE --> | |
| <?php endif; ?> | |
| <?php 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 | |
| $attachment_id = get_field('field_name'); | |
| $size = "full"; // (thumbnail, medium, large, full or custom size) | |
| $image = wp_get_attachment_image_src( $attachment_id, $size ); | |
| ?> | |
| <img class="image-class" alt="" src="<?php echo $image[0]; ?>" /> |
NewerOlder