Giter VIP home page Giter VIP logo

dumpr's Introduction

Dumpr WordPress plugin

WARNING: Curently in testing phase. Do not use in production sites!

Laravel d() and dd() and Symfony Dump() functions for WordPress theme development.

Contributors: vanaf1979
Donate link: https://vanaf1979.nl/
Tags: laravel, symfony, var, dumper, var-dumper
Requires at least: 5.3
Tested up to: 5.3
Stable tag: 5.3
Requires PHP: 7.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html



Example output



Description

The Dumpr plugin provides d() and dd() debugging functions similar to the ones found in the Laravel PHP Framework.

Behind the scenes this plugin, like the Laravel framework, uses the Symfony Var-Dumper package and thus it also provides a dump() function.

To dump post objects your can use the extra dp() and dpd() functions.

To prevent any unintended output in production sites the provided functions only return output when WP_DEBUG is set to true in your wp-config.php file.

NOTE: If you use any of the provided functions and deactivate/remove the plugin a fatal error will occur.

Examples:

<?php 
// Dump a single variable.
d($some_var);

// The d() and dd() functions except multiple varialbes.
d($some_var, $som_other_var);

// Dump a variable and die.
dd($some_var);

// Dump a variable using the dump function from var-dumper.
dump($some_var);

// Dump the current post object with meta values.
dp();

// Dump a post object by reference with meta values.
dp($post);

// Dump the post object with id 1 including meta values.
dp(1);

// Dump the current post object with meta values and die.
dpd(); 
?>



Installation

  1. Download Dumpr from this repository.
  2. Upload Dumpr files to the /wp-content/plugins/dumpr directory.
  3. Activate Dumpr from your Plugins page.
  4. Enable debugging in your wp-config.php file. define( 'WP_DEBUG', true );
  5. Use the functions in your theme's code.



Bugs

If you find any bugs with this plugin please open a issue.



Contributing

This repository uses GitFlow.

  1. Fork this repository and create a new branche starting from the develop branch.
  2. Make your changes.
  3. Issue a pull request back into the develop branch.

dumpr's People

Contributors

vanaf1979 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.