WordPress filter hook

cpfm_environment

Fired by 14 WordPress plugins, running on 159K+ sites between them.

“Filter the shared CPFM environment snapshot.”

How to use cpfm_environment

It's a filter: your callback receives the value, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'cpfm_environment', function( $env ) {
	// Change $env here.
	return $env;
}, 10, 1 );

Argument names come from Timeline Widget For Elementor (Elementor Timeline, Vertical & Horizontal Timeline)'s source. Other plugins may pass different values: check the call in the plugin you're targeting below.

14 plugins that fire cpfm_environment

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. Timeline Widget For Elementor (Elementor Timeline, Vertical & Horizontal Timeline) icon Timeline Widget For Elementor (Elementor Timeline, Vertical & Horizontal Timeline)70,000+ installs apply_filters( 'cpfm_environment', $env ) admin/cpfm-feedback/class-cpfm-environment.php:100
  2. Cool Timeline (Horizontal & Vertical Timeline) icon Cool Timeline (Horizontal & Vertical Timeline)20,000+ installs apply_filters( 'cpfm_environment', $env ) admin/cpfm-feedback/class-cpfm-environment.php:101
  3. Events Shortcodes For The Events Calendar icon Events Shortcodes For The Events Calendar10,000+ installs apply_filters( 'cpfm_environment', $env ) admin/cpfm-feedback/class-cpfm-environment.php:101
  4. Events Widgets For Elementor And The Events Calendar icon Events Widgets For Elementor And The Events Calendar10,000+ installs apply_filters( 'cpfm_environment', $env ) admin/cpfm-feedback/class-cpfm-environment.php:101
  5. Toolkit for Polylang icon Toolkit for Polylang10,000+ installs apply_filters( 'cpfm_environment', $env ) admin/cpfm-feedback/class-cpfm-environment.php:101
  6. Timeline Block For Gutenberg icon Timeline Block For Gutenberg9,000+ installs apply_filters( 'cpfm_environment', $env ) admin/cpfm-feedback/class-cpfm-environment.php:100
  7. Event Single Page Builder For The Events Calendar icon Event Single Page Builder For The Events Calendar6,000+ installs apply_filters( 'cpfm_environment', $env ) admin/cpfm-feedback/class-cpfm-environment.php:100
  8. AutoPoly icon AutoPoly5,000+ installs apply_filters( 'cpfm_environment', $env ) admin/cpfm-feedback/class-cpfm-environment.php:101
  9. Cool Flipbox icon Cool Flipbox5,000+ installs apply_filters( 'cpfm_environment', $env ) admin/cpfm-feedback/class-cpfm-environment.php:101
  10. Linguator icon Linguator3,000+ installs apply_filters( 'cpfm_environment', $env ) admin/cpfm-feedback/class-cpfm-environment.php:101
  11. Event Countdown for The Events Calendar icon Event Countdown for The Events Calendar3,000+ installs apply_filters( 'cpfm_environment', $env ) admin/cpfm-feedback/class-cpfm-environment.php:101
  12. Events Search & Filter Bar for The Events Calendar icon Events Search & Filter Bar for The Events Calendar3,000+ installs apply_filters( 'cpfm_environment', $env ) admin/cpfm-feedback/class-cpfm-environment.php:101
  13. Timeline Module for Divi icon Timeline Module for Divi3,000+ installs apply_filters( 'cpfm_environment', $env ) admin/cpfm-feedback/class-cpfm-environment.php:100
  14. Events Calendar Modules for Divi icon Events Calendar Modules for Divi2,000+ installs apply_filters( 'cpfm_environment', $env ) admin/cpfm-feedback/class-cpfm-environment.php:101

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.