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
********************************************************************************* | |
********************************************************************************* | |
// Checkbox | |
// Color Picker | |
// Number | |
// Dropdown | |
// Textfield | |
// Attach Image | |
// Textarea HTML | |
// Add Link |
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 | |
$countries = array(); | |
$countries[] = array("iso_code"=>"AF","country_name"=>"Afghanistan","country_code"=>"93"); | |
$countries[] = array("iso_code"=>"AL","country_name"=>"Albania","country_code"=>"355"); | |
$countries[] = array("iso_code"=>"DZ","country_name"=>"Algeria","country_code"=>"213"); | |
$countries[] = array("iso_code"=>"AS","country_name"=>"American Samoa","country_code"=>"1"); | |
$countries[] = array("iso_code"=>"AD","country_name"=>"Andorra","country_code"=>"376"); | |
$countries[] = array("iso_code"=>"AO","country_name"=>"Angola","country_code"=>"244"); | |
$countries[] = array("iso_code"=>"AI","country_name"=>"Anguilla","country_code"=>"1"); | |
$countries[] = array("iso_code"=>"AG","country_name"=>"Antigua","country_code"=>"1"); |
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
********************************************************************************* | |
** | |
** | |
********************************************************************************* | |
// TEXT | |
array( | |
// Field name - Will be used as label | |
'name' => __( 'Text', 'your-prefix' ), | |
// Field ID, i.e. the meta key | |
'id' => "{$prefix}text", |
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 | |
function add_custom_meta_box(){ | |
add_meta_box("test-meta-box", "Custom Meta Box", "custom_meta_box_markup", "post", "side", "high", null); | |
} | |
add_action("add_meta_boxes", "add_custom_meta_box"); | |
function custom_meta_box_markup($object){ | |
wp_nonce_field(basename(__FILE__), "meta-box-nonce"); | |
?> |
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
class WPPB_Dokan_Shortcode { | |
public function get_name(){ | |
return 'wppb_dokan_shortcode'; | |
} | |
public function get_icon() { | |
return 'wppb-font-Page-grid'; | |
} | |
public function get_category_name(){ | |
return __( 'Dokan Shortcode', 'wp-page-builder-dokan' ); | |
} |
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
# Addon Generate. | |
add_filter( 'wppb_available_addons', 'wppb_dokan_addons_function' ); | |
if ( ! function_exists('wppb_dokan_addons_function')){ | |
function wppb_dokan_addons_function($addons){ | |
$addons[] = 'WPPB_Dokan_Shortcode'; | |
return $addons; | |
} | |
} |
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
import React, { Component } from 'react' | |
const _month = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sept','Oct','Nov','Dec'] | |
const _days = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'] | |
class Calendar extends Component { | |
state = { type: 'date', year: this._todaysDate('y'), month: this._todaysDate('m'), day: this._todaysDate('d') } | |
_daysInMonth(){ | |
return new Date( this.state.year, this.state.month , 0 ).getDate() |
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 fontAwesome = [ | |
'fas fa-ad', | |
'fas fa-address-book', | |
'fas fa-address-card', | |
'fas fa-adjust', | |
'fas fa-air-freshener', | |
'fas fa-align-center', | |
'fas fa-align-justify', | |
'fas fa-align-left', | |
'fas fa-align-right', |
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 | |
echo 'PHP POST Request <br/>'; | |
function curl_data($data) { | |
// make sure curl module is enable | |
// phpinfo(); | |
try { | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, 'http://localhost/xml_action/index.php'); // Response URL | |
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: text/xml") ); |
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 | |
if(strcasecmp($_SERVER['REQUEST_METHOD'], 'POST') != 0){ | |
header($_SERVER["SERVER_PROTOCOL"]." 405 Method Not Allowed", true, 405); | |
exit; | |
} | |
$postData = trim(file_get_contents('php://input')); | |
libxml_use_internal_errors(true); | |
$xml = simplexml_load_string($postData); |
OlderNewer