
內容簡介
Eight Day Week 提供一組工具,在 WordPress 儀表板中直接管理您的列印工作流程 – 就在您發布文章的地方!主要提供一個介面,以將文章分組、標記和管理其列印工作流程中的工作流狀態,形成一個「刊物(Issue)」。 功能包括: 建立「列印刊物(Print Issues)」 添加和排序章節和章節內的文章 分配特定於您的列印工作流程的文章狀態 限制訪問權限以儲存印刷角色 此外,此外掛還新增了兩個自定義角色,以最好地模擬現實世界的印刷團隊。它們分別為: 「印刷編輯(Print Editor)」角色:可以完全訪問創建介面,例如 Print Issue、Article Status、Print Publication 等等。 「印刷製作(Print Production)」角色:可以只讀方式訪問「Print Issues」。XML 導出工具也可用於製作用戶。 以「只讀」模式查看列印刊物 繞過文章鎖定功能,提供了列印刊物的只讀視圖 XML 導出到 InDesign 導出特定格式的 XML 文件,以進行 InDesign 導入 篩選 & Hooks Eight Day Week 為自定義和擴展插件提供了多個篩選器和 Hooks。 模組 Eight Day Week 對其許多功能採用模組式方法。這可以通過篩選器的啟用或禁用來實現,而且所有這些都是獨立工作的。 這些模組如下: Article Byline Article Count Article Export Article Status Issue Publication Issue Status 通過從下面的篩選器格式返回 false 值,可以禁用任何一個模組: add_filter( 'Eight_Day_Week\Plugins\load_$plugin', '__return_false' ); 其中,$plugin 值是插件名的縮略版,例如 article-byline。 文章表 在列印刊物內的文章列表中顯示的資訊是可篩選的。可以通過以下篩選器添加自定義列:Eight_Day_Week\Articles\article_columns 和 Eight_Day_Week\Articles\article_meta_$column_name。 樣例用法: 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' ) ); } 列印刊物表 在列印刊物列表中顯示的資訊是可篩選的。可以通過以下篩選器添加自定義列: Eight_Day_Week\\\Print_Issue_Columns\\\pi_columns。請注意,這是一個方便的篩選器,基本篩選器為 manage_edit-print-issue_columns。有關用法的示例,請查看 includes/functions/print-issue-columns.php。 文章導出 列印刊物中文章的導出高度可定制,從 Zip 檔案的文件名到單獨文件的文件名,再到文件本身的內容。 最好的參考是閱讀 includes/functions/plugins/article-export.php。這裡提供了一些 OBSERVER 上使用的篩選器示例。
外掛標籤
開發者團隊
② 後台搜尋「Eight Day Week Print Workflow」→ 直接安裝(推薦)
原文外掛簡介
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”. Features: Create “Print Issues” Add and order sections, and articles within sections Assign article statuses specific to your print workflow 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. View a Print Issue in “Read Only” mode Circumvents the post locking feature by offering a read-only view of a print issue XML Export to InDesign: Classic Editor vs. Gutenberg Exports When exporting content from WordPress for use in InDesign, there are key differences between Classic Editor and Gutenberg (Block Editor) exports. This section highlights how each type of export behaves in InDesign and offers guidance on how to handle these differences. Classic Editor exports use basic HTML tags like
, , and , making them straightforward for import into InDesign. Gutenberg exports include additional metadata such as HTML comments () that define block-level structures, which may require manual adjustments after importing into InDesign. Import Differences: Classic Editor: Imports cleanly into InDesign without extra metadata. Gutenberg: May include block-related metadata, requiring users to clean up the imported content or manually adjust formatting. Recommendations: Classic Editor: Best for simple imports with minimal manual work. Gutenberg: Recommended for users comfortable with removing metadata or adjusting block-based settings after the import. 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 Byline Article Count Article Export Article Status Issue Publication Issue Status Any of these can be disabled by returning a false 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 and Eight_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 is manage_edit-print-issue_columns. See includes/functions/print-issue-columns.php for sample usage. Article Export The export of posts in a Print Issue is highly customizable, 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 through includes/functions/plugins/article-export.php. Here’s a few examples used on the Observer. Sample Eight Day Week filters for the Observer Examples from Observer’s eight-day-week-filters.php: 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_map as $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 ) appearing in the Eight Day Week XML export. Note that the XML is still valid–you can test and confirm that yourself using an XML 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 a Block Editor sample or a Classic Editor sample.
