for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Black Studio TinyMCE Widget - Compatibility with Jetpack After the deadline plugin
*
* @package Black_Studio_TinyMCE_Widget
*/
namespace Black_Studio_TinyMCE_Widget\Compatibility\Plugin;
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( 'Black_Studio_TinyMCE_Widget\\Compatibility\\Plugin\\Jetpack_After_The_Deadline', false ) ) {
* Class that provides compatibility code for Jetpack After the deadline
* @since 3.0.0
final class Jetpack_After_The_Deadline {
* The single instance of the class
* @var object
protected static $_instance = null;
* Return the single class instance
* @return object
public static function instance() {
if ( is_null( self::$_instance ) ) {
self::$_instance = new self();
return self::$_instance;
* Class constructor
* @uses is_admin()
* @uses add_action()
protected function __construct() {
if ( is_admin() ) {
add_action( 'black_studio_tinymce_load', array( $this, 'load' ) );
* Prevent the class from being cloned
* @return void
protected function __clone() {
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ uh?' ), '3.0' );
* Load Jetpack After the deadline scripts
* @uses add_filter()
public function load() {
add_filter( 'atd_load_scripts', '__return_true' );
} // END class
} // END class_exists