Skip to content

Instantly share code, notes, and snippets.

View litonarefin's full-sized avatar
🎯
Focusing

Liton Arefin litonarefin

🎯
Focusing
View GitHub Profile
## Undocumented use of a 3rd Party or external service
You call LINK
While this is actually okay, you neglected to fully document this in your readme.
We require plugins that reach out to other services to disclose this, in clear and plain language, so users are aware of where data is being sent. This allows them to ensure that any legal issues with data transmissions are covered (like people in the EU). This is true even if YOU are the 3rd party service.
In order to do so, you must update your readme to do the following:
@litonarefin
litonarefin / deploy.sh
Created December 23, 2022 08:28 — forked from BFTrick/deploy.sh
WordPress Plugin Deploy Script
#! /bin/bash
# A modification of Dean Clatworthy's deploy script as found here: https://github.com/deanc/wordpress-plugin-git-svn
# The difference is that this script lives in the plugin's git repo & doesn't require an existing SVN repo.
# main config
PLUGINSLUG="______your-plugin-name______"
CURRENTDIR=`pwd`
MAINFILE="______your-plugin-name______.php" # this should be the name of your main php file in the wordpress plugin
# git config
@litonarefin
litonarefin / gitignore-for-wordpress-theme
Created November 12, 2022 12:21 — forked from jasewarner/gitignore-for-wordpress-theme
WordPress project .gitignore
# ignore everything in the root except the "wp-content" directory.
/*
!wp-content/
# ignore everything in the "wp-content" directory, except:
# mu-plugins, plugins, and themes directories
wp-content/*
!wp-content/mu-plugins/
!wp-content/plugins/
!wp-content/themes/
@litonarefin
litonarefin / temporary-email-address-domains
Created October 7, 2022 03:48 — forked from adamloving/temporary-email-address-domains
A list of domains for disposable and temporary email addresses. Useful for filtering your email list to increase open rates (sending email to these domains likely will not be opened).
0-mail.com
0815.ru
0clickemail.com
0wnd.net
0wnd.org
10minutemail.com
20minutemail.com
2prong.com
30minutemail.com
3d-painting.com
/** Disable REST API **/
// Filters for WP-API version 1.x
add_filter('json_enabled', '__return_false');
add_filter('json_jsonp_enabled', '__return_false');
// Filters for WP-API version 2.x
// add_filter('rest_enabled', '__return_false');
add_filter('rest_jsonp_enabled', '__return_false');
<?php
if (!class_exists('CSF_Callback_Testing')) {
class CSF_Callback_Testing
{
public $prefix = '_testing_callback';
public $options;
@litonarefin
litonarefin / clean_wordpress_head.php
Created March 31, 2021 15:20 — forked from robwent/clean_wordpress_head.php
A collection of snippets for a Wordpress theme's function.php file to clean up the output
<?php
/**
* Core output
**/
//Remove the generator tag
remove_action('wp_head', 'wp_generator');
//Remove the frontend admin bar while in development
<?php
class Capture
{
/**
* Capture web screenshot using google api.
*
* @param (string) $url Valid url
*
* @return blob
@litonarefin
litonarefin / .htaccess
Created May 29, 2020 12:02 — forked from ankurk91/.htaccess
Some .htaccess tips and tricks
# Source internet
# Use at your own risk, test on localhost first
# Ovrride Default index.php
DirectoryIndex home.php
# Prevent access to some files
<FilesMatch "^(wp-config.php|readme.html|license.txt|README.md|.gitignore|.gitattributes|.htaccess|error_log)">
Order allow,deny
Deny from all
@litonarefin
litonarefin / CreateWordpressUser.php
Created March 11, 2020 10:04 — forked from jawinn/CreateWordpressUser.php
Create WordPress Admin User from PHP
<?php
// ADD NEW ADMIN USER TO WORDPRESS
// ----------------------------------
// Put this file in your Wordpress root directory and run it from your browser.
// Delete it when you're done.
require_once('wp-blog-header.php');
require_once('wp-includes/registration.php');
// ----------------------------------------------------