Add to Console Log 1
Photo Credit

Add to Console Log

Version: 1.1

Adds an editable message to the console log inspector.

How to Use

Download > Install > Activate. Use your favorite IDE or just edit within the WordPress plugin editor. Change the message to suit your needs.

Example

A fun project plugin. Thought of this after discovering a software company had a message about their open positions in the console. I was just curious about the tech-stack and still got served content lol. I added a message for all my visitors too, go check it out. If you don't see anything, make sure your browser console is configured to show logs.

Source

This code can be pasted into the functions.php file of your child theme or, download and install the plugin for simple code activation.
/*
Plugin Name: Lightweight Plugins - Add to Console Log
Plugin URI: https://lightweightplugins.com/plugin/add-to-console-log
Description: Adds a message to the console log. Say hi to other developers!
Version: 1.1
Author: WP Maintenance Experts
Author URI: https://wpmaintenanceexperts.com/
License: GPLv2 or later
*/

function lightweight_plugins_add_console_message() {
    ?>
        <script>
            console.log("Add your message here!");
        </script>
    <?php
}
add_action('wp_head', 'lightweight_plugins_add_console_message');

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *