Skip to content
This repository was archived by the owner on Nov 14, 2024. It is now read-only.
This repository was archived by the owner on Nov 14, 2024. It is now read-only.

Refactor docblocks of templates actions and filters #48

@jedrzejchalubek

Description

@jedrzejchalubek

Docblocks of actions and filters in .tpl.php files should help find proper function hooked to this hooks. We should borrow a solution from WooCommerce where each do_action receive docblock with a list of @hooked property and function name.

/**
 * Functions hooked into `theme/index/header` action.
 *
 * @hooked Theme\Index\render_header - 10
 */
 do_action('theme/index/header');

Docblocks on functions should point to the template file with action where they are hooked.

/**
 * Renders header.
 *
 * @see resources/templates/index.tpl.php
 */
function render_header()
{
    //
}
add_action('theme/index/header', 'Theme\Index\render_header');
``

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions