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 | |
/** | |
* Plugin Name: My Plugin | |
* Plugin Description: Settings API Demo | |
*/ | |
add_action( 'admin_menu', 'my_admin_menu' ); | |
function my_admin_menu() { | |
add_options_page( 'My Plugin', 'My Plugin', 'manage_options', 'my-plugin', 'my_options_page' ); | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://unpkg.com/@ungap/custom-elements-builtin"></script> | |
<script type="module" src="https://unpkg.com/x-frame-bypass"></script> | |
</head> | |
<body> | |
<iframe is="x-frame-bypass" name='NewIframe' height='800px' width='100%' scrolling='yes' src='https://calendar.google.com/calendar/r' marginwidth='0px' marginheight='0px' frameborder='1' id='myFrame' allowfullscreen style='border:0px none #ffffff'></iframe> | |
</body> | |
</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 | |
/** | |
* @snippet Add First & Last Name to My Account Register Form - WooCommerce | |
* @author Rodolfo Melogli | |
* @compatible WC 3.9 | |
*/ | |
/////////////////////////////// | |
// 1. ADD FIELDS | |
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 | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
use Illuminate\Support\Facades\Http; | |
class ProcessHubSpotController extends Controller | |
{ |
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 | |
use Illuminate\Http\Request; | |
use Illuminate\Support\Facades\Http; | |
class ProcessHubSpotController extends Controller | |
{ | |
/* | |
* | |
* ------WebKitFormBoundaryuVJ3SdmBDIE5e9iy |
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 if inside WP Admin. Also works in the Block Editor. | |
* | |
* With the introduction of Gutenberg, is_admin() was broken. | |
* This better version will account for the Block Editor (Gutenberg) | |
*/ | |
function mytheme_better_is_admin() { | |
// Check if in Block Editor - see: https://github.com/WordPress/gutenberg/issues/51090#issuecomment-1576570247 | |
if ( is_admin() || ( defined( 'REST_REQUEST' ) && REST_REQUEST && 'edit' === $_GET['context'] ) ) { |
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 | |
/** | |
* Create new bookings page. | |
*/ | |
class WC_Bookings_Create { | |
/** | |
* Stores errors. | |
* | |
* @var array |
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 | |
add_action( 'elementor_pro/forms/validation', function( $record, $ajax_handler ) { | |
// Require WooCommerce | |
if( ! class_exists( 'WooCommerce' ) || empty( WC()->session ) ) { | |
return; | |
} | |
// Boot Cart Session | |
if( ! WC()->session->has_session() ) { |
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 | |
/** | |
* WooCommere Bookings - Check if current page is a bookable product. | |
* @return boolean True for bookable products, false otherwise | |
*/ | |
function is_bookable_product() { | |
return is_product() && wc_get_product() instanceof WC_Product_Booking; | |
} |
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 if inside WP Admin. Also works in the Block Editor. | |
* | |
* With the introduction of Gutenberg, is_admin() was broken. | |
* This better version will account for the Block Editor (Gutenberg) | |
*/ | |
function mytheme_better_is_admin() { | |
// Check if in Block Editor - see: https://github.com/WordPress/gutenberg/issues/51090#issuecomment-1576570247 | |
if ( is_admin() || ( defined( 'REST_REQUEST' ) && REST_REQUEST && 'edit' === $_GET['context'] ) ) { |