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 | |
use Elementor\Controls_Manager; | |
use Elementor\Group_Control_Background; | |
use Elementor\Plugin; | |
use Elementor\Widget_Base; | |
if ( ! defined( 'ABSPATH' ) ) { | |
// Exit if accessed directly. | |
exit; |
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 | |
/** Enqueuing the Stylesheet for two shortcode */ | |
function pe_cta_enqueue_scripts() { | |
global $post; | |
$has_shortcode = has_shortcode( $post->post_content, 'pe_cta_button_shortcode' ) || has_shortcode( $post->post_content, 'boxed' ); | |
if( is_a( $post, 'WP_Post' ) && $has_shortcode ) { | |
wp_register_style( 'pe-cta-stylesheet', plugin_dir_url( __FILE__ ) . 'css/pe-cta-style.css' ); |
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 | |
add_shortcode( 'pe_get_current_date_shortcode', 'pe_get_current_date' ); | |
/** | |
* Return the current date. | |
* | |
* @return false|string | |
*/ | |
function pe_get_current_date() { | |
return date('Y-m-d'); |
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 | |
/** | |
* Datatrans class for payments. | |
* | |
* https://docs.datatrans.ch/docs | |
* https://admin.sandbox.datatrans.com/ | |
* https://testaccount.datatrans.com/testaccounts | |
* | |
* Class PE_Datatrans |
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
// WordPress | |
jQuery(document).ready(function ( $ ) { | |
let payment = $('#your-button'); | |
// let secureFields = new SecureFields(); | |
let styles = { | |
// your style goes here | |
// Specific Style for Each Element | |
cardNumber: "border: 1px solid #eaeaea; height: 40px; padding: 10px; " + |
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 pe_custom_post_product() { | |
$labels = array( | |
'name' => _x( 'Products', 'post type general name' ), | |
'singular_name' => _x( 'Product', 'post type singular name' ), | |
'add_new' => _x( 'Add New', 'book' ), | |
'add_new_item' => __( 'Add New Product' ), | |
'edit_item' => __( 'Edit Product' ), | |
'new_item' => __( 'New Product' ), |
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 | |
use Elementor\Controls_Manager; | |
use Elementor\Group_Control_Background; | |
use Elementor\Plugin; | |
use Elementor\Widget_Base; | |
if ( ! defined( 'ABSPATH' ) ) { | |
// Exit if accessed directly. | |
exit; |
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 | |
use Elementor\Controls_Manager; | |
use Elementor\Group_Control_Background; | |
use Elementor\Plugin; | |
use Elementor\Widget_Base; | |
if ( ! defined( 'ABSPATH' ) ) { | |
// Exit if accessed directly. | |
exit; |
NewerOlder