Audience: OttoKit engineering / App Builder team
Purpose: Native Trigv connector configuration (authentication + send-notification action)
API spec:public/openapi.yaml·trigv-api-reference.md
Production base URL:https://api.trigv.com/api
Last updated: 2026-07-09
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 | |
| /** | |
| * Calculate optimal foreground (#ffffff or #000000) for a given hex background. | |
| * | |
| * Uses WCAG relative luminance; threshold where contrast with white equals | |
| * contrast with black is approximately 0.179. | |
| * | |
| * @since 1.0.0 | |
| * |
To set up php linting, you’ll want to install this PHP CodeSniffer repo and configure with this WordPress Coding Standards repo: . There are a number of ways to do this, whether direct download, Composer, Homebrew, Pear, etc. The following is what works for me on MacOS using Homebrew:
In a terminal window on your Mac, start by updating your Homebrew.
brew doctor
Then install the Code Sniffer:
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
| { | |
| "version": 2, | |
| "$schema": "https://schemas.wp.org/trunk/theme.json", | |
| "templateParts": [], | |
| "customTemplates": [], | |
| "settings": { | |
| "layout": {}, | |
| "spacing": {}, | |
| "border": {}, | |
| "color": {}, |
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
| add_action('init', array($this, 'add_widget_most_recommended_posts_old')); | |
| //add_action('widgets_init', array($this, 'widget_most_recommended_posts')); | |
| /*--------------------------------------------* | |
| * Widget | |
| *--------------------------------------------*/ | |
| function add_widget_most_recommended_posts_old() { | |
| function most_recommended_posts($numberOf, $before, $after, $show_count, $post_type = "post", $raw = false) { |
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
| //$plugin = plugin_basename(__FILE__); | |
| //echo $this->plugin_file; | |
| //echo plugin_dir_path( $this->plugin_file ); | |
| //echo plugin_dir_path( dirname($this->plugin_file) ); | |
| echo plugin_basename($this->plugin_file); | |
| //echo plugin_basename(dirname(__FILE__)); |
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 | |
| // ============================================================================= | |
| // FUNCTIONS.PHP | |
| // ----------------------------------------------------------------------------- | |
| // Overwrite or add your own custom functions to Pro in this file. | |
| // ============================================================================= | |
| // ============================================================================= | |
| // TABLE OF CONTENTS |
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
| <input type="email" name="email" required placeholder="Enter Email" | |
| oninvalid="this.setCustomValidity('Free email providers are not allowed')" | |
| oninput="this.setCustomValidity('')" | |
| pattern="^(?!.*@(?:hotmail|gmail|ymail|googlemail|live|gmx|yahoo|outlook|msn|icloud|facebook|aol|zoho|mail|yandex|hushmail|lycox|lycosmail|inbox|myway|aim|fastmail|goowy|juno|shortmail|atmail|protonmail)\.\w+$).*$" | |
| /> | |
| /** | |
| lap [7:38 PM] | |
| if you use oninvalid= do not forget the oninput="this.setCustomValidity('')" |
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
| // Mark virtual orders as complete instead of processing | |
| function rp4wp_virtual_order_payment_complete_order_status( $order_status, $order_id ) { | |
| $order = new WC_Order( $order_id ); | |
| if ( 'processing' == $order_status && ( 'on-hold' == $order->status || 'pending' == $order->status || 'failed' == $order->status ) ) { | |
| $virtual_order = false; | |
| if ( count( $order->get_items() ) > 0 ) { |
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
| jQuery('body').click(function(e) { | |
| Boxzilla.dismiss(); | |
| }); | |
| jQuery('#boxzilla-overlay').click(function(e) { | |
| Boxzilla.dismiss(); | |
| }); |
NewerOlder