• Beehive - Google Analytics
  • Branda
  • Defender
  • Forminator
  • Hummingbird
  • Hustle
  • Shipper
  • SmartCrawl SEO
  • Smush
  • Snapshot
  • WPMU DEV Dashboard

Hummingbird Hooks Documentation

Total hooks: 63
Undocumented hooks: 33

1. wp_hummingbird_loaded

Type: action

Triggered when WP Hummingbird is totally loaded

Arguments: none

2. wphb_load_admin_page_{$this->get_slug()}

Type: action

No description

Arguments: none

3. wphb_add_meta_box

Type: filter

Allow to filter a WP Hummingbird Metabox

Arguments: $meta_box, $this->slug, $this->page_id

Arguments:

  • $meta_box - array
    Meta box attributes

  • $slug - string
    Admin page slug

  • $page_id - string
    Admin page ID

4. wphb_add_meta_box_{$meta_box['id']}

Type: filter

No description

Arguments: $meta_box, $this->slug, $this->page_id

5. wphb_admin_do_meta_boxes_{$this->slug}

Type: action_reference

No description

Arguments: array(&$this)

6. wpmudev_branding_change_footer

Type: filter

No description

Arguments: $hide_footer

7. wpmudev_branding_footer_text

Type: filter

No description

Arguments: $footer_text

8. wphb_admin_page_tabs_{$this->slug}

Type: filter

No description

Arguments: $this->tabs

9. wphb_minification_display_enqueued_file

Type: filter

Settings meta box.

Arguments: true, $item, 'styles'

10. wphb_minification_display_enqueued_file

Type: filter

No description

Arguments: true, $item, 'scripts'

11. wphb_minification_display_enqueued_file

Type: filter

Filter minification enqueued files items displaying

Arguments: true, $item, $type

Arguments:

  • $display - bool
    If set to true, display the item. Default false

  • $item - array
    Item data

  • $type - string
    Type of the current item (scripts|styles)

12. wphb_minification_disable_switchers

Type: filter

Allows to enable/disable switchers in minification page

Arguments: $disable_switchers, $item, $type

Arguments:

  • $disable_switchers - array
    List of switchers disabled for an item ( include, minify, combine)

  • $item - array
    Info about the current item

  • $type - string
    Type of the current item (scripts|styles)

13. wphb_minification_display_enqueued_file

Type: filter

Asset Optimization

Arguments: true, $item, 'styles'

14. wphb_minification_display_enqueued_file

Type: filter

No description

Arguments: true, $item, 'scripts'

15. wphb_caching_set_expiration

Type: action

Pass in caching type and value into a custom function.

Arguments: array('expiry_times' => $sanitized_expiry_times)

Arguments:

  • $args - array
    { Array of selected type and value. @type string $type Type of cached data, can be one of following: javascript, css, media or images. @type array $sanitized_expiry_times Set expiry values (for example, 1h/A3600), first part can be: [n]h for [n] hours (for example, 1h, 4h, 11h, etc), [n]d for [n] days (for example, 1d, 4d, 11d, etc), [n]M for [n] months (for example, 1M, 4M, 11M, etc), [n]y for [n] years (for example, 1y, 4y, 11y, etc), second part is the first part in seconds ( 1 hour = 3600 sec). }

16. wphb_admin_loaded

Type: action

Triggered when Hummingbird Admin is loaded

Arguments: none

17. wphb_reporting_templates_folders

Type: filter

No description

Arguments: array('stylesheet' => get_stylesheet_directory() . '/wphb/', 'template' => get_template_directory() . '/wphb/', 'plugin' => WPHB_DIR_PATH . 'core/pro/modules/reporting/templates/')

18. wp_hummingbird_modules

Type: filter

No description

Arguments: array('reporting-cron' => 'Cron', 'cleanup-cron' => 'Database Cleanup', 'uptime-reports' => 'Reports')

19. wp_hummingbird_is_active_module_{$slug}

Type: filter

Filters the activation of a module

Arguments: true

Arguments:

  • $active - boolean
    if the module is active or not

20. wphb_delete_db_data

Type: action

Fires after the database cleanup task.

Arguments: $type, $items

Arguments:

  • $type - string
    Data type that was cleared from the database. Can return following values: all, revisions, drafts, trash, spam, trash_comment, expired_transients, transients.

  • $items - int
    Number of items that was cleared from the database for the selected data type.

21. get_avatar_comment_types

Type: filter

Filters the list of allowed comment types for retrieving avatars.

Arguments: array('comment')

Arguments:

  • $types - array
    An array of content types. Default only contains 'comment'.

22. get_avatar_data

Type: filter

This filter is documented in wp-includes/link-template.php

Arguments: $args, $id_or_email

23. wphb_caching_analize_data

Type: action

No description

Arguments: $results

24. wphb_shold_cache_request_pre

Type: filter

If caching for logged-in users, we need to set the cache file extension to .php and add die(); in file header, to prevent phishing attacks.

Arguments: true

25. wphb_shold_cache_request_log_message

Type: filter

No description

Arguments: 'Do not cache, blocked by filter'

26. wphb_cache_content

Type: filter

No description

Arguments: $content

27. wphb_page_cache_custom_terms

Type: filter

Support for custom terms.

Arguments: array()

28. post_updated_messages

Type: filter

2. Check if the files are there?

Arguments: $messages

29. wphb_block_resource

Type: filter

Filter the resource (blocked or not)

Arguments: false, $handle, $this->type, $url, null

30. wphb_minify_resource

Type: filter

Filter the resource (minify or not)

Arguments: false, $handle, $this->type, $url

31. wphb_combine_resource

Type: filter

Filter the resource (combine or not)

Arguments: false, $handle, $this->type, $url

32. wphb_defer_resource

Type: filter

Filter the resource (defer or not)

Arguments: false, $handle, $this->type, $url

33. wphb_inline_resource

Type: filter

Filter the resource (inline or not)

Arguments: false, $handle, $this->type, $url

34. wphb_minify_file_content

Type: filter

No description

Arguments: $content

35. wphb_minify_callback

Type: filter

Function that will get files minified

<p>The callback should return WP_Error or array with the file details: { 'file' =&gt; absolute file path if the file is saved locally }</p>

Arguments: array('WP_Hummingbird_Module_Minify_Group', 'process_remote_files')

36. wphb_file_expiration

Type: filter

Insert the new file in posts table.

<p>The ID argument acts as an insurance that a post with the same name does not exist already. No two posts should have a similar hash, unless it is two exactly same files. In that case we will use one post for both.</p> <p>In any case, if the above get_posts() does not find any posts, an ID = 0 will create a new post.</p>

Arguments: MONTH_IN_SECONDS

37. wp_hummingbird_before_upload_minify_group

Type: action

No description

Arguments: $filename, $file['response']

38. wp_hummingbird_after_upload_minify_group

Type: action

No description

Arguments: $filename, $file['response'], $upload

39. wphb_minification_errors

Type: filter

Filter the minification errors

Arguments: get_option('wphb-minification-errors', $default)

40. wphb_handle_error_{$handle}_{$type}

Type: filter

No description

Arguments: $error, $handle, $type

41. wphb_has_cloudflare

Type: filter

No description

Arguments: $is_cloudflare

42. wphb_send_resource_to_footer

Type: filter

Filter the resource (move to footer)

Arguments: false, $handle, $type, $wp_dependencies->registered[$handle]->src

43. wphb_init_performance_scan

Type: action

No description

Arguments: none

44. wphb_get_performance_report

Type: action

Fires after getting the latest report.

Arguments: $results->data

Arguments:

  • $report - object
    Object with report data.

45. wp_hummingbird_modules

Type: filter

Filters the modules slugs list

Arguments: array('minify' => 'Minify', 'gzip' => 'Gzip', 'caching' => 'Caching', 'performance' => 'Performance', 'uptime' => 'Uptime Monitoring', 'smush' => 'Smush', 'cloudflare' => 'Cloudflare', 'gravatar' => 'Gravatar Caching', 'page_cache' => 'Page Caching', 'advanced' => 'Advanced Tools', 'rss' => 'RSS Caching')

46. wp_hummingbird_is_active_module_cloudflare

Type: filter

No description

Arguments: $type

47. wp_hummingbird_default_options

Type: filter

Filter the default settings.

<p>Useful when adding new settings to the plugin</p>

Arguments: $defaults

48. wphb_activate

Type: action

No description

Arguments: none

49. wphb_deactivate

Type: action

No description

Arguments: none

50. wphb_activate

Type: action

Previous version of performance reports had week days (Monday-Sunday) for month schedule, now it's replaced with 1-28 days.

Arguments: none

51. wphb_src_to_path

Type: filter

DOCUMENT_ROOT does not always store the correct path. For example, Bedrock appends /wp/ to the default dir.

<p>So if the source is a URL, we can safely use DOCUMENT_ROOT, else see if ABSPATH is defined.</p>

Arguments: $path, $src

52. wphb_admin_capability

Type: filter

No description

Arguments: $cap

53. wphb_scan_get_days_of_week

Type: filter

Current user @var WP_User $user

Arguments: $days

54. wphb_scan_get_times_interval

Type: filter

No description

Arguments: array('00')

55. wphb_scan_get_times_hour_min

Type: filter

No description

Arguments: $time

56. wphb_scan_get_times

Type: filter

No description

Arguments: $data

57. wphb_scan_get_days_of_week

Type: filter

No description

Arguments: $days

58. wphb_minification_display_enqueued_file

Type: filter

No description

Arguments: true, $item, 'styles'

59. wphb_minification_display_enqueued_file

Type: filter

No description

Arguments: true, $item, 'scripts'

60. wpmudev_branding_hide_branding

Type: filter

No description

Arguments: false

61. wpmudev_branding_hide_doc_link

Type: filter

No description

Arguments: false

62. wphb_get_server_type

Type: filter

No description

Arguments: $type

63. wphb_code_snippet

Type: filter

No description

Arguments: $module->get_server_code_snippet($server_type, $expiry_times), $server_type, $module