Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add detailed action hooks to YOURLS core (?) #2

Open
joshp23 opened this issue Jan 5, 2019 · 0 comments
Open

Add detailed action hooks to YOURLS core (?) #2

joshp23 opened this issue Jan 5, 2019 · 0 comments

Comments

@joshp23
Copy link
Owner

joshp23 commented Jan 5, 2019

Referring to @nicwaller 's [comments] (nicwaller#2):

Most actions that we might want to intercept (eg. add/delete) are handled by YOURLS in admin.php, and it doesn't always send notifications that an action is about to occur.

Ideally, the authmgr would register hooks for each individual action in YOURLS that needs to be controlled. But since that's not possible, it needs to intercept loading of the admin page and run some custom logic to determine what action is happening. This is prone to break in the future as YOURLS internal behaviour changes.

Looks like some are already available.

  • pre_add_new_link
  • pre_edit_link

But some are still needed.

  • yourls_delete_link_by_keyword() -> should throw action pre_yourls_delete_link
  • yourls_activate_plugin() -> should throw action pre_activate_plugin
  • yourls_deactivate_plugin() -> should throw action pre_deactivate_plugin

Putting a pull request into YOURLS core to add these hooks would be ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant