Filter and Action Hooks¶
Filter Hooks¶
Creative-Commons-Configurator allows filtering of some of the generated metadata and also of some core functionality through filters. This way advanced customization of the plugin is possible.
TODO: update the filter list.
The available filters are:
bccl_author_url¶
Applied to the URL that is generated for the object's author. By default, this is the URL of the author archive. The hooked function should accept 3 arguments: the default URL, the post object and the author format. It shoudl return 1 argument: a string (URL).
bccl_style¶
applied to the default inline styles that are added in the HTML head section. The hooked function should accept and return 1 argument: a string (CSS).
bccl_extra_style¶
can be used to inject extra CSS at the end of the default inline styles that are added in the HTML head section. The hooked function should accept and return 1 argument: a string (CSS).
bccl_license_block_html¶
can be used to filter the full HTML code of the license block. The hooked function should accept and return 1 argument: a string (HTML).
bccl_license_url¶
applied to the license's URL and can be used to direct the user to a specific translation of the license. The hooked function should accept and return 1 argument: a string (URL).
bccl_license_url_shortcode¶
applied to the license's URL of shortcode output and can be used to direct the user to a specific translation of the license. The hooked function should accept and return 1 argument: a string (URL).
bccl_cc_license_text¶
applied to the text that is generated for the Creative Commons License. The hooked function should accept and return 1 argument: a string.
bccl_cc0_license_text¶
applied to the text that is generated for the CC0 rights waiver. The hooked function should accept and return 1 argument: a string.
bccl_arr_license_text¶
applied to the text that is generated for All Rights Reserved clause. The hooked function should accept and return 1 argument: a string.
bccl_widget_html¶
applied to the HTML code that is generated for the widget. The hooked function should accept and return 1 argument: a string.
widget_title¶
applied to the title of the license widget. The hooked function should accept and return 1 argument: a string.
bccl_license_metabox_permission¶
applied to the metabox permission. The hooked function should accept and return 1 argument: a string. By default, the `edit_posts` is used.
bccl_licenses¶
applied to the array of the supported licenses. The hooked function should accept and return 1 argument: an array of licenses (see bccl-licenses.php
for details).
bccl_default_license¶
applied to the license slug that will be used for the current post. The hooked function should accept and return 1 argument: a string (see bccl-licenses.php
for details).
bccl_supported_post_types¶
applied to the array of the supported post types. The hooked function should accept and return 1 argument: an array of post types.
bccl_exclude_license¶
This is a filter based switch which can be used to exclude the addition of licensing information on specific pages or parts of the web site. The hooked function should accept 2 arguments: a boolean variable that manages the excusion (false
by default) and the post object. The hooked function should return 1 argument: a boolean object (true/false
about the exclusion of licensing information).