Workflow for attachments in WordPress

Here is how I realized a simple media workflow. Security checking and sanitizing is up to everyone. Based on WordPress version: 4.9.8 Create Attachment Post | Handle Media if (!empty($_FILES) && isset($_POST[‘postid’])) { media_handle_upload(“attachments”, $_POST[‘postid’]); } Post status pending is not possible for attachments when using media_handle_upload. For this case a filter needs to be … Read more

Include drafts in internal link dialog

This is very similar to this question. We have to hook into check_ajax_referer to address the internal linking feature only. Then we register an action for pre_get_posts to extend the search to drafts and pending posts. We will still get no pretty permalinks, because they are excluded in get_permalink. So we register a filter for … Read more

Publication Workflow

Allow me to translate the roles and states into WP parlance: Roles: Editor -> Author Publisher -> Editor States: Draft -> Draft Ready for publication -> Pending Review Published -> Published The only thing you need a plugin for is this bit: “From that moment on, the author looses the ability to edit the blogpost.”

Efficient way to edit WordPress themes

Delete DreamWeaver right now and do the following instead so that you can edit everything locally and see changes in real-time: 1) Install MAMP so you can run a server locally on your computer and then install WordPress as you normally would but in a local computer folder 2) Download SublimeText as your code editor. … Read more

Workflow for working with git and WordPress

The problem with the linked article in your question is that it is suggesting to download WordPress and then create your own git repo – but then this cannot be easily updated. Instead you can have WordPress itself in git. Rather than the default subversion, there is an offical Github repository of WordPress, and in … Read more

Efficient Tag Management?

I manage a blog with 3 editors and 8-10 contributors. In my experience, the best way to manage tags is to simply instruct contributors not to add tags to their own articles, and instead have the editors be responsible for tagging articles. You can then work with editors to agree on what the purpose of … Read more

What actions affect files, DB, or both?

Registering a new user – database Adding a post or comment – database Changing to a new theme – database(yes) Changing a theme’s settings – database Installing or removing a plugin – file system,database Activating, or deactivating a plugin – file system,database Updating a plugin – file system and database (DB structure may change if … Read more