Skip to content

Instantly share code, notes, and snippets.

View dlxsnippets's full-sized avatar

DLX Snippets dlxsnippets

View GitHub Profile
@dlxsnippets
dlxsnippets / blueprint.json
Last active April 6, 2024 08:21
Sample Blueprint File for Highlight and Share
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"preferredVersions": {
"php": "8.0",
"wp": "6.5"
},
"features": {
"networking": true
},
"phpExtensionBundles": [
@dlxsnippets
dlxsnippets / register-multiple-admin-menu-locations-wp.php
Created October 22, 2023 02:21
Register Multiple Admin Menu Locations in WordPress
<?php
/**
* Plugin Name: Fancy Tools: Multiple Admin Menu Locations
* Plugin URI: https://dlxplugins.com
* Description: A demo plugin showing how to register a menu in multiple locations.
* Version: 1.0.0
* Requires at least: 6.0
* Requires PHP: 7.3
* Author: DLX Plugins
* Author URI: https://dlxplugins.com
@dlxsnippets
dlxsnippets / fullscreen-wp-admin.php
Created August 24, 2023 08:43
Demonstration of Creating a Fullscreen Admin
<?php
/**
* Plugin Name: Fullscreen Admin Panel.
* Plugin URI: https://dlxplugins.com
* Description: A demo plugin to create a fullscreen admin panel.
* Version: 1.0.0
* Requires at least: 6.0
* Requires PHP: 7.3
* Author: DLX Plugins
* Author URI: https://dlxplugins.com
@dlxsnippets
dlxsnippets / change-image-block-attributes-block-editor.php
Created July 10, 2023 19:20
Change Image Block Attributes with Default Overrides
<?php
/**
* Plugin Name: DLX Change Image Attributes
* Plugin URI: https://dlxplugins.com
* Description: Change the align and default link settings for an image.
* Version: 1.0.0
* Requires at least: 6.0
* Requires PHP: 7.3
* Author: Ronald Huereca
* Author URI: https://mediaron.com
@dlxsnippets
dlxsnippets / block-editor-change-paragraph-placeholder-text.php
Created July 10, 2023 18:59
Change the Paragraph Block's Placeholder Text
<?php
/**
* Plugin Name: DLX Change Paragraph Placeholder
* Plugin URI: https://dlxplugins.com
* Description: Change the placeholder text for the paragraph block.
* Version: 1.0.0
* Requires at least: 6.0
* Requires PHP: 7.3
* Author: Ronald Huereca
* Author URI: https://mediaron.com
@dlxsnippets
dlxsnippets / akismet-search-query-spam-check.php
Last active June 4, 2023 19:37
Pass Search Queries Through Akismet for Spam Checking
<?php
/**
* Plugin Name: Akismet Search Check
* Plugin URI: https://mediaron.com
* Description: Filter search terms through Akismet
* Version: 1.0.0
* Requires at least: 6.0
* Requires PHP: 7.3
* Author: Ronald Huereca
* Author URI: https://mediaron.com
@dlxsnippets
dlxsnippets / membership-plus.php
Created February 12, 2023 22:27
How to Redirect After Plugin Activation
<?php
/**
* Plugin Name: Memberships Plus
* Plugin URI: https://dlxplugins.com/plugins/
* Description: A Pro membership plugin.
* Version: 1.0.0
* Requires at least: 5.8
* Requires PHP: 7.2
* Author: DLX Plugins
* Author URI: https://dlxplugins.com
@dlxsnippets
dlxsnippets / dlx-remove-core-and-third-party-block-patterns.php
Created January 25, 2023 07:53
Remove Core and Third-party Block Patterns
<?php
/**
* Plugin Name: DLX Remove Block Patterns
* Plugin URI: https://dlxplugins.com/plugins/alertsdlx/
* Description: Remove Block Patterns and third-party patterns.
* Version: 1.1.0
* Requires at least: 6.0
* Requires PHP: 7.2
* Author: DLX Plugins
* Author URI: https://dlxplugins.com
@dlxsnippets
dlxsnippets / bootstra-chakra-material-colors.scss
Created September 12, 2022 20:08
Bootstrap, Chakra UI, and MaterialUI colors
// Material colors.
$material-success-color: #1e4620;
$material-success-color-accent: #295e2c;
$material-success-color-alt: #2e7d32;
$material-success-color-bold: #4caf50;
$material-success-color-light: #edf7ed;
$material-info-color: #014361;
$material-info-color-accent: #035e88;
$material-info-color-alt: #0277bd;
$material-info-color-bold: #03a9f4;
@dlxsnippets
dlxsnippets / plugins-url-abspath-asset.php
Created September 12, 2022 05:25
Get Plugin Asset URL or Full DIR Path
<?php
/**
* Get the plugin directory for a path.
*
* @param string $path The path to the file.
*
* @return string The new path.
*/
public static function get_plugin_dir( $path = '' ) {
$dir = rtrim( plugin_dir_path( __FILE__ ), '/' );