indieweb / indieweb/wordpress-indieauth

Allow the user to set a default category for posts created by the application

Open
#28 5 comments 2 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
36
Forks
14
Avg merge
2h 6m
Merged PRs (30d)
3

Description

A common feature request I hear from people using Wordpress with Micropub apps all the time is they want certain apps posts to appear in certain wordpress categories by default. For example, all posts from OwnYourGram should be added to the "Photos" category, all posts from OwnYourSwarm should be added to the "Checkins" category, but posts from Quill or Micro.blog should be "Uncategorized" or set to "Microblog". With the built-in authorization server, there is a great opportunity to have the wordpress plugin handle this now. It will take coordination with the Micropub plugin as well.

![screenshot 2018-04-04 13 14 34](https://user-images.githubusercontent.com/113001/38332154-2340af02-380a-11e8-9b67-227afbaef89c.png)

If the `create` scope is requested, then the authorization screen can provide an additional field for the user to select the default category for posts created by that application.

When the token is generated, the category ID can be stored in the database along with how it stores the token scope and all the other token info. Then the Micropub plugin can look at the token and if there is a category ID in the token, use that when creating the post.

Saving the value from this select box will be easier once [#24](https://github.com/indieweb/wordpress-indieauth/issues/24) is fixed.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the built-in authorization server's create-scope authorization screen and the code that stores token scope and related token data. Review how the Micropub plugin reads tokens, and account for the dependency on issue #24. Done means an application can select a default WordPress category during authorization, that category ID is stored with the token, and Micropub-created posts use it.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
authentication, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.