Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

GainaRoman
Copy link

No description provided.

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

@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.

None yet

2 participants