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
// Change "Add to Cart" > "Add to Bag" in Shop Page | |
add_filter( 'woocommerce_product_add_to_cart_text', 'woocommerce_shop_page_add_to_cart_callback' ); | |
function woocommerce_shop_page_add_to_cart_callback() { | |
return __( 'Add to Bag', 'text-domain' ); | |
} |
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
// Change "Add to Cart" > "Add to Bag" in Single Page | |
add_filter( 'woocommerce_product_single_add_to_cart_text', 'woocommerce_single_page_add_to_cart_callback' ); | |
function woocommerce_single_page_add_to_cart_callback() { | |
return __( 'Add to Bag', 'text-domain' ); | |
} |
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 | |
$check_page_exist = get_page_by_title('title_of_the_page', 'OBJECT', 'page'); | |
// Check if the page already exists | |
if(empty($check_page_exist)) { | |
$page_id = wp_insert_post( | |
array( | |
'comment_status' => 'close', | |
'ping_status' => 'close', | |
'post_author' => 1, |
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('wpcf_default_single_campaign_tabs', 'single_tab_callback', 9); | |
function single_tab_callback( $tabs = array() ) { | |
$tabs['extra_tab'] = array( | |
'title' => __( 'Add Extra Tab', 'text_domain' ), | |
'callback' => 'tab_content_callback' | |
); | |
return $tabs; | |
} | |
function tab_content_callback(){ |
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(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); |
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 '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 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
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 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
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 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
# 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 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
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' ); | |
} |
NewerOlder