om-custom-redirect-close.js

jQuery(document).ready(function($){ function omRedirect() { var url = “https://optinmonster.com”; $(location).attr(‘href’,url); } $(document).on(‘OptinMonsterOnClose’, function(event, data, object){ if(data.optin = ‘YOUR_OPTIN_SLUG_HERE’) { omRedirect(); } }); });Continue reading

om-custom-redirect-all-close.js

jQuery(document).ready(function($){ function omRedirect() { var url = “https://optinmonster.com”; $(location).attr(‘href’,url); } $(document).on(‘OptinMonsterOnClose’, function(event, data, object){ omRedirect(); }); });Continue reading

Untitled Snippet (copy)

(self.SWG_BASIC = self.SWG_BASIC || []).push( basicSubscriptions => { basicSubscriptions.init({ type: “NewsArticle”, isPartOfType: [“Product”], isPartOfProductId: “CAow7ue8DA:openaccess”, clientOptions: { theme: “light”, lang: “id” }, }); }); </scriptContinue reading

Untitled Snippet

(self.SWG_BASIC = self.SWG_BASIC || []).push( basicSubscriptions => { basicSubscriptions.init({ type: “NewsArticle”, isPartOfType: [“Product”], isPartOfProductId: “CAow7ue8DA:openaccess”, clientOptions: { theme: “light”, lang: “id” }, }); });Continue reading

Gravity Forms PHP Helpers

const IC_REGEXP_KATAKANA = “/\A[ア-ンガ-ボァ-ョヮッーヴ]+\z/”; const IC_REGEXP_POST_CODE_JP = “/\A\d{3}-?\d{4}\z/”; const IC_REGEXP_PHONE = “/\A\+?[1-9]\d{1,14}\z/”; add_filter(‘gform_field_validation’, ‘icFormValidation’, 10, 4); function icFormValidation($result, $value, $form, $field) { // カタカナのみの入力 if(preg_match(‘/\bkatakana\b/’, $field->cssClass) && !empty($value) && !preg_match(IC_REGEXP_KATAKANA, $value)) { $result[‘is_valid’] = false; $result[‘message’] = implode(‘ ‘, array_filter([$result[‘message’],…Continue reading