Skip to content

Fixed: Can't add new notifications in the theme's functions.php file#61

Open
romangaina wants to merge 2 commits intogedex:masterfrom
romangaina:master
Open

Fixed: Can't add new notifications in the theme's functions.php file#61
romangaina wants to merge 2 commits intogedex:masterfrom
romangaina:master

Conversation

@romangaina
Copy link
Copy Markdown

No description provided.

GainaRoman added 2 commits August 1, 2017 23:49
Because the code fired after the plugins loaded, but before the theme itself loaded - you couldn't add custom notifications in your functions.php file (or other theme's file).
Changing the code to fire after the theme has loaded fixed it. 

Workaround - Just add this in your functions.php if you want to have the original plugin installed without modifications:

// Runs this plugin after the theme is loaded.
add_action( 'after_setup_theme', function() {
	$GLOBALS['wp_slack'] = new WP_Slack_Plugin();
	$GLOBALS['wp_slack']->run( __FILE__ );
});
…ns.php

Fixed: Can't add new notification in functions.php
Copy link
Copy Markdown

@jay-oswald jay-oswald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a needed changs, failed build for unrelated issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants