Skip to content

Instantly share code, notes, and snippets.

@yeriepiscesa
yeriepiscesa / request.php
Created February 18, 2021 03:23
WP URL Rewrite Sample
<?php
class Request {
public static $pagename = null;
public static $module = null;
public static $action_page = null;
public static $action_id = null;
public static $app_slug = null;
@yeriepiscesa
yeriepiscesa / functions.php
Created February 17, 2021 11:26
Forminator Guestbook
<?php
class GuestBook {
private $form_id = '1035'; // gunakan ID form Anda
private $page_slug = 'buku-tamu'; // pastikan sesuai dengan slug halaman Anda
public function __construct(){
add_action( 'wp_ajax_guestbook_entries', [$this, 'get_guestbook_entries' ] );
add_action( 'wp_ajax_nopriv_guestbook_entries', [$this, 'get_guestbook_entries' ] );
add_action( 'wp_enqueue_scripts', [$this, 'set_styling' ], 999 );
add_action( 'forminator_after_form_render', [$this, 'custom_script_after_form_render' ], 10, 5 );
@yeriepiscesa
yeriepiscesa / Additional Settings
Last active November 17, 2020 14:20
CF7SendWA - Single Product Buy
woo_checkout_first_name: your-name
woo_checkout_phone: whatsapp
woo_checkout_order_note: order-note
@yeriepiscesa
yeriepiscesa / WA Body
Created November 17, 2020 02:18
CF7SendWA - Single Product WA
[your-message]
[your-name] / [your-phone]
@yeriepiscesa
yeriepiscesa / wp-img-url-to-featured-image.php
Created August 27, 2020 05:21
Insert WP Post Featured Image from URL
@yeriepiscesa
yeriepiscesa / functions.php
Last active July 23, 2020 07:52
Contact Form 7 Send to WhatsApp, integrasi pihak ketiga. https://solusipress.com/download/contact-form-7-send-to-whatsapp/
<?php
function solusipress_custom_wa_api_send( $data, $form_id ) {
/**
* Do something here
* $data contains this information:
[
'to_number' => 'the number you defined',
'message' => 'message content from mail tab template',
'cf7_inputs' => the_posted_data_array_from_cf7,
'to_number_2' => 'the number for autorespond',
[md-form spacing="tight"]
[md-select label="Pilih Support" outlined="yes"]
[select_channel* service]
[/md-select]
[md-text label="Nama Lengkap" outlined="yes"]
[text* your-name]
[/md-text]
[md-text label="No WhatsApp" outlined="yes"]
[number* your-whatsapp]
[/md-text]
woo_checkout_first_name: your-name
woo_checkout_phone: whatsapp
woo_checkout_order_note: order-note
@yeriepiscesa
yeriepiscesa / shortcodes.html
Last active June 19, 2020 04:21
Shortcode for CF7 Send WA Quick Shop
Default Shortcode, menampilkan seluruh produk simple & variabel dan dikelompokan per kategori.
[cf7sendwa-quickshop]
Menampilkan text & category filter.
[cf7sendwa-quickshop filter="yes"]
Menampilkan produk dengan kategori hoodies. Untuk beberapa kategori gunakan koma sebagai pemisah. misal hoodies,tshirts
[cf7sendwa-quickshop category="hoodies"]
Menampilkan produk tertentu saja, gunakan product ID.
<?php
add_action( 'wp_enqueue_scripts', 'solusipress_jquery_number' );
function solusipress_jquery_number() {
if( is_page( 'forminator-test' ) ) {
wp_enqueue_script( 'jquery-number', 'https://businessprofile.solusipress.com/wp-content/uploads/custom-css-js/18.js' );
}
}
add_action( 'wp_footer', 'solusipress_forminator_format_number' );
function solusipress_forminator_format_number() {
if( is_page( 'forminator-test' ) ) { ?>