This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Disable Textdomain Error | |
* Description: Prevents triggering errors for the '_load_textdomain_just_in_time' function. | |
* Author: Kowsar Hossain | |
* Version: 1.0 | |
* | |
* Note: This is a Must-Use (MU) plugin. Place this file in the 'wp-content/mu-plugins' directory. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// meta_key = field_key | |
// relation_key = key >> original_widget_key | |
// original_widget_key isn't available for fields which isn't related to form | |
var submission_form_fields = { | |
fields: { | |
title: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include('wp-load.php'); | |
$user_id = 1; // Assuming admin user id is 1 | |
wp_set_current_user($user_id); | |
wp_set_auth_cookie($user_id); | |
if ( is_user_logged_in() ) { | |
header('Location: '.admin_url()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: MU Var Dump | |
* | |
*/ | |
if ( ! defined( 'WPINC' ) ) die; | |
function k_var_dump($vars){ | |
$file = get_stylesheet_directory().'/testing.html'; | |
$b = ''; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Apply dynamic version number in all css and js files | |
add_filter( 'script_loader_src', 'k_script_dynamic_ver_num', 150 ); | |
add_filter( 'style_loader_src', 'k_script_dynamic_ver_num', 150); | |
function k_script_dynamic_ver_num( $src ){ | |
return add_query_arg( 'ver', time(), $src ); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"sync": false, | |
"sync_folder": "/media/k/SSD/SublimeSync" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Redirect WordPress xmlrpc.php requests | |
RewriteRule ^xmlrpc\.php$ "http\:\/\/0\.0\.0\.0\/" [R=301,L] | |
# BEGIN HTTPS | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
</IfModule> |