/** * Plugin Name: AAA Sample Plugin * Plugin URI: https://easydigitaldownloads.com * Description: Illustrates how to include an updater in your plugin for EDD Software Licensing. * Author: Sandhills Development, LLC * Author URI: https://easydigitaldownloads.com * Version: 1.0.0 * License:…Continue reading
function add_categories_to_pages() { register_taxonomy_for_object_type( ‘category’, ‘page’ ); } add_action( ‘init’, ‘add_categories_to_pages’ ); function add_tags_to_pages() { register_taxonomy_for_object_type( ‘post_tag’, ‘page’ ); } add_action( ‘init’, ‘add_tags_to_pages’);Continue reading
function mobile_menu_shortcode( $atts ) { $atts = shortcode_atts( array( ‘menu_id’ => ”, // Optional menu ID ‘svg_url’ => ”, // Optional SVG URL for submenu toggle icon ), $atts, ‘mobile_menu’ ); // If no menu ID provided, get the first…Continue reading
/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading
/** * WPForms QuizMaster Integration Standalone Snippet. */ add_action( ‘wpforms_loaded’, function () { if ( ! class_exists( ‘MLWQuizMasterNext’ ) ) { return; } new WPForms_QuizMaster_Integration(); } ); class WPForms_QuizMaster_Integration { /** * Constant representing the action to process a quiz.…Continue reading
add_action( ‘set_current_user’, ‘wpforms_fix_umbrella_get_snapshot_data’ ); /** * Executes the WPForms updater based on a specific POST request action, allowing a snapshot to be taken for WP Umbrella compatibility. */ function wpforms_fix_umbrella_get_snapshot_data() { // Check if this is a POST request with…Continue reading
/** * Calculates a future date in a WPForms Date / Time field based on a Number field. * Form ID: 775 * Number Field ID: 1 * Date Field ID: 4 */ function wpf_custom_date_calculator_script() { ?>Continue reading
/** * Enable JSON and SVG uploads for administrator users only. */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // Only allow for administrators if ( ! current_user_can( ‘administrator’ ) ) { return $upload_mimes; } // Add SVG support $upload_mimes[‘svg’]…Continue reading