Make WordPress Core

Ticket #43292: 43292.diff

File 43292.diff, 638 bytes (added by danieltj, 6 years ago)

Basic function use-case.

  • wp-includes/pluggable.php

    diff --git wp-includes/pluggable.php wp-includes/pluggable.php
    index 32fab32..422efb4 100644
    function wp_text_diff( $left_string, $right_string, $args = null ) { 
    26352635}
    26362636endif;
    26372637
     2638if ( !function_exists('dd') ) :
     2639/**
     2640 * Dump the variable contents and die.
     2641 *
     2642 * Uses `var_dump` to print the contents of a variable out and then
     2643 * immediately calls `die` to prevent further script execution.
     2644 *
     2645 * @since 4.9
     2646 *
     2647 * @param mixed $var The variable to dump.
     2648 *
     2649 * @return mixed $var
     2650 */
     2651function dd($var) {
     2652        var_dump($var);
     2653        wp_die();
     2654}
     2655endif;
     2656