Featured Content: Epilogue

If you’ve been following along with 3.8/Twenty Fourteen development, you probably know that Featured Content is being handled by the theme now. It is being moved to the CustomizerCustomizer Tool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings.. This approach is wildly different that what I was doing in the pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party, and I am ok with that. Their approach is lighter weight and might be all a theme needs to display a section of featured posts.

My original idea after @obenland approached me to work on it was way more complex, and it was something  that might not belong in coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.. Or it might, but the plugin didn’t makemake A collection of P2 blogs at make.wordpress.org, which are the home to a number of contributor groups, including core development (make/core, formerly "wpdevel"), the UI working group (make/ui), translators (make/polyglots), the theme reviewers (make/themes), resources for plugin authors (make/plugins), and the accessibility working group (make/accessibility). a compelling case – once again, no biggie.

What did we learn from this?
Having multiple active developers is a must. 15 people had commit, and our meetings had a healthy share of lurkers, but we only had one person doing development. I became the bottleneck for everything, which was enjoyed by no one.

I like the idea of using plugin development to drive feature development. For plugins to be successful projects, I think the teams working on them need to be staffed properly. I think our team went into like “oh cool, we’ll all kinda work on it and then it will happen” – wasn’t the case. We could have benefited from more planning and tasking.

The Future
If anyone would like to continue working on the plugin, please do. I would prefer to focus on core development instead.

#featured-content

Featured Content, 10/4 Update

I finally put a bunch of work into the coding of the pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party, and I think it is fairly robust at this point. Whether it makes it into coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. ( or whether it even should) is up for discussion, but I would like to share what I have.

First, check out the latest code in trunktrunk A directory in Subversion containing the latest development code in preparation for the next major release cycle. If you are running "trunk", then you are on the latest revision. here: https://plugins.svn.wordpress.org/wp-featured-content/trunk/

To guide development, I made the following list of requirements. It should also be easier for people to follow along when we can all agree on an initial set of facts:

UIUI User interface

Wherever possible, existing WP functionality and screens will be used. The user should be able to associate posts with Featured Content theme areas as easy as selecting a categoryCategory The 'category' taxonomy lets you group posts / content together that share a common bond. Categories are pre-defined and broad ranging. or making a post sticky, but, to be more robust, the user should be able to override certain features of a post when it is displayed as a Featured Item in a theme. Example: different title when featured vs what is displayed for a the full post, different image when in a featured module vs the featured imageFeatured image A featured image is the main image used on your blog archive page and is pulled when the post or page is shared on social media. The image can be used to display in widget areas on your site or in a summary list of posts. for the post when displayed in single.php.

Post Type / TaxonomyTaxonomy A taxonomy is a way to group things together. In WordPress, some common taxonomies are category, link, tag, or post format. https://codex.wordpress.org/Taxonomies#Default_Taxonomies.

  1. A Featured Item uses the featured_item post type
  2. A featured_item belongs to a Featured Area
  3. Each Featured Area is a term in the featured_area taxonomy
  4. Post types can opt in to featured content by adding featured_area taxonomy support
  5. Themes can opt-in by supporting  ‘featured-content’  (the plugin currently brute-forces it)

Creating / Deleting

  1. Add a post with featured area(s), makemake A collection of P2 blogs at make.wordpress.org, which are the home to a number of contributor groups, including core development (make/core, formerly "wpdevel"), the UI working group (make/ui), translators (make/polyglots), the theme reviewers (make/themes), resources for plugin authors (make/plugins), and the accessibility working group (make/accessibility). sure featured item(s) are created
  2. TrashTrash Trash in WordPress is like the Recycle Bin on your PC or Trash in your Macintosh computer. Users with the proper permission level (administrators and editors) have the ability to delete a post, page, and/or comments. When you delete the item, it is moved to the trash folder where it will remain for 30 days. the post, delete permanently, make sure featured item(s) are deleted
  3. Featured item should not have a title when created, it should inherit from the parent post when empty – view in list tables to verify
  4. If a featured item’s title is edited, it should show that in the list table, unless it is empty
  5. Add a post with a featured area, item is created. Edit post to belong to a featured area, 2nd featured item should be created.
  6. Delete one of the featured items, the other should remain, the post should be linked to only one featured area.

Transitioning Post Status

  1. Add a post in draft status, make sure featured item is in draft status
  2. Move a post in draft to publish, make sure featured item is moved as well
  3. If a post was created with 2 featured items and one is trashed: if the term is re-linked to the post, the item in the trash should be untrashed, instead of creating a 3rd item

Trash / Untrash

  1. Trash a post, make sure the featured item(s) are deleted
  2. Untrash a post, make sure the featured item(s) are not created
  3. Trash an existing featured item, make sure post loses tax association
  4. Untrash an existing featured item, make sure post regains tax association
  5. Permanently delete existing featured item, make sure post loses tax association

Quick Edit

  1. The Taxonomy box for featured items should be present in Quick Edit
  2. All saving logic should fire in AJAX save routine for Quick Edit

Sorting/Re-ordering

  1. All featured items should be re-orderable via the Re-order items screen
  2. menu_order should be set when items are reordered, only those that change should be sent
  3. When new items are added to a featured area, they should be appended to the end of the list, not the beginning

Returning Data

  1. By default, featured item contains the post data of the post it belongs to
  2. If any fields have been overridden(post_title, post_excerpt), the post data is a merge of the 2
  3. If the featured item has a featured image, the theme can override by using the property ‘image_id’ to grab the featured image on one of the decorated $posts that is returned when applicable

Yeah, so that is a mouthful. All of these use-cases are listed in the comments at the top of the plugin file as well. There’s been a lot of discussion about new UI. If someone wants to think way outside of the box and introduce new screens, keep the above in mind.

#featured-content

Featured Content Update

Sorry for no meeting this week, it’s been busy at my j.o.b. In addition to the weekly IRCIRC Internet Relay Chat, a network where users can have conversations online. IRC channels are used widely by open source projects, and by WordPress. The primary WordPress channels are #wordpress and #wordpress-dev, on irc.freenode.net. meeting, we now have a Skype conversation going. Add me as a contact on Skype if you want to join in. My Skype username and TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. username are the same.

The pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party is in the repo:
https://plugins.svn.wordpress.org/wp-featured-content/trunk/

Last week, I made a screen to sort featured items within their respective areas. The logic to save the order when sorting still needs to be hashed out.

Currently, one person is doing the coding (me). This is not ideal, and I could use help. There have been a bunch of mockups, but I don’t currently have time to build a prototype for all of them. If would like to help with coding, please let me know in the comments.

#3-8, #featured-content

Featured Content: Getting Started

Ahead of our first official office hours, here is an overview of what I would like to discuss:

What is Featured Content?

Obenland discussed the high-level concept here: https://gist.github.com/obenland/3010432c8edcfcbf95a9

To me, Featured Content is a flexible way to show one or many posts in one or many places in your theme. A blogblog (versus network, site) might have 1 featured post area that will support 1-4 posts, as an example. A more complex site using WP as a CMS might program its homepage using many “featured areas” that contain varying numbers of post-like entities.

Featured Content, in the end, is just a way to return posts chosen by a content producer. The way in which featured content is selected should be intuitive, easy to manage, and use existing WP technology/terminology whenever possible. A featured post-like thing should an entity that points at a canonical post, while having the ability to override any of the parent post’s attributes on display. Example: I should be able to use a different title and image for a post that is featured when it is rendered in a featured area.

I should also be able to schedule featured items, much like I can schedule a post.

How are we going to implement it?

Here are my ideas:

I think we can get a lot of immediate mileage using a custom taxonomyTaxonomy A taxonomy is a way to group things together. In WordPress, some common taxonomies are category, link, tag, or post format. https://codex.wordpress.org/Taxonomies#Default_Taxonomies., working name: “Featured Area” and a custom post typeCustom Post Type WordPress can hold and display many different types of content. A single item of such a content is generally called a post, although post is also a specific post type. Custom Post Types gives your site the ability to have templated posts, to simplify the concept., working name: “Featured Item”. By default, a function like `wp_get_featured_content()` can return all featured posts. Passing a parameter can return posts matching that featured area slug that are published – `wp_get_featured_content( ‘mini-headerHeader The header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor’s opinion about your content and you/ your organization’s brand. It may also look different on different screen sizes.’ )`. A custom taxonomy can be registered to post and featured_item. Themes can register the taxonomy for more post_types as necessary.

The pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party, in its current form, implements all of the above: https://wordpress.org/plugins/wp-featured-content/

Things to consider:

  • How do we always keep the post and its featured_item brethren in sync?
  • Do featured_items and posts always share the same post_status? Should they be independent?
  • How do themes opt in to multiple featured areas if the terms have not be created for the featured_area taxonomy?
  • What are alternate ways to implement the above?

#3-8, #featured-content

Featured Content Office Hours

As my last task as acting lead for Featured Content, I’m happy to announce our first IRCIRC Internet Relay Chat, a network where users can have conversations online. IRC channels are used widely by open source projects, and by WordPress. The primary WordPress channels are #wordpress and #wordpress-dev, on irc.freenode.net. chat on Monday, 1700 UTC in #wordpress-dev, led by @wonderboymusic.

We will talk about the project organization and intended functionality for the pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party (on a high level!). Goal of the meeting is that everyone has a clear understanding of where the project is headed, what the next step in the process will be, and who is working on that.

#3-8, #core-plugins, #featured-content