Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #63382, comment 2


Ignore:
Timestamp:
05/06/2025 07:10:27 AM (19 months ago)
Author:
ignatiusjeroe

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #63382, comment 2

    initial v1  
    1212> As someone who built such a custom editor, the current solution works fine and I don't see the need to add 3 extra hooks for that.
    1313
    14 What you are proposing with your approach is to load your custom editor in a callback function registered to filter 'replace_editor' and then to return true. You might not be aware of it, but performing other tasks than the action or filter hook was intended for, is called side-effect. This goes against coding standards. In practice you can apply your approach but it is a bad practice. Awaiting a response.
     14What you are proposing with your approach is to load your custom editor in a callback function registered to filter 'replace_editor' and then to return true. You might not be aware of it, but performing other tasks than the action or filter hook was intended for, is called side-effect. BTW, a filter hook is meant to filter an argument. You are using the filter hook as an action hook. This goes against coding standards. In practice you can apply your approach but it is a bad practice. Awaiting a response.
    1515
    1616