GithubHelp home page GithubHelp logo

control-wp-core-emails's People

Contributors

norcross avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

control-wp-core-emails's Issues

Suggestion: Improved object initialization

I'd suggest using the following pattern for initialization (AFAIR its a variation of the Singleton pattern):

class myFancyClassName {
/**
 * Plugin instance.
 *
 * @see get_instance()
 * @type object
 */
protected static $instance = NULL;

/**
 * Implements Factory pattern
 * Strongly inspired by WP Maintenance Mode of Frank Bueltge ^_^ (@link https://github.com/bueltge/WP-Maintenance-Mode)
 * 
 * Access this plugins working instance
 *
 * @wp-hook plugins_loaded
 * @return object of this class
 */
public static function get_instance() {
    NULL === self::$instance and self::$instance = new self;
    return self::$instance;
}

function __construct() {

}
// .. rest of the class
}

add_action('plugins_loaded', array( 'myFancyClassName', 'get_instance' ) );

Suggestion: Configuration file + mu plugin

Also I'd like to suggest the usage of a configuration file. As somebody else already implied, managing multiple WP installs (eg. 20+) could quickly turn into a big fat PITA. Thus adding a configuration file and extending the plugin for MU usage, would greatly improve its value ;)

My suggested scheme as follows:

1. Add configuration file

Should be dropped straight into the upload directory, just like this:
https://gist.github.com/ginsterbusch/b4d84eb6256cd9373210efcca2764cdf

2. Turn or add the main class as custom MU plugin

You'd just drop both the config file and the MU plugin into the MU directory, and be done. Could easily be automated ;)

cu, w0lf.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.