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 | |
| # Syncronize a local Wordpress installation with a remote one. | |
| # | |
| # | |
| # Requires wp-cli.phar installed somewhere. | |
| WP_CLI=/usr/local/bin/wp | |
| # Remote settings |
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
| import { select, subscribe } from '@wordpress/data' | |
| export function whenEditorIsReady() { | |
| return new Promise((resolve) => { | |
| const unsubscribe = subscribe(() => { | |
| // This will trigger after the initial render blocking, before the window load event | |
| // This seems currently more reliable than using __unstableIsEditorReady | |
| if (select('core/editor').isCleanNewPost() || select('core/block-editor').getBlockCount() > 0) { | |
| unsubscribe() | |
| resolve() |
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_value upload_max_filesize 512M | |
| php_value post_max_size 512M | |
| php_value max_execution_time 300 | |
| php_value max_input_time 300 | |
| php_value memory_limit 512M |
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
| window.onload = function() { | |
| // Parse the URL | |
| function getParameterByName(name) { | |
| var name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); | |
| var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"); | |
| var results = regex.exec(location.search); | |
| return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); | |
| } | |
| // Give the URL parameters variable names | |
| var source = getParameterByName('utm_source'); |
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 | |
| $args = array( | |
| 'label' => '', // Text in Label | |
| 'class' => '', | |
| 'style' => '', | |
| 'wrapper_class' => '', | |
| 'value' => '', // if empty, retrieved from post meta where id is the meta_key | |
| 'id' => '', // required | |
| 'name' => '', //name will set from id if empty |
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
| /* -------------------------------------------------------------------------- */ | |
| // All Bootstrap 4 Sass Mixins [Cheat sheet] | |
| // Updated to Bootstrap v4.5.x | |
| // @author https://anschaef.de | |
| // @see https://github.com/twbs/bootstrap/tree/master/scss/mixins | |
| /* -------------------------------------------------------------------------- */ | |
| // Grid variables | |
| $grid-columns: 12; | |
| $grid-gutter-width: 30px; |
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 atx_in_array_r($needle, $haystack, $strict = false) | |
| { | |
| foreach ($haystack as $item) { | |
| if (($strict ? $item === $needle : $item == $needle) || (is_array($item) && atx_in_array_r($needle, $item, $strict))) { | |
| return true; | |
| } | |
| } | |
| return false; | |
| } |
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
| msgid "" | |
| msgstr "" | |
| "Project-Id-Version: my-plugin\n" | |
| "Last-Translator: Anton Zhary a.zhary@gmail.com\n" | |
| "Language-Team: aThemix\n" | |
| "Language: ru\n" | |
| "Content-Type: text/plain; charset=UTF-8\n" | |
| "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" | |
| "X-Poedit-SourceCharset: UTF-8\n" | |
| "X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_attr__;esc_attr_e;esc_html__;esc_html_e\n" |
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
| // Get Gravity Forms field by label | |
| function atx_get_field_by_label( $form, $label ) { | |
| foreach( $form['fields'] as $field ) { | |
| // debug($field); | |
| if( $field['label'] == $label ) { | |
| return $field; | |
| } | |
| } | |
| return false; | |
| } |
NewerOlder