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 | |
for ( $i = 1; $i < 13; $i ++ ) { | |
$N = date( 'N', strtotime( '01-' . $i . '-2015' ) ); | |
$d=1; | |
if ( $N > 1 ) { | |
$d = ( 7 - $N ) + 2; |
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
define('WP_DEBUG', true); | |
if ( WP_DEBUG ) { | |
/** | |
* Turn on error logging and show errors on-screen if in debugging mode | |
*/ | |
@error_reporting( E_ALL ); | |
@ini_set( 'log_errors', true ); | |
@ini_set( 'log_errors_max_len', '0' ); |
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 | |
$ch = curl_init(); | |
curl_setopt( $ch, CURLOPT_URL, "example.com" ); | |
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 ); | |
$output = curl_exec( $ch ); | |
curl_close( $ch ); | |
var_dump( $output ); |
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
add_filter( 'rp4wp_disable_css', '__return_true' ); |
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 | |
function bk_title_order_received( $title, $id ) { | |
if ( is_order_received_page() && get_the_ID() === $id ) { | |
$title = "Thank you for your order!"; | |
} | |
return $title; | |
} | |
add_filter( 'the_title', 'bk_title_order_received', 10, 2 ); |
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 | |
function rp4wp_title_order_received( $title, $id ) { | |
if ( is_order_received_page() && get_the_ID() === $id ) { | |
global $wp; | |
$order_id = apply_filters( 'woocommerce_thankyou_order_id', absint( $wp->query_vars['order-received'] ) ); | |
$order_key = apply_filters( 'woocommerce_thankyou_order_key', empty( $_GET['key'] ) ? '' : wc_clean( $_GET['key'] ) ); | |
if ( $order_id > 0 ) { | |
$order = wc_get_order( $order_id ); |
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
define('WP_DEBUG', true); | |
if ( WP_DEBUG ) { | |
/** | |
* Turn on error logging and show errors on-screen if in debugging mode | |
*/ | |
@error_reporting( E_ALL ); | |
@ini_set( 'log_errors', true ); | |
@ini_set( 'log_errors_max_len', '0' ); |
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
error_log( 'Test error message', 0 ); |
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
error_log( print_r( $special_object, 1 ), 0 ); |
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 | |
echo '<input type="hidden" name="bk-ajax-nonce" id="bk-ajax-nonce" value="' . wp_create_nonce( 'bk-ajax-nonce' ) . '" />'; | |
?> | |
<script type="text/javascript"> | |
jQuery( document ).ready( function ( $ ) { | |
var data = { | |
action: 'my_action', | |
security: $( '#bk-ajax-nonce' ).val() | |
}; | |
$.post( ajaxurl, data, function ( response ) { |