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
CREATE TABLE `wp_123456_contacts` ( | |
`id` int(11) unsigned NOT NULL AUTO_INCREMENT, | |
`full_name` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL, | |
`email` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL, | |
`address` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL, | |
`province_id` char(2) COLLATE utf8mb4_unicode_ci DEFAULT NULL, | |
`regency_id` char(4) COLLATE utf8mb4_unicode_ci DEFAULT NULL, | |
`district_id` char(7) COLLATE utf8mb4_unicode_ci DEFAULT NULL, | |
`village_id` char(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL, | |
`subject` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL, |
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 | |
/** | |
* Plugin Name: Contact Form WhatsApp | |
* Plugin URI: https://solusipress.com/ | |
* Description: Contact Form that send to WhatsApp Messenger | |
* Author: Yerie Piscesa | |
* Author URI: https://solusipress.com/ | |
* Text Domain: contact-form-whatsapp | |
* Version: 0.9.0 | |
*/ |
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
add_action( 'wp_enqueue_scripts', 'sp_enqueue_styles_scripts' ); | |
function sp_enqueue_styles_scripts() { | |
wp_register_script( 'sp-contact-form-wa', | |
plugin_dir_url( __FILE__ ) . '/assets/contact-form-wa.js', | |
[ 'jquery' ], '1.0.0', true | |
); | |
wp_register_style( 'sp-css-grid', plugin_dir_url( __FILE__ ) . '/assets/contact-form-wa.css', array(), '1.0.0' ); | |
} |
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
.sp-form-contact input, | |
.sp-form-contact button { | |
width: 100%; | |
padding: 10px; | |
} | |
.sp-form-contact button { | |
cursor: pointer; | |
border: 1px solid #666; | |
border-radius: 5px; | |
box-shadow: none; |
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
( function( $ ){ | |
$( document ).ready( function(){ | |
$( '#sp-form-contact-button' ).click( function( event ){ | |
event.preventDefault(); | |
var the_phone = sp_contact_form.phone; | |
var the_purpose = sp_contact_form.purpose; | |
var _name = $( '#sp-contact-name' ).val(); | |
var _city = $( '#sp-contact-city' ).val(); | |
if( _name != '' && _city != '' ) { |
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_action( 'wp_head', 'solusipress_ga_script', 0 ); | |
function solusipress_ga_script() | |
{ ?> | |
<!-- Global site tag (gtag.js) - Google Analytics --> | |
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxxxx-1"></script> | |
<script> | |
window.dataLayer = window.dataLayer || []; | |
function gtag(){dataLayer.push(arguments);} | |
gtag('js', new Date()); |
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 filter_events_by_taxonomies( $post_type, $which ) { | |
if ( 'event' !== $post_type ) | |
return; | |
$taxonomies = array( 'event_category', 'event_location' ); | |
foreach ( $taxonomies as $taxonomy_slug ) { | |
$taxonomy_obj = get_taxonomy( $taxonomy_slug ); | |
$taxonomy_name = $taxonomy_obj->labels->name; | |
$terms = get_terms( $taxonomy_slug ); | |
echo "<select name='{$taxonomy_slug}' id='{$taxonomy_slug}' class='postform'>"; |
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
/** | |
*** SIMPLE GRID | |
*** (C) ZACH COLE 2016 | |
*** https://github.com/zachacole/Simple-Grid/blob/master/simple-grid.css | |
*** modified by SolusiPress | |
**/ | |
/* ==== GRID SYSTEM ==== */ | |
.container { | |
width: 90%; |
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_action( 'cmb2_admin_init', 'solusipress_event_detail_metaboxes' ); | |
add_action( 'cmb2_admin_init', 'solusipress_event_price_metaboxes' ); | |
function solusipress_event_detail_metaboxes() { | |
$prefix = '_spevt_'; | |
$cmb = new_cmb2_box( array( | |
'id' => 'spevt_event_metabox', |
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( 'solusipress_event_date_price', 'solusipress_event_date_price_cb' ); | |
add_shortcode( 'solusipress_event_sponsors', 'solusipress_event_sponsors_cb' ); | |
function solusipress_event_date_price_cb( $atts ) { | |
$prefix = '_spevt_'; | |
$meta_d1 = get_post_meta( get_the_ID(), $prefix.'start_date', true ); | |
$meta_d2 = get_post_meta( get_the_ID(), $prefix.'end_date', true ); | |
$price = get_post_meta( get_the_ID(), $prefix.'price', true ); |
OlderNewer