Skip to content

Hooks—Theme Configuration

Jo Dickson edited this page Aug 28, 2019 · 1 revision

Navigation

Filters


ucfwp_enable_attachment_link_rewrites

Hook into this filter using WordPress's __return_true and __return_false functions to define how the theme should modify attachment permalinks. By default, attachment links will be modified to always return a direct link to the given file (to prevent confusion due to single attachment views being disabled by this theme--see ucfwp_kill_unused_templates()). By registering __return_false to this filter, attachments will link to their standard single views instead.

Parameters

n/a

Example usage

add_action( 'ucfwp_enable_attachment_link_rewrites', '__return_false' );