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

Update version, add new method to return meta string #5

Merged
merged 1 commit into from
Nov 4, 2021

Conversation

pcraig3
Copy link
Contributor

@pcraig3 pcraig3 commented Nov 3, 2021

Summary

This pull request makes a few very small changes, and then increments the version for a patch release.

  • new method for returning the meta key
  • update version
  • change parameter names in manage_users_column_content to match WordPress docs
  • fix up a couple of comments

This is a proposed change -- happy to modify any of it.

new method to return meta key

I am using this plugin for another project where we want to be able to disable users who don't log in for a set amount of time. This plugin has all the functionality we need to enable/disable accounts, but we are copying and pasting the meta key string, which means it would all break if this plugin changed the meta key string in the future.

We can live without this method but it seems fairly innocuous, so I figured it would be an easy PR to add it.

update version

When you download this plugin from the WordPress directory (using "Download"), you don't get the return $empty; statement in manage_users_column_content. I think it's because the version wasn't bumped when that change went in: https://github.com/saintsystems/disable-user-login/pull/3/files

Updated to 1.3.2 because all the changes are very minor.

change parameter names in manage_users_column_content

I changed the parameter names in manage_users_column_content to match what's on the documentation for the manage_users_custom_column hook.

fix up a couple of comments

I was initially thrown for a loop when reading the comment above the custom "enable user" action hook because it claimed that it was for users who are disabled.

New method lets other classes grab the meta name so that if
it is updated in the future, it will continue to work.

Rename some of the params in "manage_users_column_content" to match
those given in the wordpress docs:
- https://developer.wordpress.org/reference/hooks/manage_users_custom_column/

Currently, downloading the plugin from wpackagist doesn't return
the version of the plugin with the return statement in manage_users_column_content.
Hoping that updating the version will fix that.
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.

None yet

2 participants