Skip to content

Instantly share code, notes, and snippets.


tommcfarlin/00-main-plugin.php Secret

Created May 29, 2017
What would you like to do?
[WordPress] On Immutable Values in WordPress Plugins
class Main_Plugin {
const ACME_API_KEY = '123456789';
public function init() {
$helper = new Helper_Class();
$helper->render_acme_data( self::ACME_API_KEY );
class Helper_Class {
public function render_acme_data( string $api_key ) {
$canvas_url = '' . $api_key;
$canvas = new Canvas( $canvas_url );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.