Decrease Auto-Save Interval
if ( ! defined( ‘AUTOSAVE_INTERVAL’ ) ) { // Change 5 to the number of minutes you want to use. define( ‘AUTOSAVE_INTERVAL’, 5 * MINUTE_IN_SECONDS ); }Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
if ( ! defined( ‘AUTOSAVE_INTERVAL’ ) ) { // Change 5 to the number of minutes you want to use. define( ‘AUTOSAVE_INTERVAL’, 5 * MINUTE_IN_SECONDS ); }Continue reading
add_filter( ‘wp_revisions_to_keep’, function( $limit ) { // Limit to the last 20 revisions. Change 20 to whatever limit you want. return 20; } );Continue reading
remove_action( ‘xmlrpc_rsd_apis’, ‘rest_output_rsd’ ); remove_action( ‘wp_head’, ‘rest_output_link_wp_head’ ); remove_action( ‘template_redirect’, ‘rest_output_link_header’, 11 );Continue reading
remove_action(‘wp_head’, ‘wp_shortlink_wp_head’ );Continue reading
remove_action(‘wp_head’, ‘feed_links’, 2 ); remove_action(‘wp_head’, ‘feed_links_extra’, 3 );Continue reading
add_filter( ‘manage_posts_columns’, function ( $columns ) { // You can change this to any other position by changing ‘title’ to the name of the column you want to put it after. $move_after = ‘title’; $move_after_key = array_search( $move_after, array_keys( $columns…Continue reading
add_filter( ‘wcv_product_price’, ‘price_min_max’ ); function price_min_max( $args ) { $args[‘custom_attributes’] = array( ‘min’ => 3, ‘max’ => 200, ‘data-parsley-type’ => ‘number’, ‘data-parsley-range-message’ => __( ‘Price must be between 3 and 200’, ‘wcvendors-pro’ ), ‘pattern’ => ‘\d*’, ); return $args; }Continue reading
function frm_default_custom_scripts( $scripts ){ $scripts->add( ‘iris’, ‘/wp-admin/js/iris.min.js’, array( ‘jquery-ui-draggable’, ‘jquery-ui-slider’, ‘jquery-touch-punch’ ), ‘1.1.1’, 1 ); $scripts->add( ‘wp-color-picker’, “/wp-admin/js/color-picker.js”, array( ‘iris’ ), false, 1 ); $scripts->set_translations( ‘wp-color-picker’ ); $custom_css = ‘.frm-color-picker .button.wp-color-result{border-radius: var(–border-radius) !important}’ . ‘.frm-color-picker .wp-picker-container{position:relative}’ . ‘.frm-color-picker .wp-picker-clear, .frm-color-picker…Continue reading
function child_support_calculator_shortcode() { // Enqueue the JavaScript wp_enqueue_script(‘child-support-calculator’, get_template_directory_uri() . ‘/path-to-your-js-folder/child-support-calculator.js’, array(‘jquery’), ‘1.0.0’, true); ob_start(); include get_template_directory() . ‘/path-to-your-html-folder/child-support-form.html’; return ob_get_clean(); } add_shortcode(‘child_support_calculator’, ‘child_support_calculator_shortcode’); Javascript document.addEventListener(“DOMContentLoaded”, function() { document.getElementById(“childSupportForm”).addEventListener(“submit”, function(event) { event.preventDefault(); const grossIncome = parseFloat(document.getElementById(“grossIncome”).value); let numChildren = parseInt(document.getElementById(“numChildren”).value);…Continue reading