Templately icon
Page Builders & Blocks

Templately hooks reference

  • By WPDeveloper
  • v3.9.1 New
  • Updated

Templately 3.9.1 has 31 actions and 78 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.

How to use these hooks

Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.

functions.phpyour child theme
// Run your own code when Templately fires an action
add_action( 'templately_builder_footer_before', function() {
	// Your code runs here.
}, 10, 1 );

// Change a value Templately is about to use
add_filter( 'the_content', function( $the_content ) {
	// Change $the_content here.
	return $the_content;
}, 10, 1 );

Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.

All hooks

  • views/templates/header.php line 26 · used in 2 places
    /**
     * Header Template Actions For Templately
     */
    do_action( 'templately_builder_header_before' );
  • the_content

    filter
    modules/theme-builder/Widgets/Post_Content.php line 134 · used in 2 places
    /**
     * This filter is documented in wp-includes/post-template.php
     */
    apply_filters( 'the_content', get_the_content() );
  • wp_body_open

    action
    views/templates/header.php line 21 · used in 2 places
    /**
     * WP Defaults
     */
    do_action( 'wp_body_open' );
  • modules/full-site-import/Utils/AttachmentPrefetcher.php line 253
    /**
     * This filter is documented in wp-includes/class-wp-http.php
     */
    apply_filters( 'https_ssl_verify', true, '' );
  • modules/full-site-import/WPImport.php line 626
    /**
     * Fires after term meta is imported.
     */
    do_action( 'import_term_meta', $term_id, $key, $value );
  • modules/full-site-import/WPImport.php line 609
    /**
     * Filters the meta key for an imported piece of term meta.
     */
    apply_filters( 'import_term_meta_key', $meta['key'], $term_id, $term );
  • modules/block-patterns/MediaLocalizer.php line 303
    /**
     * Short-circuit the download+sideload step. Returning an attachment id (or
     * null) skips the built-in implementation.
     */
    apply_filters( 'templately_block_patterns_sideload', null, $source_url, $post_id );
  • modules/block-recovery/module.php line 76
    /**
     * Filter whether the post-import block rebuild runs.
     */
    apply_filters( 'templately_block_rebuild_enabled', $enabled );
  • modules/gutenberg-integration/Platform/Gutenberg.php line 193
    /**
     * Block markup has just been written to a post that nobody has opened in an
     * editor.
     */
    do_action( 'templately_blocks_imported', [ (int) $inserted_ID ], 'single' );
  • modules/theme-builder/ThemeBuilder.php line 219
    /**
     * Post types never offered as theme-builder display-condition targets.
     */
    apply_filters( 'templately_builder_excluded_post_types', self::EXCLUDED_POST_TYPES );
  • includes/Admin/Roles.php line 108
    /**
     * Filter the Theme Builder authorization answer.
     */
    apply_filters( 'templately_can_manage_builder', $can, $user_id );
  • includes/Core/Capabilities.php line 273
    /**
     * The final word on one capability — kill switch and test hook.
     */
    apply_filters( "templately_capability_{$key}", $value, isset( $this->declarations[ $key ] ) ? $this->declarations[ $key ] : [] );
  • modules/utilities/Cleanup/Scanner.php line 83
    /**
     * Redirect the root every cleanup task resolves against.
     */
    apply_filters( 'templately_cleanup_base_dir', $dir );
  • modules/utilities/Cleanup/Settings.php line 159
    /**
     * Disable all cleanup.
     */
    apply_filters( 'templately_cleanup_disabled', $settings['disabled'] );
  • modules/utilities/Cleanup/RetentionPolicy.php line 70
    /**
     * Override the retention window for one task.
     */
    apply_filters( 'templately_cleanup_retention_days', $this->age_days, $task_id );
  • modules/utilities/Cleanup/RetentionPolicy.php line 98
    /**
     * Override the storage ceiling for one task.
     */
    apply_filters( 'templately_cleanup_size_ceiling', $this->ceiling_bytes, $task_id );
  • includes/Core/Module_Base.php line 103
    /**
     * Filters whether a module held back from the release may boot.
     */
    apply_filters( 'templately_deferred_module_enabled', $enabled, $name );
  • includes/Utils/Helper.php line 199
    /**
     * Filter the base URL for development API
     */
    apply_filters( 'templately_dev_api_base_url', $base_url );
  • includes/Utils/Http.php line 57
    /**
     * Filter the API endpoint URL
     */
    apply_filters( 'templately_dev_api_endpoint_url', $this->url );
  • includes/Utils/Response/RetryPolicy.php line 86
    /**
     * Backoff before the next outbound retry, in milliseconds.
     */
    apply_filters( 'templately_http_retry_delay', $jittered, $attempt );
  • includes/Plugin.php line 76
    /**
     * Initialize.
     */
    do_action( 'templately_init' );
  • includes/Utils/Helper.php line 834
    /**
     * Fan-out: every subscribed module receives every entry (http-inspector
     * capture, dev console, telemetry…). Listeners are independent sinks —
     * this is how MULTIPLE loggers coexist without replacing each other.
     */
    do_action( 'templately_log', $formatted_message, $log, $context, $level );
  • includes/Utils/Helper.php line 850
    /**
     * The DEFAULT sink, replaceable/decoratable: a filter receives the current
     * sink callable and may return a wrapper around it (decorator — filter
     * priority defines wrap order) or a substitute. Core's default is the
     * dedicated uploads log file (error_log fallback inside). Note: entries logged
     * before a module boots (e.g. Modules_Manager discovery notices) necessarily
     * use the core default.
     */
    apply_filters( 'templately_log_sink', [Log\LogFile::class, 'write'] );
  • modules/mcp-server/Auth/FailedAuthLimiter.php line 196
    /**
     * Resolve the real client address behind a trusted proxy.
     */
    apply_filters( 'templately_mcp_client_address', $address );
  • includes/Core/Modules_Manager.php line 298
    /**
     * Fires once for each module that successfully boots, in dependency order.
     */
    do_action( 'templately_module_booted', $name, $instance );
  • includes/Core/Modules_Manager.php line 203
    /**
     * Filters a module's declared requirements just before they are checked.
     */
    apply_filters( "templately_module_requirements_{$name}", $requirements, $probe );
  • includes/Core/Modules_Manager.php line 109
    /**
     * Fires once after the whole module boot loop completes — even when zero
     * modules were discovered. Consumers can enumerate the active registry /
     * unavailable map.
     */
    do_action( 'templately_modules_booted', $this );
  • modules/site-editor-views/Provenance.php line 230
    /**
     * Filters the pack id recorded against content this run creates.
     */
    apply_filters( 'templately_provenance_pack_id', '', $session_id );
  • modules/site-editor-views/Fields.php line 93
    /**
     * Filters the human-readable name for a pack id.
     */
    apply_filters( 'templately_provenance_pack_name', '', $pack_id );
  • modules/site-editor-views/Provenance.php line 251
    /**
     * Filters whether this run's content is generated or curated.
     */
    apply_filters( 'templately_provenance_source', self::SOURCE_CLOUD, $session_id );
  • includes/Utils/Response/RestEnvelope.php line 265
    /**
     * Whether the envelope applies to this route.
     */
    apply_filters( 'templately_rest_envelope_owns_route', $owned, $route, $request );
  • modules/utilities/Cleanup/Scanner.php line 97
    /**
     * Filter the uploads-scanner per-pass time budget (seconds).
     */
    apply_filters( 'templately_uploads_scanner_budget', self::DEFAULT_BUDGET );
  • user_has_cap

    filter
    includes/Utils/Helper.php line 960
    /**
     * See WP_User::has_cap() for description.
     */
    apply_filters( 'user_has_cap', $user->allcaps, $caps, $args, $user );
  • modules/full-site-import/WPImport.php line 595
    /**
     * Filters the metadata attached to an imported term.
     */
    apply_filters( 'wp_import_term_meta', $term['termmeta'], $term_id, $term );
  • modules/full-site-import/Utils/FluentImport.php line 180 · used in 4 places
    do_action( 'templately_import.process_post', $post_data, $result, $this );
  • modules/ai-editor/REST/AIEditor.php line 313 · used in 3 places
    apply_filters( 'templately_ai_editor_log_payload', true );
  • modules/block-patterns/PatternSync.php line 371 · used in 2 places
    apply_filters( 'templately_block_patterns_ceiling', self::DEFAULT_CEILING );
  • views/templates/header.php line 27 · used in 2 places
    do_action( 'templately_builder_header' );
  • views/templates/header.php line 35 · used in 2 places
    do_action( 'templately_builder_header_after' );
  • modules/block-patterns/REST/Content.php line 122 · used in 2 places
    apply_filters( 'templately_fsi_merge_settings', $content, $settings );
  • modules/full-site-import/Utils/FluentImport.php line 154 · used in 2 places
    do_action( 'templately_import_start', $this );
  • modules/full-site-import/WPImport.php line 1654 · used in 2 places
    do_action( 'templately_import.finalize_gutenberg_attachment', $post_id );
  • includes/Utils/Options.php line 259 · used in 2 places
    apply_filters( 'templately_multisite_is_global', false );
  • modules/theme-builder/Managers/LocationManager.php line 317 · used in 2 places
    do_action( 'templately_printed_location', $template_id, $location, $template );
  • modules/full-site-import/WPImport.php line 408
    apply_filters( 'import_allow_create_users', self::DEFAULT_ALLOW_CREATE_USERS );
  • modules/full-site-import/WPImport.php line 1502
    apply_filters( 'import_attachment_size_limit', self::DEFAULT_IMPORT_ATTACHMENT_SIZE_LIMIT );
  • import_end

    action
    modules/full-site-import/WPImport.php line 357
    do_action( 'import_end' );
  • modules/full-site-import/WPImport.php line 1018
    do_action( 'import_post_meta', $post_id, $key, $value );
  • modules/full-site-import/WPImport.php line 999
    apply_filters( 'import_post_meta_key', $meta['key'], $post_id, $post );
  • import_start

    action
    modules/full-site-import/WPImport.php line 335
    do_action( 'import_start' );
  • includes/Core/Admin.php line 114
    apply_filters( 'templately_admin_enqueue_allowed_hooks', [ 'index.php', 'edit.php', 'toplevel_page_templately', 'elementor', 'gutenberg', 'templately_page_templately_settings' ], $hook );
  • includes/Core/Admin.php line 362
    apply_filters( 'templately_admin_localized_data', $templately );
  • includes/Core/Admin.php line 366
    do_action( 'templately_admin_scripts', $hook );
  • modules/ai-editor/REST/AIEditor.php line 1119
    apply_filters( 'templately_ai_editor_mock', $dev_mode );
  • includes/Utils/Helper.php line 327
    apply_filters( 'templately_api_request_params', $args, $method, $api_url );
  • modules/block-patterns/PatternRegistrar.php line 311
    apply_filters( 'templately_block_patterns_category_aliases', [ 'features-services' => 'services', 'herobanner' => 'banner', 'hero' => 'banner', 'banners' => 'banner', 'blog' => 'posts', 'archive' => 'query', 'team-member' => 'team', 'cta' => 'call-to-action', 'headers' => 'header', 'footers' => 'footer', 'testimonial' => 'testimonials', 'service' => 'services', 'galleries' => 'gallery', 'info' => null, 'product' => null, 'faq' => null, 'subscription' => ... );
  • modules/block-patterns/PatternRegistrar.php line 62
    apply_filters( 'templately_block_patterns_content_budget', self::CONTENT_BUDGET_BYTES );
  • modules/block-patterns/PatternSync.php line 686
    apply_filters( 'templately_block_patterns_content_dir', $uploads['basedir'] . '/templately/patterns' );
  • modules/block-patterns/PatternRegistrar.php line 104
    apply_filters( 'templately_block_patterns_lazy', true );
  • modules/block-patterns/MediaLocalizer.php line 421
    apply_filters( 'templately_block_patterns_media_budget', self::DEFAULT_BUDGET );
  • modules/block-patterns/MediaLocalizer.php line 437
    apply_filters( 'templately_block_patterns_media_hosts', [ 'templately.com', 'templately.dev', ] );
  • modules/block-patterns/PatternSync.php line 326
    apply_filters( 'templately_block_patterns_per_type', self::DEFAULT_PER_TYPE );
  • modules/block-patterns/PatternSync.php line 327
    apply_filters( 'templately_block_patterns_sync_budget', self::SYNC_BUDGET );
  • includes/Core/Capability_Seed.php line 39
    apply_filters( 'templately_block_patterns_wp_version', $wp_version );
  • modules/full-site-import/Utils/SignatureVerifier.php line 90
    apply_filters( 'templately_callback_signature_enforce', false );
  • modules/gutenberg-integration/Platform/Gutenberg.php line 107
    apply_filters( 'templately_cloud_push_post_type', get_post_type() );
  • modules/theme-builder/ThemeBuilder.php line 143
    apply_filters( 'templately_condition_manager', null, $this );
  • includes/Admin/Roles.php line 158
    apply_filters( 'templately_default_caps', $default_capabilities );
  • modules/full-site-import/FullSiteImport.php line 126
    apply_filters( 'templately_fsi_ajax_handlers', [] );
  • modules/full-site-import/Concerns/RunsImport.php line 194
    do_action( 'templately_fsi_before_import', $this, $this->request_params );
  • modules/full-site-import/Concerns/RunsImport.php line 425
    do_action( 'templately_fsi_import_complete', $normalized_data );
  • modules/full-site-import/Runners/WPContent.php line 121
    apply_filters( 'templately_fsi_item_meta', [ self::META_SESSION_KEY => $this->session_id ], $entity, $this->session_id );
  • modules/full-site-import/Utils/Utils.php line 146
    apply_filters( 'templately_fsi_json_helper', null, $platform );
  • modules/full-site-import/Utils/AttachmentPrefetcher.php line 211
    apply_filters( 'templately_fsi_prefetch_concurrency', self::DEFAULT_CONCURRENCY );
  • modules/full-site-import/Utils/AttachmentPrefetcher.php line 117
    apply_filters( 'templately_fsi_prefetch_enabled', true );
  • modules/full-site-import/Utils/AttachmentPrefetcher.php line 244
    apply_filters( 'templately_fsi_prefetch_timeout', self::DEFAULT_TIMEOUT );
  • includes/Utils/Helper.php line 999
    apply_filters( 'templately_fsi_request_time_budget', 25 );
  • modules/full-site-import/FullSiteImport.php line 240
    apply_filters( 'templately_has_revert', false );
  • modules/full-site-import/WPImport.php line 1302
    apply_filters( 'templately_import_copy_attachment', null, $original_post_id, $dest_file, $upload_dir );
  • modules/full-site-import/WPImport.php line 675
    apply_filters( 'templately_import_has_local_attachment', false, $post['post_id'] ?? null, $file_name );
  • modules/full-site-import/Import.php line 66
    apply_filters( 'templately_import_runners', $this->runners, $this->request_params );
  • modules/full-site-import/WPImport.php line 563
    do_action( 'templately_import.process_term', $term, $result, $this );
  • modules/theme-builder/Managers/LocationManager.php line 277
    do_action( 'templately_locations', $this );
  • includes/Utils/Helper.php line 807
    apply_filters( 'templately_log_override', null, $log, $context, $level );
  • modules/mcp-core/Support/AjaxLoopbackDispatcher.php line 196
    apply_filters( 'templately_mcp_fsi_loopback_url', $default_url );
  • modules/mcp-server/Auth/FailedAuthLimiter.php line 220
    apply_filters( 'templately_mcp_lockout_seconds', max( 1, $seconds ) );
  • modules/mcp-server/Auth/FailedAuthLimiter.php line 211
    apply_filters( 'templately_mcp_max_auth_fails', max( 1, $max ), $bucket );
  • modules/mcp-server/Auth/OAuth/OAuthServer.php line 75
    apply_filters( 'templately_mcp_serve_wellknown', true, $which );
  • includes/Utils/Helper.php line 261
    apply_filters( 'templately_request_source', $source );
  • includes/Utils/Helper.php line 233
    apply_filters( 'templately_requested_platform', $platform );
  • includes/Core/Admin.php line 259
    apply_filters( 'templately_tailwind_hooks', [ 'toplevel_page_templately', 'elementor', 'gutenberg', 'templately_page_templately_settings', 'edit.php' ] );
  • modules/theme-builder/Types/BaseTemplate.php line 169
    apply_filters( 'templately_template_content', $content, $this->get_main_id() );
  • modules/full-site-import/WPImport.php line 977
    do_action( 'wp_import_insert_comment', $inserted_comments[ $key ], $comment, $comment_post_id, $post );
  • modules/full-site-import/WPImport.php line 854
    do_action( 'wp_import_insert_post', $post_id, $original_post_id, $postdata, $post );
  • modules/full-site-import/WPImport.php line 910
    do_action( 'wp_import_insert_term', $t, $term, $post_id, $post );
  • modules/full-site-import/WPImport.php line 921
    do_action( 'wp_import_insert_term_failed', $t, $term, $post_id, $post );
  • modules/full-site-import/WPImport.php line 939
    apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post );
  • modules/full-site-import/WPImport.php line 820
    apply_filters( 'wp_import_post_data_processed', $postdata, $post );
  • modules/full-site-import/WPImport.php line 736
    apply_filters( 'wp_import_post_data_raw', $post, $this );
  • modules/full-site-import/WPImport.php line 750
    do_action( 'wp_import_post_exists', $post );
  • modules/full-site-import/WPImport.php line 994
    apply_filters( 'wp_import_post_meta', $post['postmeta'], $post_id, $post );
  • modules/full-site-import/WPImport.php line 893
    apply_filters( 'wp_import_post_terms', $post['terms'], $post_id, $post );
  • modules/full-site-import/WPImport.php line 724
    apply_filters( 'wp_import_posts', $this->posts );
  • modules/full-site-import/WPImport.php line 930
    do_action( 'wp_import_set_post_terms', $tt_ids, $ids, $tax, $post_id, $post );
  • modules/full-site-import/WPImport.php line 487
    apply_filters( 'wp_import_terms', $this->terms );
  • modules/display-conditions/Managers/ConditionManager.php line 236
    apply_filters( 'wpml_object_id', $template_id );

Generated from Templately's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.

Can't find the right hook?

We can build the customisation for you. Describe what you need: