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

adding author ID as a variable #408

Merged
merged 1 commit into from
Nov 15, 2024
Merged

adding author ID as a variable #408

merged 1 commit into from
Nov 15, 2024

Conversation

norcross
Copy link
Contributor

Description of the Change

This PR is a small change that adds an additional argument for the author ID ($author_id) to the srm_create_redirect function. currently, the author ID is hard-coded to a value of 1, whether or not that author exists at all. when a redirect is created via the admin UI, the current user ID is used as the author ID, so i'd like to also be able to set the author (current or otherwise) when using this function outside of the plugin. the function sets the default to 1, so this would not impact any current implementations.

How to test the Change

  1. Pass an ID as the last argument to srm_create_redirect with a default value of 1
  2. View the author ID stored in the database

Changelog Entry

Added - New feature
adding additional variable for author ID

Credits

Props @norcross

Checklist:

adding author ID as a variable instead of hard-coding it to 1
@dkotter dkotter added this to the 2.3.0 milestone Nov 15, 2024
@dkotter dkotter merged commit debbd5c into 10up:develop Nov 15, 2024
12 checks passed
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

Successfully merging this pull request may close these issues.

2 participants