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
| /* global jQuery, iziToast */ | |
| // Chained select (listbox) on tinymce window (modal) | |
| tinymce.PluginManager.add('address_shortcode_inserter', function (editor) { | |
| var addresses = []; | |
| function getCountries(countryID, elm) { | |
| let win = tinymce.activeEditor.windowManager.getWindows()[0]; | |
| let countriesField = win.find(`#${elm.name}`); | |
| let citiesField = win.find(`#${fields.citiesField.name}`); |
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
| // Scroll into Custom Fields settings | |
| document.querySelector(".wpml-custom-fields-settings").scrollIntoView(); | |
| // Click on 'Display All' button | |
| jQuery(".wpml-custom-fields-settings .display-all").click(); | |
| const set_acf_fields_translatable = setInterval(() => { | |
| // When 'Display All' button is clicked, the 'display-all' class is removed, therefore check until it doesnt exist | |
| if (jQuery(".wpml-custom-fields-settings .display-all").length == "0") { | |
| // Scroll into the 'Save' button |
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/bash | |
| # | |
| # PHP Syntax linter, checks syntax before commit actually happens | |
| # Save this file in your git project as .git/hooks/pre-commit and make sure it's executable | |
| # PHP lint command, modify if necessary | |
| LINT='/usr/bin/php -l' | |
| files=$(git diff --cached --name-only --diff-filter=ACM | grep "\.php$") | |
| if [ "$files" = "" ]; then |
OlderNewer