Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Optimize print publication workflows by using WordPress as your print CMS.

License

NotificationsYou must be signed in to change notification settings

10up/eight-day-week

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Eight Day Week

Support LevelRequired PHP VersionRequired WP VersionWordPress tested up to versionGPLv2 LicenseDependency ReviewE2E testsPHP Standards ScrutinizerCodeQLWordPress Playground Demo

Optimize publication workflows by using WordPress as your print CMS.

Overview

Eight Day Week provides a set of tools to manage your print workflow directly in your WordPress dashboard–right where your posts are! Primarily, it offers an interface to group, label, and manage the workflow status of posts in a printed "Issue".

The Print Issue list table.

Features

Create "Print Issues"

  • Add and order sections, and articles within sections
  • Assign article statuses specific to your print workflow

The Print Issue editor, showing the sections and contained articles, as well as several modules at play.

Limit access to Print Roles

Two custom roles are added by this plugin to best model a real-world print team.

  • The Print Editor role offers full access to the creation interfaces, such as Print Issue, Article Status, Print Publication, etc.
  • The Print Production role offers read-only access to a Print Issues. The XML export tool is also available to Production users.

The Users list table, showing the "Change print role to..." dropdown and "Print Role" column.

View a Print Issue in "Read Only" mode

  • Circumvents the post locking feature by offering a read-only view of a print issue

A Print Issue in "read only view". This view allows anyone with access to view a Print Issue without inducing a post lock, or being locked out by another editor. Note that the Export tools are still available in read only view.

XML Export to InDesign:Classic Editor vs. Gutenberg Exports

When exporting content from WordPress for use in InDesign, there are key differences betweenClassic Editor andGutenberg (Block Editor) exports. This section highlights how each type of export behaves in InDesign and offers guidance on how to handle these differences. You can test how this works in your version of InDesign with these sample XML files:Gutenberg XML,Classic Editor XML

Classic Editor Exports

  • The XML structure generated by the Classic Editor is simple and straightforward, using basic HTML tags like<p>,<strong>, and<em> for paragraphs, bold, and italic text.
  • No extra metadata or block-related comments are present, which allows for a smoother import into InDesign without any unnecessary elements.

Gutenberg Exports

  • Gutenberg-based exports include additional metadata in the form of HTML comments (e.g.,<!-- wp:paragraph -->) that wrap around content blocks. These comments contain details about block configurations and alignments.
  • While the extra block metadata does not invalidate the XML, InDesign may not process these comments correctly, requiring manual adjustments to clean up or remove them.

InDesign Import Differences

  • Classic Editor: Imports smoothly into InDesign without any issues, as the structure is simple, and no unnecessary metadata is present.
  • Gutenberg: The extra block comments and metadata may not be recognized by InDesign and could interfere with the import. Users may need to manually clean up these comments or adjust formatting after the import to achieve the desired layout.

Recommendations

  • Classic Editor: Ideal for seamless imports with minimal manual adjustments.

  • Gutenberg: Recommended for users familiar with InDesign who are comfortable with making adjustments to remove unnecessary metadata or fine-tune block-specific settings after import.

  • Export XML files specifically formatted for import into InDesign

Sample article XML export.

Issue StatusesPublicationsArticle Statuses
Editing of Issue StatusesEditing of PublicationsEditing of Article Statuses

Requirements

Installation

Eight Day Week has no settings or configurations to set up. It just works!

Filters & Hooks

Eight Day Week provides a number of filters and hooks for customizing and extending the plugin.

Modules

Eight Day Week follows a module-style approach to many of its features. These can be turned on or off via filters, and all work independently.These are:Article BylineArticle CountArticle ExportArticle StatusIssue PublicationIssue StatusAny of these can be disabled by returning a falsey value from the following filter format:add_filter( 'Eight_Day_Week\Plugins\load_$plugin', '__return_false' );The$plugin value is a slug version of the plugin name, i.e. article-byline.

Article Table

The information displayed in the list of articles within a Print Issue is filterable. Custom columns can be added via the following filters:Eight_Day_Week\Articles\article_columns andEight_Day_Week\Articles\article_meta_$column_name.

Sample usage:

add_filter( 'Eight_Day_Week\Articles\article_columns', function( $columns ) {    $columns['byline'] = _x( 'Byline', 'Label for multiple, comma separated authors', 'your-text-domain' );    return $columns;} );add_filter( 'Eight_Day_Week\Articles\article_meta_byline', function( $incoming_value, $post ) {    return implode( ', ', wp_list_pluck( my_get_post_authors_function( $post ), 'display_name' ) );}

Print Issue Table

The information displayed in the list of Print Issues is filterable. Custom columns can be added via the following filter:Eight_Day_Week\Print_Issue_Columns\pi_columns. Note that this is a convenience filter, the base filter ismanage_edit-print-issue_columns. Seeincludes/functions/print-issue-columns.php for sample usage.

Article Export

The export of posts in a Print Issue is highly customizeable, from the file name of the zip, to the file name of the individual files, to the contents of the files themselves. The best reference would be to read throughincludes/functions/plugins/article-export.php.Here's a few examples used on theObserver.

Sample Eight Day Week filters for the Observer

Examples from Observer's eight-day-week-filters.php:

<?phpadd_filter('Eight_Day_Week\Plugins\Article_Export\xml_outer_elements',function($elements,$article ) {$elements['subHeadline'] =get_post_meta($article->ID,'nyo_dek',true );return$elements;},10,2 );add_filter('Eight_Day_Week\Plugins\Article_Export\xml_outer_elements',function($elements,$article ) {if(function_exists('\Eight_Day_Week\Plugins\Article_Byline\get_article_byline' ) ) {$elements['byline']      =\Eight_Day_Week\Plugins\Article_Byline\get_article_byline($article );}return$elements;},10,2 );add_filter('Eight_Day_Week\Plugins\Article_Export\xpath_extract',function($extract ) {$extract[] = ['tag_name'  =>'pullQuote','container' =>'pullQuotes','query'     =>'//p[contains(@class, "pullquote")]'];return$extract;} );add_filter('Eight_Day_Week\Plugins\Article_Export\dom',function ($dom ) {$swap_tag_name ='emphasized';$extract_map = ['strong' => ['solo'  =>'bold','inner' =>'em'],'em'     => ['solo'  =>'italics','inner' =>'strong'],];foreach ($extract_mapas$tag_name =>$map ) {$nodes  =$dom->getElementsByTagName($tag_name );$length =$nodes->length;for ($i =$length; --$i >=0; ) {$el         =$nodes->item($i );$emphasized =$el->getElementsByTagName($map['inner'] );if ($emphasized->length ) {$em            =$dom->createElement($swap_tag_name );$em->nodeValue =$el->nodeValue;try {$el->parentNode->replaceChild($em,$el );}catch (\Exception$e ) {}continue;}$new            =$dom->createElement($map['solo'] );$new->nodeValue =$el->nodeValue;try {$el->parentNode->replaceChild($new,$el );}catch (\Exception$e ) {}}}return$dom;} );

Known Caveats/Issues

Gutenberg exports

Gutenberg-based exports include some additional metadata/details that a Classic Editor-based export does not.Gutenberg stores block data in HTML comments, so you'll notice those comments (in the form of<!-- "Gutenberg block data" -->) appearing in the Eight Day Week XML export. Note that the XML is still valid--you can test and confirm that yourself using anXML validator--though depending on your version of InDesign you may get different results upon importing a Gutenberg export compared to a Classic Editor export. Our testing showed that those HTML comments in a Gutenberg export did not affect the import into InDesign however. You can test how this works in your version of InDesign with these sample XML files:Gutenberg XML,Classic Editor XML. You can also test how this works with full ZIP exports of Print Issues containing aBlock Editor sample or aClassic Editor sample.

Support Level

Stable: 10up is not planning to develop any new features for this, but will still respond to bug reports and security concerns. We welcome PRs, but any that include new features should be small and easy to integrate and should not include breaking changes. We otherwise intend to keep this tested up to the most recent version of WordPress.

Changelog

A complete listing of all notable changes to Eight Day Week are documented inCHANGELOG.md.

Contributing

Please readCODE_OF_CONDUCT.md for details on our code of conduct,CONTRIBUTING.md for details on the process for submitting pull requests to us, andCREDITS.md for a listing of contributors to Eight Day Week.

Like what you see?

Work with us at 10up


[8]ページ先頭

©2009-2025 Movatter.jp