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 a settings page to allow someone with manage_options permission to define static content URIs #1

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

mrose17
Copy link

@mrose17 mrose17 commented Oct 22, 2016

for non-programmers, requiring an edit to the plugin source to define the URIs and their contents is probably too much friction. for well-known URIs that have static content, the Setting page is sufficient...

also, tested the plugin on WP latest (4.6.1)

i hope you like this addition, thanks!

- verify correct behavior with WP latest (4.6.1)
- add Settings page to set up to three well-known URIs
- use `esc_textarea` going out and `wp_filter_post_kses` coming back
- add some more documentation
@pfefferle
Copy link
Owner

pfefferle commented Oct 22, 2016

I like the idea, but I think supporting only three URIs is enough. We should support n-URIs and perhaps add a field for the mime type.

@mrose17 mrose17 changed the title Add a settings page to allow someone with manage_options permission to define upto 3 static URIs Add a settings page to allow someone with manage_options permission to define static content URIs Oct 23, 2016
@mrose17
Copy link
Author

mrose17 commented Oct 23, 2016

@pfefferle - mission accomplished.

@mrose17
Copy link
Author

mrose17 commented Oct 25, 2016

@pfefferle - any thing else or is it ready for a merge? thanks!

@mrose17
Copy link
Author

mrose17 commented Oct 25, 2016

+1
Let me see what I can do tonight.

/mtr

On Sat, Oct 22, 2016 at 11:31 AM -0700, "Matthias Pfefferle" notifications@github.com wrote:

I like the idea, but I don't think supporting only three types is enough. We should support n-URIs and perhaps add a field for the mime type.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@pfefferle
Copy link
Owner

Thanks a lot for your work!

Here is some feedback:

  • JSON is not working, because of escaping
  • I would add the "Constants" as real constants of the "WellKnownPlugin" class
  • do you think a custom post type will also work?

…and do not escape URI contents field
@mrose17
Copy link
Author

mrose17 commented Oct 26, 2016

thanks. i have addressed the first two issues. a custom post type would probably work, but then we are into a whole set of admin page edits.

my goal was to solve the problem for folks who want to populate their site with a single well-known URI without having to do any PHP programming. i think we've got that handled along with a lot of other things.

could we merge this PR and get it onto wordpress.org so i can point folks to it?

thanks!

@mrose17
Copy link
Author

mrose17 commented Oct 28, 2016

@pfefferle - sorry to nag, but "i'm on deadline"... can we get the PR merged and onto wordpress.org ? thanks!

## Generic function (and/or define) names
should have caught these earlier…
@mrose17
Copy link
Author

mrose17 commented Nov 3, 2016

update: hi! i submitted the forked repo to wordpress.org, it's available as https://wordpress.org/plugins/well-known-uris/ ... if you merge this PR, i can retract that plugin and point people at this one.

sorry for the confusion!

best,

/mtr

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