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
function accessible_slick_shortcode($atts) { | |
$atts = shortcode_atts([ | |
'imgid' => '' | |
], $atts); | |
$img_ids = explode(',', $atts['imgid']); | |
if (empty($img_ids)) { | |
return '<p>No images found.</p>'; | |
} |
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
function export_gf_entries(){ | |
$send_to = $_REQUEST['sendto'] ?? 'youremailhere'; | |
$form_id = $_REQUEST['fid'] ?? 1; | |
$form = RGFormsModel::get_form_meta($form_id); | |
$fields = array(); | |
if(is_array($form["fields"])){ | |
foreach($form["fields"] as $field){ |
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
// Create the client_admin role | |
function create_client_admin_role() { | |
add_role( | |
'client_admin', | |
'Client Admin', | |
get_role('administrator')->capabilities | |
); | |
} | |
add_action('init', 'create_client_admin_role'); |
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: Server Timing Extra | |
* Plugin URI: https://gist.github.com/felixarntz/63c05392dbf7d51cc7f8f4a424b1ff39 | |
* Description: Exposes additional Server-Timing metrics using the Performance Lab plugin's Server Timing API. | |
* Requires at least: 6.1 | |
* Requires PHP: 5.6 | |
* Version: 0.1.0 | |
* Author: Felix Arntz | |
* Author URI: https://felix-arntz.me |
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 | |
// 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'); | |
// ---------------------------------------------------- |
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
-> go to all sites > Add new site | |
-> After adding go to all All sites again and edit the newly added site.. change it's url to https://dev.test.com/ | |
-> After that you have to go to all domains in cpanel. | |
-> Change the directory path of https://dev.test.com/ to public_html | |
-> Next.. go to wp-config.php in public_html | |
Change | |
define('DOMAIN_CURRENT_SITE', 'dev.whatever.com'); | |
to |
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
Add this to your HTACCESS make sure the down.php exists. | |
RewriteEngine On | |
RewriteBase / | |
#add exception for your IP address | |
RewriteCond %{REMOTE_ADDR} !111\.111\.111\.111$ | |
RewriteCond %{REQUEST_URI} !^/down\.php$ RewriteRule ^(.*)$ /site-offine.php [L] |
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
Some basic commands to get you started if you are familiar with ssh. | |
Find common problems in wordpress hacks | |
Finds eval or base64 decode | |
grep -ri "eval" [path] | |
grep -ri "base64_decode" [path] | |
Recently modified files |
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 | |
// Register new status | |
function register_outside_order_status() { | |
register_post_status( 'wc-outside', array( | |
'label' => 'Outside Waiting', | |
'public' => true, | |
'exclude_from_search' => false, | |
'show_in_admin_all_list' => true, |
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 # -*- coding: utf-8 -*- | |
/** | |
* Plugin Name: T5 Plugin Log | |
* Description: Log all plugin (de)activations. | |
* Version: 2012.05.27 | |
* Author: Thomas Scholz <[email protected]> | |
* Author URI: http://toscho.de | |
* License: MIT | |
* License URI: http://www.opensource.org/licenses/mit-license.php | |
* |
NewerOlder