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 | |
class Mct_Wordpress_IndexController extends Mage_Core_Controller_Front_Action { | |
public function indexAction(){ | |
// JSON | |
$data = new stdClass(); | |
// CART | |
/** @var Mage_Checkout_Model_Cart $cart */ |
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 | |
// ... | |
if ( is_readable( 'readonly.html' ) && ! in_array( $_SERVER['REQUEST_METHOD'], array( 'HEAD', 'GET' ) ) ) { | |
header( 'HTTP/1.1 503 Service Temporarily Unavailable', true, 503 ); | |
header( 'Status: 503 Service Temporarily Unavailable', true, 503 ); | |
header( 'Retry-After: 3600' ); | |
include 'readonly.html'; |
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
curl 'http://www.remcotolsma.nl/' --data 'Data=test&Seal=test&InterfaceVersion=HP_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
grep --recursive --exclude-dir={node_modules,vendor} "&[^\s]*;" */*.php | |
grep --recursive --exclude-dir={bower_components,languages,node_modules,src,vendor} "&[^\s]*;" *.php | |
grep --recursive --include="*.php" --exclude-dir={bower_components,node_modules,vendor} "&[[:alnum:]]*;" . | |
// @see http://www.webdeveloper.com/forum/showthread.php?175987-RESOLVED-Regex-to-match-html-entities | |
// @see http://stackoverflow.com/a/186020 | |
// @see https://gist.github.com/a1phanumeric/5346170 |
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 | |
define( 'WP_USE_THEMES', false ); | |
require './wp-blog-header.php'; | |
global $wpdb; | |
$search = 'position:absolute;'; |
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
array(5) { | |
["headers"]=> | |
array(6) { | |
["server"]=> | |
string(5) "nginx" | |
["date"]=> | |
string(29) "Tue, 03 May 2016 06:29:15 GMT" | |
["content-type"]=> | |
string(9) "text/html" |
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 | |
define( 'WP_USE_THEMES', false ); | |
require './wp-blog-header.php'; | |
$response = wp_remote_get( 'https://api.pronamic.eu/licenses/check/1.0/' ); | |
var_dump( $response ); |
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 wkd_sync_location_to_table( $post_id ) { | |
// Sync locations | |
global $wpdb; | |
$location_id = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM $wpdb->wkd_post_locations WHERE post_id = %d;", $post_id ) ); | |
$format = array( | |
'post_id' => '%d', |
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 pronamic_ideal_booking_settings() { | |
echo 'Pronamic iDEAL'; | |
} | |
add_bk_action( 'wpdev_bk_payment_show_tab_in_top_settings', 'pronamic_ideal_booking_settings'); | |
function pronamic_ideal_booking_payment_form( $blank, $booking_id, $summ,$bk_title, $booking_days_count, $booking_type, $bkform, $wp_nonce, $is_deposit ) { | |
$output = wpdev_bk_define_payment_form_bank_transfer( $blank, $booking_id, $summ,$bk_title, $booking_days_count, $booking_type, $bkform, $wp_nonce, $is_deposit ); |
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 emg_magazine_embed_ssl_compatible( $content ) { | |
if ( 'magazine' === get_post_type() ) { | |
// Fix Issuu PDF Sync SSL link | |
// @see https://plugins.trac.wordpress.org/browser/issuu-pdf-sync/tags/3.1/classes/shortcodes.php#L75 | |
$content = str_replace( 'http://static.issuu.com/', 'https://static.issuu.com/', $content ); | |
} | |
return $content; |