Skip to content

Instantly share code, notes, and snippets.

@stingray82
stingray82 / Tapermonkey.js
Created March 3, 2026 19:20
Flowmattic - Execution show ---> Task History
// ==UserScript==
// @name FlowMattic - Make Execution Count Clickable
// @namespace https://example.local/
// @version 1.0.0
// @description Turns the "Executions" count into a link to View History for each workflow row.
// @match *://*/wp-admin/admin.php?page=flowmattic-workflows*
// @match *://*/wp-admin/admin.php?page=flowmattic*
// @run-at document-end
// @grant none
// ==/UserScript==
@stingray82
stingray82 / EmailBoxController.txt
Created February 5, 2026 22:54
FluentSupport emailbox controller
<?php
namespace FluentSupportPro\App\Http\Controllers;
use FluentSupport\App\App;
use FluentSupport\App\Http\Controllers\Controller;
use FluentSupport\App\Models\Customer;
use FluentSupport\App\Models\Meta;
use FluentSupport\App\Models\MailBox;
use FluentSupport\Framework\Request\Request;
@stingray82
stingray82 / Snippet.php
Created February 5, 2026 22:50
Pipe Email example using fluentsupport and flowmattic IMAP data (Simulate)
<?php
/* Fluent Support Piping Text #6 */
if (!defined('ABSPATH')) exit;
add_action('admin_bar_menu', function ($wp_admin_bar) {
if (!current_user_can('manage_options') || !is_admin_bar_showing()) {
return;
}
@stingray82
stingray82 / js.js
Created January 11, 2026 10:54
Flowmattic MyCred
/* global FlowMatticWorkflow, FlowMatticWorkflowEvents, FlowMatticWorkflowApp, FlowMatticWorkflowSteps */
var FlowMatticWorkflow = FlowMatticWorkflow || {};
( function( $ ) {
jQuery( document ).ready( function() {
// Workflow Trigger Mycred View.
FlowMatticWorkflow.MycredView = Backbone.View.extend( {
template: FlowMatticWorkflow.template( jQuery( '#flowmattic-application-mycred-data-template' ).html() ),
actionTemplate: FlowMatticWorkflow.template( jQuery( '#flowmattic-application-mycred-action-data-template' ).html() ),
@stingray82
stingray82 / admin__wp-reset.php
Created December 28, 2025 20:26
Devkit - Alternative delete_plugins() - This allows additional protected plugins using a filter
public function delete_plugins() {
require_once ABSPATH . 'wp-admin/includes/plugin.php';
require_once ABSPATH . 'wp-admin/includes/file.php';
// Plugin basenames you NEVER want to delete
$protected = array(
DPDEV_BASE, // devkit itself
);
// Let other code add more protected plugins
@stingray82
stingray82 / Fix.php
Created December 2, 2025 23:21
Updated Requests for dplugin updater hotfix
// Add this to the main file
// Disable requests only for devkit/devkit.php.
//add_filter( 'devkit_dpupdatechecker_enable_request_devkit_devkit_php', '__return_false' );
//Then update inc/update.php with this
public function request() {
// 0) Allow disabling / short-circuiting the request via filters.
// Global toggle for all plugins using this updater.
@stingray82
stingray82 / snippet.php
Created December 2, 2025 23:08
Hoster Filter Suggestion
Add Filter to Requests simlar to:
public function request() {
// 1) Global toggle for all plugins using hoster updater
$enabled = apply_filters(
'devkit_dpupdatechecker_enable_request',
true,
$this->slug,
$this
@stingray82
stingray82 / updater.php
Created December 2, 2025 22:57
Hoster Updater.php - Set Transient on error
public function request() {
$remote = get_transient( $this->cache_key );
// If we have any cached value (success OR failure) take note.
if ( false !== $remote ) {
if ( ! is_array( $remote ) ) {
$decoded = json_decode( $remote );
if ( json_last_error() === JSON_ERROR_NONE ) {
$remote = $decoded;
}
@stingray82
stingray82 / Snippet.php
Created October 26, 2025 21:28
MainWP Icon's Testing
<?php
add_filter('mainwp_before_save_cached_icons', function ($cached_icons, $icon, $slug, $type, $custom_icon, $noexp) {
// Use the SAME raw links as before
$map_urls = [
'plugin' => 'https://raw.githubusercontent.com/stingray82/mainwp-plugin-icons/main/icons-map.json',
'theme' => 'https://raw.githubusercontent.com/stingray82/mainwp-plugin-icons/main/themes-icons-map.json',
];