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
### WordPress Core ### | |
wp-includes/* | |
wp-admin/* | |
wp-content/uploads/* | |
wp-content/languages/* | |
wp-content/blogs.dir/ | |
wp-content/upgrade/ | |
wp-content/backup-db/ | |
wp-content/advanced-cache.php | |
wp-content/wp-cache-config.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
var actionUrl = 'action=tls_send_data&value1=value; | |
var request = new XMLHttpRequest(); | |
request.open('POST', 'http://www.mysite.com/wp-admin/admin-ajax.php', true); | |
request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;'); | |
request.onload = function () { | |
if (this.status >= 200 && this.status < 400) { | |
console.log( this.response ); | |
// If successful | |
var value = JSON.parse( this.response ); |
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 | |
$password = 'xxxxxxx'; | |
$wsdlUrl = 'https://xxxxxx:xxxx/xxxx/CardServiceWs?WSDL'; | |
$pemFilePath = PATHDIR . 'client.pem'; | |
$pemPassword = 'xxxxxxxxxxxxx'; | |
$contextOptions = array( | |
'ssl' => array( | |
'verify_peer' => false, | |
'verify_peer_name' => false, |
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( 'pre_get_posts', 'apply_akce_query_filter' ); | |
function apply_akce_query_filter ( $query ) | |
{ | |
if ( is_admin() ) { | |
return $query; | |
} | |
if ( is_single() ) { |
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
<ol> | |
<li>mu_plugin_loaded</li> | |
<li>muplugins_loaded</li> | |
<li>registered_taxonomy</li> | |
<li>registered_post_type</li> | |
<li>plugin_loaded</li> | |
<li>load_textdomain</li> | |
<li>elementor/loaded</li> | |
<li>woocommerce_helper_loaded</li> | |
<li>wpseo_loaded</li> |
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_shortcode( 'tatum_minted_address', 'tatum_get_minted_address' ); | |
function tatum_get_minted_address() { | |
$html = ''; | |
if ( !empty( $_GET['order'] ) ) { | |
$order_id = (int)$_GET['order']; | |
$order = wc_get_order( $order_id ) { | |
if ( is_object( $order ) ) { |
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_filter( 'woocommerce_thankyou_order_received_text', 'gunshop_received_text', 10, 2 ); | |
function gunshop_received_text( $text, $order ){ | |
$payment = $order->get_payment_method(); | |
if ( 'dobirka' === $payment ) { | |
$text = 'Děkujeme za objednávku, zboží zaplatíte až při převzetí.'; | |
} |
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( 'woocommerce_before_shop_loop', 'metaltrade_categories', 5 ); | |
function metaltrade_categories(){ | |
global $wp_query; | |
if( empty( $wp_query->queried_object->term_id ) ){ | |
$parent = 0; | |
} else { | |
$parent = $wp_query->queried_object->term_id; |
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
function no_wordpress_errors(){ | |
return 'Something is wrong!'; | |
} | |
add_filter( 'login_errors', 'no_wordpress_errors' ); |
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 | |
global $wpdb; | |
$posts = $wpdb->get_results( | |
"SELECT wposts.* | |
FROM ".$wpdb->prefix."posts wposts, ".$wpdb->prefix."icl_translations wicl_translations | |
WHERE wicl_translations.element_id = wposts.ID | |
AND wposts.post_status = 'publish' | |
AND wicl_translations.language_code = 'en' | |
AND wicl_translations.element_type = 'post_post' |
NewerOlder