• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Jetpack a2z

Jetpack a2z

Jetpack a2z

  • Home
  • Plugins
  • Blocks
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / Jetpack_Core_API_Module_Data_Endpoint::akismet_class_exists() – Check if Akismet class file exists and if class is loaded.

You appear to be a bot. Output may be restricted

Description

Check if Akismet class file exists and if class is loaded.

Usage

$bool|WP_Error = Jetpack_Core_API_Module_Data_Endpoint::akismet_class_exists();

Parameters

Returns

bool|WP_Error Returns true if class file exists and class is loaded, WP_Error otherwise.

Source

File name: jetpack/_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php
Lines:

1 to 11 of 11
  private function akismet_class_exists() {
    if ( ! file_exists( WP_PLUGIN_DIR . '/akismet/class.akismet.php' ) ) {
      return new WP_Error( 'not_installed', esc_html__( 'Please install Akismet.', 'jetpack' ), array( 'status' => 400 ) );
    }

    if ( ! class_exists( 'Akismet' ) ) {
      return new WP_Error( 'not_active', esc_html__( 'Please activate Akismet.', 'jetpack' ), array( 'status' => 400 ) );
    }

    return true;
  }
 

 View on GitHub View on Trac

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Pinterest (Opens in new window)

Related

Published: 27 November 2019 | Last updated: 27 November 2019

Primary Sidebar

Information

Function name: Jetpack_Core_API_Module_Data_Endpoint::akismet_class_exists
Class ref: Jetpack_Core_API_Module_Data_Endpoint
Plugin ref: Jetpack
Version: 9.2
Sourcefile: _inc/lib/core-api/class.jetpack-core-api-module-endpoints.php
File ref: _inc/lib/core-api/class.jetpack-core-api-module-endpoints.php
Deprecated?: No
API Letters: A,C,D,J,M

Footer

Jetpack a2z
Jetpack a2z
Jetpack a2z
WordPress 5.6
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  jetpack.wp-a2z.org
© Copyright Jetpack a2z 2014-2021. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites