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
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 | |
/** | |
* @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
<?php | |
/** | |
* @author OnTheGo Systems | |
*/ | |
class GFML_Conditional_Logic extends GFML_Form { | |
/** | |
* It translates the attributes of the conditional logic, before translating the fields. | |
* This is necessary, or it would not be possible to adjust the conditional logic based on values from "choices" fields. | |
* |
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 | |
use Cyr_To_Lat\Cyr_To_Lat_TestCase; | |
class Krya { | |
public function init() { | |
$overload = new Krya_Overload(); | |
add_action( 'over', [ $overload, 'over_func' ] ); | |
} |
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
jQuery( document ).ready( | |
function( $ ) { | |
var timer; | |
var logAjax = 0; | |
var $nonce = $( '#gts_webtranslator_gateway_nonce' ).val(); | |
var $progressBarWrap = $( '#progress-bar-wrap' ); | |
var $progressDot = $( '#progress-dot' ); | |
var $progressCount = $( '#progress-count' ); | |
var $progressBar = $( '#progress-bar' ); | |
var $logElement = $( '#webtranslator-log' ); |
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 | |
add_action( 'init', 'att_page', PHP_INT_MAX ); | |
function att_page() { | |
if ( is_att_page() ) { | |
$attachment = null; | |
$to = 'info@kagg.eu'; | |
$subject = 'subj'; | |
$message = 'message'; | |
include_once ABSPATH . 'wp-admin/includes/file.php'; |
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 | |
/** | |
* Plugin Name: Block Login | |
*/ | |
function no_login_authenticate_filter( $user, $username, $pass ) { | |
remove_filter( 'authenticate', 'wp_authenticate_username_password', 20, 3 ); | |
return null; | |
} |
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 | |
/** | |
* MU Plugin to block transliteration of WooCommerce attributes and attribute terms. | |
* | |
* @package cyr-to-lat | |
*/ | |
/** | |
* Class Block_WC_Attr_Cyr2lat. | |
*/ |