This file contains 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 | |
/** | |
* @return bool | |
*/ | |
function woocommerce_gforms_use_ajax_filter() { | |
return true; | |
} | |
add_filter( 'woocommerce_gforms_use_ajax', 'woocommerce_gforms_use_ajax_filter' ); |
This file contains 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
REMOTE_DOMAIN="site.ru" | |
KEY_FILE="~/.ssh/site-root.rsa" | |
REMOTE_PATH="/path/to/site_dir/" | |
LOCAL_PATH="D:/Sites/site/" | |
REMOTE_URL="https://site.ru" | |
LOCAL_URL="http://site.test" | |
AFTER_SYNC_COMMANDS="wp plugin deactivate super-socializer && wp user delete 44903 --yes && add_kagg" |
This file contains 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 | |
if [ "$OSTYPE" == "linux-gnu" ] && grep -q Microsoft /proc/version; then | |
WP_PATH=$(wp config path) | |
else | |
WP_PATH=$(wp config path 2>/dev/null) | |
fi | |
if [[ ! $WP_PATH ]]; then | |
echo "This is not a WordPress install" |
This file contains 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 | |
public function get_element_translations( $element_id, $trid = false, $actual_translations_only = false ) { | |
$valid_element = $this->maybe_populate_cache ( $element_id, $trid ); | |
if ( $element_id ) { | |
$res = $valid_element | |
? ( $actual_translations_only | |
? $this->filter_for_actual_trans ( $element_id ) : $this->translations[ $element_id ] ) : array(); | |
} elseif ( $trid ) { | |
$res = isset( $this->trid_groups[ $trid ] ) ? $this->trid_groups[ $trid ] : array(); |
This file contains 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( 'woodmart_autoload' ) ) { | |
function woodmart_autoload($className) { | |
global $woodmart_files; | |
$className = ltrim($className, '\\'); | |
$fileName = ''; | |
$namespace = ''; | |
if ($lastNsPos = strripos($className, '\\')) { | |
$namespace = substr($className, 0, $lastNsPos); |
This file contains 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 | |
$data = [ | |
'element_data' => | |
[ | |
7 => | |
[ | |
'translation_id' => '18', | |
'trid' => '12', | |
'lang' => 'en', |
This file contains 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 | |
require_once 'C:\laragon\www\test\wp-load.php'; | |
echo 'Filling up array...' . "\n"; | |
$size = 10 * 1000; | |
$cycles = 1000 * 1000; | |
$array = []; |
This file contains 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
[ | |
{ | |
"id": 217, | |
"date": "2019-11-14T11:20:23", | |
"date_gmt": "2019-11-14T08:20:23", | |
"guid": { | |
"rendered": "http:\/\/wpml.test\/?page_id=217" | |
}, | |
"modified": "2019-11-15T12:36:54", | |
"modified_gmt": "2019-11-15T09:36:54", |
This file contains 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 | |
protected function get_custom_customizer_option() { | |
static $theme_slug = null; | |
$current_language = self::get_language(); | |
if ( ! $theme_slug ) { | |
$theme_slug = get_option( 'template' ); | |
} | |
$option_prefix = str_replace( '-', '_', $theme_slug ); | |
$option_name = $option_prefix . self::get_option_key() . $current_language; |
This file contains 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 | |
/** | |
* Remove current action or filter from plugin | |
* | |
* @param string $class_name Class name enqueueing the action. | |
* @param null $action_name Action name. | |
*/ | |
function remove_plugin_action( $class_name, $action_name = null ) { | |
global $wp_filter; |