Giter Site home page Giter Site logo

aaemnnosttv / log-http-requests Goto Github PK

View Code? Open in Web Editor NEW

This project forked from facetwp/log-http-requests

0.0 2.0 0.0 26 KB

A small plugin to log WP_HTTP requests for easy viewing.

Home Page: https://wordpress.org/plugins/log-http-requests/

PHP 72.60% CSS 8.31% JavaScript 19.09%

log-http-requests's Introduction

=== Log HTTP Requests ===
Contributors: mgibbs189
Tags: log, wp_http, requests, update checks, api
Requires at least: 4.9
Tested up to: 5.3
Stable tag: trunk
License: GPLv2

Log and view all WP HTTP requests

== Description ==

= Log and view all WP HTTP requests =

How long do [core / plugin / theme] update checks take to run? What data about my site is being sent out? What about all those ajax requests? The answers to these questions are just a few clicks away.

This plugin logs all WP_HTTP requests and displays them in a table listing for easy viewing. It also stores the runtime of each HTTP request.

= Available Hooks =
Customize the length (in days) before older log items are removed:

<pre>
add_filter( 'lhr_expiration_days', function( $days ) {
    return 7; // default = 1
});
</pre>

Don't log items from a specific hostname:

<pre>
add_filter( 'lhr_log_data', function( $data ) {
    if ( false !== strpos( $data['url'], 'wordpress.org' ) ) {
        return false;
    }
    return $data;
});
</pre>

In the above example, the `$data` array keys correspond to columns within the `lhr_log` database table.

= Important Links =
* [Github โ†’](https://github.com/FacetWP/log-http-requests)

== Installation ==

1. Download and activate the plugin.
2. Browse to the `Log HTTP Requests` menu to view log entries.

== Changelog ==

= 1.1 =
* Added `lhr_log_data` hook to customize logged data (return FALSE to skip logging)
* Added `lhr_expiration_days` hook

= 1.0.4 =
* Minor styling tweak

= 1.0.3 =
* Better visibility for long URLs

= 1.0.2 =
* Minor design tweaks
* Replaced `json_encode` with `wp_send_json`

= 1.0.1 =
* Tested compatibility against WP 4.9.4

= 1.0.0 =
* Initial release

log-http-requests's People

Contributors

danielbachhuber avatar mgibbs189 avatar

Watchers

 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.