Skip to content

Instantly share code, notes, and snippets.

View thelovekesh's full-sized avatar

Lovekesh Kumar thelovekesh

View GitHub Profile

Keybase proof

I hereby claim:

  • I am thelovekesh on github.
  • I am thelovekesh (https://keybase.io/thelovekesh) on keybase.
  • I have a public key ASDD62OxaI0iYQk-BcbLz1T3WIizLM9ZW030mFmRa3MJOwo

To claim this, I am signing this object:

Features Plugin POC

This plugin is a POC to introduce new Plguin Skeleton for future plugin projects which ships with new functionalites discussed below.

Plugin Structure

Expand Plugin Structure
|-- Features_Plugin
@thelovekesh
thelovekesh / demo-site-health.php
Created March 20, 2022 09:27
Add site health tests to your WordPress site health screen
<?php
/**
* Plugin Name: Demo Site Health Test
* Description: Add site health tests to the WordPress site-health dashboard.
* Version: 1.0.0
* Requires at least: 5.1
* Requires PHP: 5.6
* Author: thelovekesh
* Author URI: https://thelovekesh.com/
* License: GPL v2 or later
@thelovekesh
thelovekesh / get-logged-in-user.php
Created March 20, 2022 08:58
Find whether a user is logged in or not from the user ID in WordPress
<?php
/**
* Plugin Name: Find Logged-in User by ID
* Author: thelovekesh
* Description: This plugin will find the logged-in user by ID.
* Text Domain: thelovekesh
*
* @package thelovekesh
*/
@thelovekesh
thelovekesh / PWA
Created March 2, 2022 09:53
Private Discussion about PWA devtools tisps
// Silence is golden.
@thelovekesh
thelovekesh / example.com.conf
Created May 21, 2021 15:31
Best HTTP security headers for Nginx
# Include these headers in /etc/nginx/sites-available/example.com.conf file
# security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "no-referrer-when-downgrade" always;
add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline'" always;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;