Skip to content

Instantly share code, notes, and snippets.

View chriscct7's full-sized avatar

Chris Christoff chriscct7

View GitHub Profile
@chriscct7
chriscct7 / gist:4036082
Created November 8, 2012 02:04
Members class start
<?php
/**
* Member Class
*
* The main hub of our login system
*
* PHP version 5.2.17 or higher
*
* LICENSE: TBD
*
@chriscct7
chriscct7 / gist:d7d077afb01011b1839d
Last active January 24, 2024 04:20
Plugins that need to be updated to be ready for the move to PHP 5 constructors

Important Notice for WordPress Plugins Using PHP 4 Style Constructors

The ability to use PHP 4 style constructors is getting removed from PHP. Without an update, many plugins will eventually no longer work (this is PHP breaking this backwards compatibility, not WordPress)

One of the more common uses of the PHP 4 style constructor (as opposed to PHP 5 style __construct() ) are plugins with widgets calling WP_Widget::WP_Widget() and/or parent::WP_Widget() and/or {object}->WP_Widget()

Note: Starting in WordPress 4.3, regardless of the PHP version in use on a server, WordPress will throw a deprecated notice when one of the PHP 4 style constructors is called specifically for widgets.

Basically instead of doing these:

@chriscct7
chriscct7 / index.html
Created August 27, 2016 18:04
The danger of using _blank tags
<html>
<head></head>
<body>
<p>This is my test page: <a target="_blank" href="test.html">Click here</a></p>
<p>Note, adding rel="noopener noreferrer" into the a element will solve this problem.</p>
</body>
</html
@chriscct7
chriscct7 / keybase.md
Created September 8, 2016 19:56
keybase.md

Keybase proof

I hereby claim:

  • I am chriscct7 on github.
  • I am chriscct7 (https://keybase.io/chriscct7) on keybase.
  • I have a public key whose fingerprint is 8E2F D1C7 BD35 C9AB 1F9B 4154 EF28 0CFB E2DC EDFD

To claim this, I am signing this object:

@chriscct7
chriscct7 / monsterinsights.php
Last active February 23, 2018 18:48
Remove conflicting styles/scripts from MI pages
<?php
/*
Plugin Name: Imagify Conflict Fix for MonsterInsights
Plugin URI:
Description: Fixes conflict with Imagify on MonsterInsights admin pages
Version: 1.0.0
Author: MonsterInsights Support Team
Author URI: https://www.monsterinsights.com
License:
License URI:
@chriscct7
chriscct7 / MonsterInsights-disable-all-tracking.php
Created April 6, 2020 16:39
MonsterInsights Disable Frontend Tracking Disable Frontend Tracking for all users.
<?php
/**
* Plugin Name: MonsterInsights Disable Frontend Tracking
* Description: Disable Frontend Tracking for all users.
* Version: 1.0.0
* Author: MonsterInsights Support Team
* Author URI: https://www.monsterinsights.com
*/