WordPress Typography Enhancement: Preventing Widows in Conten
This code is a WordPress filter designed to prevent "widows" in typography within the content displayed…
create_folder_and_upload_file
Creating a folder directly inside the WordPress Media Library through code requires understanding that the WordPress…
Limit Uploaded Image Size
Set a max width and height for your image uploads to save space.
Defining SparkPost Mailer Constants
This snippet will prevent users from changing WP Mail SMTP settings in your WordPress admin area…
om-nextjs14.js
'use client'; import { usePathname } from 'next/navigation'; import { useEffect, useState } from 'react'; export…
om-change-view.js
// Show the Yes/No view om{{id}}.changeView('yesno'); // Show the Optin view om{{id}}.changeView('optin'); // Show the Success…
And the Javascript to turn your HTML link into a MonsterLink v2
jQuery(document).ready(function($) { $('a[class*="campaign"]').addClass("manual-optin-trigger"); $('a[class*="campaign"]').attr("data-optin-slug", "pm6fnflhiocj7cge"); });
om-available.js
document.addEventListener('om.Campaign.load', function(event) { console.log(event.detail); } );
Smooth Scrolling
html { scroll-behavior: smooth; }
Untitled Snippet
document.addEventListener("DOMContentLoaded", () => { const canvas = document.getElementById("canvas"); const ctx = canvas.getContext("2d"); const expressionInput = document.getElementById("expressionInput");…
Retroactive Lifetime Licenses
Mark all existing licenses for an EDD product as lifetime licenses.
Vendor Canonical Links
Makes the vendor canonical links go to yoursite/vendor/vendor-name instead of yoursite/vendor.
Add a custom column to Commission table
/** * Add custom columns label * * @param Array $columns array stored column names *…