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 | |
$arr = [ | |
[ 'foo' => 1, 'bar' => 7, 'den' => 9 ], | |
[ 'foo' => 11, 'bar' => 4, 'den' => 0 ], | |
[ 'foo' => 1, 'bar' => 12, 'den' => 6 ], | |
[ 'foo' => 1, 'bar' => 10, 'den' => 6 ], | |
]; | |
uasort( $arr, 'cmp' ); |
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
public function shutdown_action() { | |
$keys = $this->get_data_keys(); | |
$data = []; | |
foreach ( $keys as $key ) { | |
$this->data[ $key ] = isset( $this->data[ $key ] ) ? $this->data[ $key ] : []; | |
$data[ $key ] = array_replace( $this->data[ $key ], $this->{$key} ); | |
} | |
wp_cache_set( $this->get_cache_key(), $this->maybe_reduce_cache_size( $data ) ); |
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
$boundary = str_repeat( '-', 24 ) . wp_generate_password( 16 ); | |
$headers = array( | |
'content-type' => 'multipart/form-data; boundary=' . $boundary, | |
); | |
if ( ! isset( $files['path'] ) ) { | |
$error_message = 'Invalid arguments'; | |
return array( $success, $error_message, $word_count, $individual_word_count ); | |
} |
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 | |
/** | |
* MU Plugin to block transliteration of WooCommerce attributes and attribute terms. | |
* | |
* @package cyr-to-lat | |
*/ | |
/** | |
* Class Block_WC_Attr_Cyr2lat. | |
*/ |
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 | |
/** | |
* Plugin Name: Disable updates plugins | |
* Plugin URI: https://kagg.eu/en/ | |
* Description: Disable update of certain plugins. | |
* Version: 1.2 | |
* Author: KAGG Design | |
* Author URI: https://kagg.eu/en/ | |
* License: GPL2 | |
* |
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 | |
/** | |
* 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 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 | |
add_action( 'init', 'att_page', PHP_INT_MAX ); | |
function att_page() { | |
if ( is_att_page() ) { | |
$attachment = null; | |
$to = '[email protected]'; | |
$subject = 'subj'; | |
$message = 'message'; | |
include_once ABSPATH . 'wp-admin/includes/file.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
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 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 | |
/** | |
* wc1c_import_product_xml hook | |
* Prevent processing a product if there is no product in database with same SKU. | |
* If product with the same SKU found in the db, update _wc1c_guid option to allow product update. | |
* | |
* @param array $product | |
* @param bool $is_full | |
* | |
* @return null|array |