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 | |
class ShopMagicMyCustomEvent extends \WPDesk\ShopMagic\Workflow\Event\Builtin\OrderCommonEvent { | |
public function get_name() : string { | |
return __( 'My Custom Event', 'my-text-domain' ); | |
} | |
public function get_description(): string { | |
return __( 'My custom event description', 'my-text-domain' ); | |
} |
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 | |
/** | |
* Single Listing CT IDX Pro Info | |
* | |
* @package WP Pro Real Estate 7 | |
* @subpackage Include | |
*/ | |
global $ct_options; |
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 | |
// Usage: | |
$post_id = 'POST_ID_HERE'; | |
echo idx_get_grouped_features( $post_id ); | |
/** | |
Example Output: | |
<div class="idx_grouped_features"> | |
<h4>Interior</h4> | |
<ul> |
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
try { | |
byte[] imageBytes = null; | |
imageBytes = ...; //read image from the disk | |
if (imageBytes != null) | |
{ | |
Response.Clear(); | |
Response.ContentType = "image/jpg"; | |
Response.BinaryWrite(imageBytes); |
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 httpHelper = require('./helper/http'); | |
var options = { | |
host: 'marketplace.envato.com', | |
path: '/api/edge/number-of-files:themeforest.json', | |
method: "GET", | |
headers: {'user-agent': 'Node.js - Envato API Consumer'} | |
}; | |
httpHelper.request(options, function (body) { |
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
/*GET Request*/ | |
var httpHelper = require('./helper/http'); | |
var options = { | |
host: 'www.domain.com', | |
path: '/example-page', | |
method: 'GET' | |
}; | |
httpHelper.request(options, function (body) { |
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 http = require('http'); | |
function request(options, callback) | |
{ | |
http.request(options, function (response) { | |
var responseBody = ''; | |
response.on('data', function (data) { | |
responseBody += data; | |
}); |
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 | |
class SignupCommand extends AbstractCommand { | |
private $oUser = null; | |
private $data = array(); | |
function __construct($oUser, $data) { | |
$this->oUser = $oUser; | |
$this->data = $data; |
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 | |
interface InterfaceCommand { | |
function execute(); | |
} | |
abstract class AbstractCommand implements InterfaceCommand { | |
/** |