Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: akismet_get_api_key

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
122           add_filter( 'fluentform/akismet_fields', array( 'Akismet', 'prepare_custom_form_values' ), 10, 2 );
123
124           add_action( 'update_option_wordpress_api_key', array( 'Akismet', 'updated_option' ), 10, 2 );
125           add_action( 'add_option_wordpress_api_key', array( 'Akismet', 'added_option' ), 10, 2 );
126
127           add_action( 'comment_form_after', array( 'Akismet', 'display_comment_form_privacy_notice' ) );
128      }
129
130      public static function get_api_key() {
131           return apply_filters( 'akismet_get_api_key', defined( 'WPCOM_API_KEY' ) ? constant( 'WPCOM_API_KEY' ) : get_option( 'wordpress_api_key' ) );
132      }
133
134      /**
135       * Exchange the API key for a token that can only be used to access stats pages.
136       *
137       * @return string
138       */
139      public static function get_access_token() {
140           static $access_token = null;