Getting Right with Image Rights: Workflow and Major Minor Upgrade

I discovered many non-rights-cleared images that I now think may have detracted from the posts in some ways, even if they initially seemed to make them more attractive or striking.

After announcing the WP-RUBI Beta (0.91) a bit more than a week ago, I installed and began to work with it at this very blog, and I immediately began to notice that “workflow” improvements I had thought to save for a later day – or even reserve for a “premium” version – had to be considered “basic” to using the plug-in effectively. So, I began another week of fairly intensive work now represented in the Beta numbered 0.93. I could “re-up” or “re-announce,” but I’ll think I’ll save doing so for submission of “1.0” to the WordPress Plug-In Repo.

The enhancements include the following:

  • Set and View Image Removal/Replacement Status from Post Edit and All Posts/Pages (Quick and Bulk Edit) Screens
  • Category and Author Inclusion/Exclusion by Display Name instead of ID #
  • Category Inclusion/Exclusion Includes “Child” Categories
  • Option to Replace Images without Standard Image File Extensions (Mainly Served Images)
  • Admin Convenience Improvements (Expandable Text Areas instead of Text Boxes, Additional Editing Instructions)
  • Expanded Reset Options: Reset Main Settings and Post Settings Separately if Desired

In terms of actual workflow as I worked and flowed it, I think that the first and third above were the most significant (code samples at end):

Set and View Image Removal/Replacement Status from Post Edit and All Posts/Pages (Quick and Bulk Edit) Screens

In 0.91 and every version going back to Replace Old Images, individual post inclusions or exclusions were handled strictly via the main settings page, where included/excluded posts would be listed by ID. I realized that it would be much simpler if I could include or exclude (“clear”) a post from its own edit screen or from All Posts listings. The answer was to use “post meta” instead of global settings, and to add new columns to All Posts (and All Pages). A related convenience feature is the display of discrepancies, if any, between all images found and all images matched. Users may wish to examine “discrepant” posts for images served or sourced elsewhere than in the usual uploads directories, and adjust the “rights clearing” process accordingly.

Category Inclusion/Exclusion Includes “Child” Categories

In 0.91, category-based exclusions/inclusions did not include “child” categories (sub-categories). I quickly realized that at different points, depending on the number and character of posts in a given category or its child categories, it would be easier to be able to work with a “parent” as such instead of having to deal one by one with its children. Upon successful clearing of an entire parent category, it would also be more practical on the settings page to exclude the parent from general removal without having to list each individual child as well.

Workflow Notes

I found myself proceeding as follows:

PHASE I – Initial implementation: Prior To Date

  1. Set current date as “Prior To Date.”
  2. Clear “front page” posts of questionable/dangerous images – move “Prior To Date” back.

At that point, I felt I had a safe and initially presentable site.

PHASE II – Priority Categories

  1. Identify, exclude, and view high priority category.
  2. Open all posts in tabs, page by page: In most cases I could tell by featured image whether they next had to be opened for editing.
  3. Clear priority category – post by post.
  4. Exclude category from image removal and replacement.
  5. View effects on later pages: If appropriate, move “Prior To Date” back again.
  6. Move to new priority category and repeat.

After the 0.93 changes, I could easily move through All Posts, and bulk clear large numbers of posts at a glance. If I had an archive of 10s of 1000s of posts, however, I might prefer to work by author or category. Even then, however, a WordPresser can filter for Author or Category fairly easily via All Posts, so in many instances working through All Posts rather than category by category from Front End archives might still end up being the most efficient way to proceed.

General Observations: On Getting Honest

If fear of a lawsuit or threat of one – as a low probability, high impact danger – is not enough to motivate a blogger to get right with image rights, and the moral question also doesn’t move him or her, there’s something to be said for going gray anyway – as writers mostly have had to do for thousands of years up until the present (oh so fallen) era.

Along my image-curing way, I discovered many non-rights-cleared images that I now think may have detracted from the posts in some ways, even if they initially seemed to make them more attractive or striking.

So, for example, my first “priority” category was “Featured” – posts from my archives that I think of or thought of as best representing my work. If I ever put together a Selected Works by CK MacLeod anthology, I would begin with these. Among them was a series of posts I wrote in 2013 on the political, moral, and international-legal ramifications and possible historical significance of the chemical attack in East Ghouta, Syria, and the reaction of the Obama Administration. I had used several news photos depicting either the physical destruction of Syrian cities or the direct casualties of the attack, but I wonder now whether they oversold my argument, putting me in the position of someone scolding my moral inferiors (everyone) or seeming to blame them (you) for an indifference or callousness that exploitative use of, say, a photograph of assembled children’s corpses, may actually reinforce and hypocritically demonstrate.

In any event, I feel comfortable letting the words stand for themselves. I think the argument and perhaps the descriptions stand forth more strongly without exploitation in the common sensationalistic and therefore (quite observably) de-sensitizing, way. In other posts I found use of images from popular culture mainly adding a comedic effect that, again, in retrospect, seemed to detract from the seriousness of the presentation, even when they were not, as in a few cases, simply clichés or destined to become cliché (like using a “Terminator” image in a discussion of drone warfare).

If and when I construct and publish an anthology or anthologies, leaving the images out ought to simplify the project: I’ll have less to worry about as far as adaptation to “e-pub” or print formats is concerned, and I’ll also not have to worry about getting permissions.

Code Example 1: Include Child Categories

This function detects whether the given Post is in any of the designated categories (from $options) and returns “true” if so. I had some difficulty getting it right (see commented portions).

Code Example 2: Adding columns and options to Quick and Bulk Editor

screenshot-6This process was much more complicated: worth a post in itself. Or, rather, it might be if  WordPresser Rachel Carden (@bamadesigner) hadn’t already done most of the groundwork at her blog and at Github.

Getting the output I wanted for the two new columns did involve more “original” work: Nothing terribly fancy, and I’ve no doubt it could be improved, but here it is, with one unsolved mystery noted at the end.

First, the code for the Featured Image column, which, as you can see from the annotated screenshot above, is among other things designed to tell you via fallback image and color-coding both whether the Post or Page has a “Featured Image” (aka “Thumbnail,” but not always displayed at “thumbnail” size), and whether the Post or Page is included in Image Removal and Replacement.

A second helper function counts occurrences of images found in posts, returning one number for all images actually matched, another for all actually found. [29 June: Had to change this file to address relatively rare Regex results producing “catastrophic backtracking” in some cases – also refined search pattern – still working on it, but for latest results check plugin file admin.php, currently ca. lines 682 – 708]

And here are the both-columns content functions:

The above columns need to be enabled by familiar add_filter and add_action functions…

…which need to be copied and run a second time under different names to produce a display in All Pages. That’s the mystery.

IOW, the first time out, I tried

But it didn’t work until I wrote the new virtually identical functions (I ended up changing “Post” to “Page” in the messages) under new names, producing the following:

…and all of this is a small part of how I went from a plug-in whose code required all of around 200 lines in one PHP file to more than 2000 lines in a set of PHP, CSS, and jQuery files.

Home Page  Public Email  Twitter  Facebook  YouTube  Github   

Writing since ancient times, blogging, e-commercing, and site installing-designing-maintaining since 2001; WordPress theme and plugin configuring and developing since 2004 or so; a lifelong freelancer, not associated nor to be associated with any company, publication, party, university, church, or other institution. 

Posts in this series

Commenter Ignore Button by CK's Plug-Ins

Leave a Reply

Your email address will not be published. Required fields are marked *



Noted & Quoted

TV pundits and op-ed writers of every major newspaper epitomize how the Democratic establishment has already reached a consensus: the 2020 nominee must be a centrist, a Joe Biden, Cory Booker or Kamala Harris–type, preferably. They say that Joe Biden should "run because [his] populist image fits the Democrats’ most successful political strategy of the past generation" (David Leonhardt, New York Times), and though Biden "would be far from an ideal president," he "looks most like the person who could beat Trump" (David Ignatius, Washington Post). Likewise, the same elite pundit class is working overtime to torpedo left-Democratic candidates like Sanders.

For someone who was not acquainted with Piketty's paper, the argument for a centrist Democrat might sound compelling. If the country has tilted to the right, should we elect a candidate closer to the middle than the fringe? If the electorate resembles a left-to-right line, and each voter has a bracketed range of acceptability in which they vote, this would make perfect sense. The only problem is that it doesn't work like that, as Piketty shows.

The reason is that nominating centrist Democrats who don't speak to class issues will result in a great swathe of voters simply not voting. Conversely, right-wing candidates who speak to class issues, but who do so by harnessing a false consciousness — i.e. blaming immigrants and minorities for capitalism's ills, rather than capitalists — will win those same voters who would have voted for a more class-conscious left candidate. Piketty calls this a "bifurcated" voting situation, meaning many voters will connect either with far-right xenophobic nationalists or left-egalitarian internationalists, but perhaps nothing in-between.

Comment →

Understanding Trump’s charisma offers important clues to understanding the problems that the Democrats need to address. Most important, the Democratic candidate must convey a sense that he or she will fulfil the promise of 2008: not piecemeal reform but a genuine, full-scale change in America’s way of thinking. It’s also crucial to recognise that, like Britain, America is at a turning point and must go in one direction or another. Finally, the candidate must speak to Americans’ sense of self-respect linked to social justice and inclusion. While Weber’s analysis of charisma arose from the German situation, it has special relevance to the United States of America, the first mass democracy, whose Constitution invented the institution of the presidency as a recognition of the indispensable role that unique individuals play in history.

Comment →

[E]ven Fox didn’t tout Bartiromo’s big scoops on Trump’s legislative agenda, because 10 months into the Trump presidency, nobody is so foolish as to believe that him saying, “We’re doing a big infrastructure bill,” means that the Trump administration is, in fact, doing a big infrastructure bill. The president just mouths off at turns ignorantly and dishonestly, and nobody pays much attention to it unless he says something unusually inflammatory.On some level, it’s a little bit funny. On another level, Puerto Rico is still languishing in the dark without power (and in many cases without safe drinking water) with no end in sight. Trump is less popular at this point in his administration than any previous president despite a generally benign economic climate, and shows no sign of changing course. Perhaps it will all work out for the best, and someday we’ll look back and chuckle about the time when we had a president who didn’t know anything about anything that was happening and could never be counted on to make coherent, factual statements on any subject. But traditionally, we haven’t elected presidents like that — for what have always seemed like pretty good reasons — and the risks of compounding disaster are still very much out there.

Comment →
CK's WP Plugins


Extraordinary Comments

CK's WP Plugins