After reading several articles, discussing with the community, diving through the Akismet documentation and reviewing their plugin I’ve found if you want test to see if the plugin is active
or deactivate
you can use:
if (function_exists('akismet_verify_key')) :
echo "true";
else :
echo "false";
endif;
After activating the plugin and entering the API key in the plugin you can call on the key with akismet_get_key
:
if (function_exists('akismet_verify_key') && !empty(akismet_get_key())) :
echo akismet_get_key(); // only for testing purposes!
else:
echo 'false';
endif;
Hope the next person finds this information useful.
Related Posts:
- Symbolic Links on dev box with plugins and stylesheets
- Turn revisions off in plugin instead of config.php?
- Check spam in custom form – akismet
- Alternatives to DISALLOW_FILE_EDIT wp-config Constant? It Breaks Some Plugins
- Redirect to another page using contact form 7? [closed]
- Use wp-config.php constants in all files of plugin
- get_option() will not work without access to wp-config.php
- Can I reuse the Akismet API key used on old version of my website? [closed]
- Activate Akismet on installation with akismet key
- Is moving wp-config outside the web root really beneficial?
- Objective Best Practices for Plugin Development? [closed]
- add_menu_page() with different name for first submenu item
- Uninstall, Activate, Deactivate a plugin: typical features & how-to
- Best way to initiate a class in a WP plugin?
- Where to put my code: plugin or functions.php?
- Best way to include wp-config.php
- Autoloading & Namespaces in WordPress Plugins & Themes: Can it Work?
- How to include PHP files in plugins the correct way
- WPSE Plugin Repository: The plugins that came out of WP-Answers
- Software for WordPress Theme and Plugin Development? [closed]
- How can I add an image upload field directly to a custom write panel?
- A tool to analyze rewrite rules? [closed]
- Difference Between Filter and Action Hooks?
- What security concerns should I have when setting FS_METHOD to “direct” in wp-config?
- How do you debug plugins?
- framework for plugin/theme options panel? [closed]
- Creating a table in the admin-style?
- How to structure a plugin
- What’s the preferred method of writing AJAX-enabled plugins?
- How can you check if you are in a particular page in the WP Admin section? For example how can I check if I am in the Users > Your Profile page?
- Should I use custom post types or a custom database tables for plugin development?
- Best practice for versioning wp-config.php?
- Add multiple plugin directories
- What are the differences between WPINC and ABSPATH?
- Settings API with arrays example
- How to get the path to the current theme?
- How to add a shortcode button to the TinyMCE editor?
- How to make a plugin require another plugin?
- ajaxurl not defined on front end
- What process do you use for WordPress development? [closed]
- Where do I put the code snippets I found here or somewhere else on the web?
- What’s the difference between term_id and term_taxonomy_id
- Should I use wpdb prepare?
- What Plugins Demonstrate Great WP Plugin Development? [closed]
- Why does WordPress use outdated jQuery v1.12.4?
- Post meta vs separate database tables
- Is there any plugin development framework
- Is it possible to reuse wp.media.editor Modal for dialogs other than media
- How to add a javascript snippet to the footer that requires jQuery
- Enhance Media Manager for Gallery
- How do I create a custom role capability?
- How do I add CSS options to my plugin without using inline styles?
- How to add an admin notice upon post save/update
- Is it possible to change the log file location for WP_DEBUG_LOG?
- How do i best handle custom plugin page actions?
- Adding Custom Text Patterns in the WP 4.5 Visual Editor
- is_plugin_active function doesn’t exist
- Automatically determine minimum WordPress version required for a plugin?
- What is the advantage of using wp_mail?
- How to make a WordPress plugin translation ready?
- How many times will this code run? (or, how rich is grandma?)
- Site Redirecting to wp-signup.php
- How to create an API for my plugin?
- Is it ever okay to include inline CSS in plugins?
- Moving a WP Multisite to a subdirectory
- Plugins in symlinked directories?
- How to override existing plugin action with new action
- Define WP_DEBUG conditionally / for admins only / log errors (append query arg for all links?)
- How to include a file using get_template_part() in a plugin?
- Add custom TinyMCE 4 Button, Usable since WordPress 3.9-beta1
- Delete WordPress plugin Repository
- How to store username and password to API in wordpress option DB?
- Custom pages with plugin
- How to change a user’s password programatically
- body_class hook for admin pages
- “Error: Options Page Not Found” on Settings Page Submission for an OOP Plugin
- Is it mandatory to use $wpdb->prefix in custom tables
- Which hook should be used to add an action containing a redirect?
- add_action hook for completely new post?
- Why does WordPress add 0 (zero) to an Ajax response?
- What should I use instead of WP_CONTENT_DIR and WP_PLUGIN_DIR?
- How to enqueue JavaScripts in a plugin
- Login page ERROR: Cookies are blocked due to unexpected output
- In Which Contexts are Plugins Responsible for Data Validation/Sanitization?
- Plugin Form Submission Best Practice
- How to redirect to settings page once the plugin is activated?
- Is get_option function cached?
- Should Plugin Folders Include a Blank index.php File?
- Who are the most trusted plugin developers? [closed]
- How can I find plugins’ slug?
- Unit testing for plugin development
- Methods of Integrating Plugin Data with Themes
- List all sidebar names?
- What are the common security flaws I need to look for? [closed]
- What is the wordpress wp-includes folder for?
- WordPress Update Plugin Hook/Action? Since 3.9
- How to include jQuery and JavaScript files correctly?
- How come `wp_options` table does not have an index on `autoload`?
- PHP error with shortcode handler from a class
- Update Option Stored in Multi-Dimensional Array