diff --git a/.gitattributes b/.gitattributes index 87dde79..856c151 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9,8 +9,9 @@ /CODE_OF_CONDUCT.md export-ignore /composer.json export-ignore /CONTRIBUTING.md export-ignore -/CONTRIBUTORS.md export-ignore +/CREDITS.md export-ignore /Gruntfile.js export-ignore /LICENSE.md export-ignore +/package.json export-ignore /package-lock.json export-ignore /README.md export-ignore diff --git a/.github/main.workflow b/.github/main.workflow deleted file mode 100644 index 62549dc..0000000 --- a/.github/main.workflow +++ /dev/null @@ -1,38 +0,0 @@ -workflow "Deploy" { - resolves = ["WordPress Plugin Deploy"] - on = "push" -} - -# Filter for tag -action "tag" { - uses = "actions/bin/filter@master" - args = "tag" -} - -action "WordPress Plugin Deploy" { - needs = ["tag"] - uses = "10up/actions-wordpress/dotorg-plugin-deploy@master" - secrets = ["SVN_PASSWORD", "SVN_USERNAME", "GITHUB_TOKEN"] - env = { - SLUG = "eight-day-week-print-workflow" - } -} - -workflow "Asset/readme update" { - resolves = ["Plugin Asset Update"] - on = "push" -} - -action "Filters for GitHub Actions" { - uses = "actions/bin/filter@master" - args = "branch master" -} - -action "Plugin Asset Update" { - uses = "10up/actions-wordpress/dotorg-plugin-asset-update@master" - needs = ["Filters for GitHub Actions"] - secrets = ["SVN_USERNAME", "SVN_PASSWORD"] - env = { - SLUG = "eight-day-week-print-workflow" - } -} \ No newline at end of file diff --git a/.github/workflows/push-asset-readme-update.yml b/.github/workflows/push-asset-readme-update.yml new file mode 100644 index 0000000..a711f0c --- /dev/null +++ b/.github/workflows/push-asset-readme-update.yml @@ -0,0 +1,17 @@ +name: Plugin asset/readme update +on: + push: + branches: + - master +jobs: + master: + name: Push to master + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: WordPress.org plugin asset/readme update + uses: 10up/action-wordpress-plugin-asset-update@master + env: + SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} + SVN_USERNAME: ${{ secrets.SVN_USERNAME }} + SLUG: eight-day-week-print-workflow diff --git a/.github/workflows/push-deploy.yml b/.github/workflows/push-deploy.yml new file mode 100644 index 0000000..fe4a714 --- /dev/null +++ b/.github/workflows/push-deploy.yml @@ -0,0 +1,17 @@ +name: Deploy to WordPress.org +on: + push: + tags: + - "*" +jobs: + tag: + name: New tag + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: WordPress Plugin Deploy + uses: 10up/action-wordpress-plugin-deploy@master + env: + SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} + SVN_USERNAME: ${{ secrets.SVN_USERNAME }} + SLUG: eight-day-week-print-workflow diff --git a/.wordpress-org/icon-256x256.svg b/.wordpress-org/icon-256x256.svg new file mode 100644 index 0000000..63a9a46 --- /dev/null +++ b/.wordpress-org/icon-256x256.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/CHANGELOG.md b/CHANGELOG.md index e2b490b..a162457 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file, per [the Ke ## [Unreleased] +## [1.1.1] - 2019-11-22 +### Changed +- Bump WordPress version "tested up to" 5.3 (props [@adamsilverstein](https://github.com/adamsilverstein) via [#45](https://github.com/10up/eight-day-week/pull/45)) +- Documentation and deploy automation updates (props [@jeffpaul](https://github.com/jeffpaul) via [#38](https://github.com/10up/eight-day-week/pull/38), [#39](https://github.com/10up/eight-day-week/pull/39), [#42](https://github.com/10up/eight-day-week/pull/42), [#46](https://github.com/10up/eight-day-week/pull/46), [#48](https://github.com/10up/eight-day-week/pull/48), [#49](https://github.com/10up/eight-day-week/pull/49), [#50](https://github.com/10up/eight-day-week/pull/50)) + +### Fixed +- WordPress.org translation readiness (props [@jeffpaul](https://github.com/jeffpaul), [@adamsilverstein](https://github.com/adamsilverstein), [@helen](https://github.com/helen) via [#41](https://github.com/10up/eight-day-week/pull/41)) + ## [1.1.0] - 2019-07-26 ### Added - German translation files (props @adamsilverstein, @maryisdead via #31) @@ -20,5 +28,6 @@ All notable changes to this project will be documented in this file, per [the Ke - Initial Release [Unreleased]: https://github.com/10up/eight-day-week/compare/master...develop +[1.1.1]: https://github.com/10up/eight-day-week/compare/1.1.0...1.1.1 [1.1.0]: https://github.com/10up/eight-day-week/compare/9057a7f...1.1.0 [1.0.0]: https://github.com/10up/eight-day-week/commit/9057a7f310068676ef8a15e0ba0a395273f1cb98 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index da32f05..f885e2b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,12 +29,14 @@ The `develop` branch is the development branch which means it contains the next ## Release instructions 1. Branch: Starting from `develop`, cut a release branch named `release/X.Y.Z` for your changes. -2. Version bump: Bump the version number in `eight-day-week.php` and `readme.txt` if it does not already reflect the version being released. +2. Version bump: Bump the version number in `eight-day-week.php`, `readme.txt`, `composer.json`, and `package.json` if it does not already reflect the version being released. 3. Changelog: Add/update the changelog in both `readme.txt` and `CHANGELOG.md` -4. Readme updates: Make any other readme changes as necessary. `CHANGELOG.md` and `README.md` are geared toward GitHub and `readme.txt` contains WordPress.org-specific content. The two are slightly different. -5. New files: Check to be sure any new files/paths that are unnecessary in the production version are included in `.gitattributes`. -6. Merge: Make a non-fast-forward merge from your release branch to `develop`, then do the same for `develop` into `master`. `master` contains the stable development version. +4. New files: Check to be sure any new files/paths that are unnecessary in the production version are included in `.gitattributes`. +5. Readme updates: Make any other readme changes as necessary. `CHANGELOG.md` and `README.md` are geared toward GitHub and `readme.txt` contains WordPress.org-specific content. The two are slightly different. +6. Merge: Make a non-fast-forward merge from your release branch to `develop`, then do the same for `develop` into `master` (`git checkout master && git merge --no-ff develop`). `master` contains the stable development version. 7. Test: While still on the `master` branch, test for functionality locally. If all is well, push to GitHub. -8. Release: Create a [new release](https://github.com/10up/eight-day-week/releases/new), naming the tag and the release with the new version number. Paste the changelog from `CHANGELOG.md` into the body of the release and include a link to the closed issues on the milestone (e.g. `https://github.com/10up/eight-day-week/milestone/2?closed=1`). Close the milestone. If any open PRs which were milestoned for the new release do not make it into the release, update their milestone. +8. Release: Create a [new release](https://github.com/10up/eight-day-week/releases/new), naming the tag and the release with the new version number, and targeting the `master` branch. Paste the changelog from `CHANGELOG.md` into the body of the release and include a link to the closed issues on the `X.Y.Z` milestone (e.g. `https://github.com/10up/eight-day-week/milestone/2?closed=1`). 9. SVN: Wait for the [GitHub Action](https://github.com/10up/eight-day-week/actions) to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes. 10. Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/eight-day-week-print-workflow/. This may take a few minutes. +11. Close milestone: Edit the [X.Y.Z milestone](https://github.com/10up/eight-day-week/milestone/#) with release date (in the `Due date (optional)` field) and link to GitHub release (in the `Description` field), then close `X.Y.Z` milestone. +12. Punt incomplete items: If any open issues or PRs which were milestoned for `X.Y.Z` do not make it into the release, update their milestone to `X.Y.Z+1`, `X.Y+1.0`, `X+1.0.0` or `Future Release`. diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md deleted file mode 100644 index 96158ec..0000000 --- a/CONTRIBUTORS.md +++ /dev/null @@ -1,16 +0,0 @@ -# Contributors - -This file is a work-in-progress attempt to display the various contributors to Eight Day Week, utilizing the [GitHub API as our source](https://api.github.com/repos/10up/eight-day-week/contributors?anon=1). If you have examples of other or better ways to display this info, please let us know! - -## Credits -- [10up](https://github.com/10up) -- [Observer Media](https://github.com/observermedia) -- [Josh Levinson](https://github.com/joshlevinson) -- [Brent Schultz](https://github.com/brs14ku) -- [Jeff Sternberg](https://github.com/sternb0t) -- [Anthony Castro](https://github.com/anthony-j-castro) -- [Josh Pollock](https://github.com/Shelob9) -- [Adam Silverstein](https://github.com/adamsilverstein) -- [Matthias Wehrlein](https://github.com/maryisdead) -- [Chris Wallace](https://github.com/chriswallace) -- [Jared Williams](https://github.com/Jared-Williams) diff --git a/CREDITS.md b/CREDITS.md new file mode 100644 index 0000000..5ff6d70 --- /dev/null +++ b/CREDITS.md @@ -0,0 +1,19 @@ +The following acknowledges the Maintainers for this repository, those who have Contributed to this repository (via bug reports, code, design, ideas, project management, translation, testing, etc.), and any Libraries utilized. + +## Maintainers + +The following individuals are responsible for curating the list of issues, responding to pull requests, and ensuring regular releases happen. + +[Ryan Welcher (@ryanwelcher)](https://github.com/ryanwelcher), [Adam Silverstein (@adamsilverstein)](https://github.com/adamsilverstein), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul). + +## Contributors + +Thank you to all the people and companies who have already contributed to this repository via bug reports, code, design, ideas, project management, translation, testing, etc. + +[10up (@10up)](https://github.com/10up), [Observer Media (@observermedia)](https://github.com/observermedia), [Josh Levinson (@joshlevinson)](https://github.com/joshlevinson), [Brent Schultz (@brs14ku)](https://github.com/brs14ku), [Jeff Sternberg (@sternb0t)](https://github.com/sternb0t), [Anthony Castro (@anthony-j-castro)](https://github.com/anthony-j-castro), [Josh Pollock (@Shelob9)](https://github.com/Shelob9), [Adam Silverstein (@adamsilverstein)](https://github.com/adamsilverstein), [Matthias Wehrlein (@maryisdead)](https://github.com/maryisdead), [Chris Wallace (@chriswallace)](https://github.com/chriswallace), [Jared Williams (@Jared-Williams)](https://github.com/Jared-Williams), [Helen Hou-Sandi (@helen)](https://github.com/helen), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Ryan Welcher (@ryanwelcher)](https://github.com/ryanwelcher). + +## Libraries + +The following software libraries are utilized in this repository. + +N/A. diff --git a/README.md b/README.md index 0f737bf..f9e578d 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,15 @@ > Optimize publication workflows by using WordPress as your print CMS. 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". -[![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) [![Release Version](https://img.shields.io/github/release/10up/eight-day-week.svg)](https://github.com/10up/eight-day-week/releases/latest) ![WordPress tested up to version](https://img.shields.io/badge/WordPress-v4.4%20tested-success.svg) [![GPLv2 License](https://img.shields.io/github/license/10up/eight-day-week.svg)](https://github.com/10up/eight-day-week/blob/develop/LICENSE.md) +[![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) [![Release Version](https://img.shields.io/github/release/10up/eight-day-week.svg)](https://github.com/10up/eight-day-week/releases/latest) ![WordPress tested up to version](https://img.shields.io/badge/WordPress-v5.3%20tested-success.svg) [![GPLv2 License](https://img.shields.io/github/license/10up/eight-day-week.svg)](https://github.com/10up/eight-day-week/blob/develop/LICENSE.md) -## Table of Contents +## Table of Contents * [Features](#features) * [Requirements](#requirements) * [Installation](#installation) * [Filters & Hooks](#filters--hooks) * [Screenshots](#screenshots) +* [Known Caveats/Issues](#known-caveatsissues) * [Changelog](#changelog) * [Contributing](#contributing) @@ -42,11 +43,11 @@ Two custom roles are added by this plugin to best model a real-world print team. ## Requirements * PHP 5.6+ -* [WordPress](http://wordpress.org) 4.3+ +* [WordPress](http://wordpress.org) 4.6+ ## Installation -Print Production has no settings or configurations to set up. It just works! +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. @@ -92,6 +93,12 @@ The information displayed in the list of Print Issues is filterable. Custom colu 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 through `includes/functions/plugins/article-export.php`. [Here's](https://gist.github.com/joshlevinson/4a2c3ed78b21b3c54eba) a few examples used on the *Observer*. +## 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](https://developer.wordpress.org/block-editor/key-concepts/#delimiters-and-parsing-expression-grammar), 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](https://www.xmlvalidation.com/)--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](https://gist.githubusercontent.com/adamsilverstein/3a9af64f4827b0ffcba963fd4b6a380a/raw/0513c4dd7cbd45b54c644a6aa9cbaaf269659b8d/classic.xml), [Classic Editor XML](https://gist.githubusercontent.com/adamsilverstein/fafae070f20232d1061c5517369a8f06/raw/b74310e18125a045cea213513fba435eee1545ff/classic2.xml). + ## Support Level **Active:** 10up is actively working on this, and we expect to continue work for the foreseeable future including keeping tested up to the most recent version of WordPress. Bug reports, feature requests, questions, and pull requests are welcome. @@ -102,7 +109,7 @@ A complete listing of all notable changes to Eight Day Week are documented in [C ## Contributing -Please read [CODE_OF_CONDUCT.md](https://github.com/10up/eight-day-week/blob/develop/CODE_OF_CONDUCT.md) for details on our code of conduct, [CONTRIBUTING.md](https://github.com/10up/eight-day-week/blob/develop/CONTRIBUTING.md) for details on the process for submitting pull requests to us, and [CONTRIBUTORS.md](https://github.com/10up/eight-day-week/blob/develop/CONTRIBUTORS.md) for a listing of contributors to Eight Day Week. +Please read [CODE_OF_CONDUCT.md](https://github.com/10up/eight-day-week/blob/develop/CODE_OF_CONDUCT.md) for details on our code of conduct, [CONTRIBUTING.md](https://github.com/10up/eight-day-week/blob/develop/CONTRIBUTING.md) for details on the process for submitting pull requests to us, and [CREDITS.md](https://github.com/10up/eight-day-week/blob/develop/CREDITS.md) for a listing of contributors to Eight Day Week. ## Like what you see? diff --git a/assets/css/style.css b/assets/css/style.css index d76da4a..71949a0 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -128,3 +128,5 @@ th.column-title { .article-export-buttons { clear: left; margin-top: 15px; } + +/*# sourceMappingURL=style.css.map */ diff --git a/assets/js/src/scripts.js b/assets/js/src/scripts.js index 40b9f25..be5c6b3 100644 --- a/assets/js/src/scripts.js +++ b/assets/js/src/scripts.js @@ -1,5 +1,5 @@ /** - * Print Production + * Eight Day Week * http://10up.com * * Copyright (c) 2015 10up, Josh Levinson, Brent Schultz diff --git a/composer.json b/composer.json index be351bd..dc0168b 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "eight-day-week", "description": "Tools that help improve the digital/print production workflows.", - "version": "0.0.1", + "version": "1.1.1", "type": "wordpress-plugin", "keywords": [], "homepage": "http://10up.com", diff --git a/eight-day-week.php b/eight-day-week.php index 59dc935..2a51bc9 100644 --- a/eight-day-week.php +++ b/eight-day-week.php @@ -2,11 +2,11 @@ /** * Plugin Name: Eight Day Week * Description: Tools that help improve digital & print workflows. - * Version: 1.1.0 + * Version: 1.1.1 * Author: 10up * Author URI: http://10up.com * License: GPLv2+ - * Text Domain: eight-day-week + * Text Domain: eight-day-week-print-workflow * Domain Path: /languages */ @@ -35,7 +35,7 @@ require_once __DIR__ . '/plugins.php'; // Useful global constants -define( 'EDW_VERSION', '1.1.0' ); +define( 'EDW_VERSION', '1.1.1' ); define( 'EDW_URL', Eight_Day_Week\plugins_url( __FILE__ ) ); define( 'EDW_PATH', dirname( __FILE__ ) . '/' ); define( 'EDW_INC', EDW_PATH . 'includes/' ); diff --git a/includes/functions/admin-menu-page.php b/includes/functions/admin-menu-page.php index 786459c..09e9661 100644 --- a/includes/functions/admin-menu-page.php +++ b/includes/functions/admin-menu-page.php @@ -39,8 +39,8 @@ function a( $function ) { */ function admin_menu() { - $top_level = _x( 'Print', 'Top level menu label', 'eight-day-week' ); - $pi_submenu = _x( 'Print Issues', 'Submenu label for the Print Issue CPT', 'eight-day-week' ); + $top_level = _x( 'Print', 'Top level menu label', 'eight-day-week-print-workflow' ); + $pi_submenu = _x( 'Print Issues', 'Submenu label for the Print Issue CPT', 'eight-day-week-print-workflow' ); // Top level "container", but still link to Print Issue CPT list table add_menu_page( $top_level, $top_level, 'read_' . EDW_PRINT_ISSUE_CPT, EDW_ADMIN_MENU_SLUG, '', 'dashicons-media-document', 15 ); @@ -53,4 +53,4 @@ function admin_menu() { do_action( __NAMESPACE__ . '\admin_menu' ); -} \ No newline at end of file +} diff --git a/includes/functions/articles.php b/includes/functions/articles.php index 8d3050b..37f117d 100644 --- a/includes/functions/articles.php +++ b/includes/functions/articles.php @@ -52,14 +52,14 @@ function articles_metabox_output( $section_id ) { } ?>

@@ -155,7 +155,7 @@ function get_columns() { return apply_filters( __NAMESPACE__ . '\article_columns', [ 'cb' => '', - 'title' => _x( 'Article', 'eight-day-week' ), + 'title' => _x( 'Article', 'eight-day-week-print-workflow' ), ] ); } @@ -280,7 +280,7 @@ function column_title( $item ) { } $title .= '' . __( 'View', 'eight-day-week' ) . ''; + esc_url( get_permalink( $item->ID ) ) . '">' . __( 'View', 'eight-day-week-print-workflow' ) . ''; //don't give remove link to print prod users if( User\current_user_can_edit_print_issue() ) { @@ -423,7 +423,7 @@ function get_articles_autocomplete( $title ) { */ function get_articles( $title ) { if ( ! $title ) { - throw new \Exception( __( 'Please enter a valid/non-empty title.', 'eight-day-week' ) ); + throw new \Exception( __( 'Please enter a valid/non-empty title.', 'eight-day-week-print-workflow' ) ); } $post_types = apply_filters( __NAMESPACE__ . '\\post_types', [ 'post' ] ); @@ -444,7 +444,7 @@ function get_articles( $title ) { remove_filter( 'posts_where', __NAMESPACE__ . '\\title_filter', 10, 2 ); if ( ! $articles->posts ) { - throw new \Exception( __( 'No matching articles found.', 'eight-day-week' ) ); + throw new \Exception( __( 'No matching articles found.', 'eight-day-week-print-workflow' ) ); } return $articles->posts; @@ -539,7 +539,6 @@ function save_section_articles( $post_id, $post, $update ) { * @return array Modified columns */ function filter_article_columns_date( $columns ) { - $columns['date'] = __( 'Publish Date', 'eight-day-week' ); + $columns['date'] = __( 'Publish Date', 'eight-day-week-print-workflow' ); return $columns; } - diff --git a/includes/functions/core.php b/includes/functions/core.php index aa8659b..cf51b6f 100644 --- a/includes/functions/core.php +++ b/includes/functions/core.php @@ -44,9 +44,9 @@ function init() { } function i18n() { - $locale = apply_filters( 'plugin_locale', get_locale(), 'eight-day-week' ); - load_textdomain( 'eight-day-week', WP_LANG_DIR . '/print-production/print-production-' . $locale . '.mo' ); - load_plugin_textdomain( 'eight-day-week', false, plugin_basename( EDW_PATH ) . '/languages/' ); + $locale = apply_filters( 'plugin_locale', get_locale(), 'eight-day-week-print-workflow' ); + load_textdomain( 'eight-day-week-print-workflow', WP_LANG_DIR . '/eight-day-week-print-workflow/eight-day-week-print-workflow-' . $locale . '.mo' ); + load_plugin_textdomain( 'eight-day-week-print-workflow', false, plugin_basename( EDW_PATH ) . '/languages/' ); } /** @@ -258,4 +258,4 @@ final public static function tzOffsetToName( $offset, $isDst = null ) { return $zone; } -} \ No newline at end of file +} diff --git a/includes/functions/plugins/article-byline.php b/includes/functions/plugins/article-byline.php index d262ad5..ad3af63 100644 --- a/includes/functions/plugins/article-byline.php +++ b/includes/functions/plugins/article-byline.php @@ -47,7 +47,7 @@ function a( $function ) { * @return array modified columns */ function filter_article_columns_byline( $columns ) { - $columns['byline'] = _x( 'Byline', 'Label for multiple, comma separated authors', 'eight-day-week' ); + $columns['byline'] = _x( 'Byline', 'Label for multiple, comma separated authors', 'eight-day-week-print-workflow' ); return $columns; } @@ -109,4 +109,4 @@ function get_authors( $post_id ) { } return $authors; -} \ No newline at end of file +} diff --git a/includes/functions/plugins/article-count.php b/includes/functions/plugins/article-count.php index b2b685e..f3befbe 100644 --- a/includes/functions/plugins/article-count.php +++ b/includes/functions/plugins/article-count.php @@ -37,7 +37,7 @@ function ns( $function ) { * @return array modified columns */ function print_issue_cpt_columns( $custom ) { - $custom['num_articles'] = __( '# of Articles', 'eight-day-week' ); + $custom['num_articles'] = __( '# of Articles', 'eight-day-week-print-workflow' ); return $custom; } @@ -122,4 +122,4 @@ function get_num_articles_cache_key( $post_id ) { */ function bust_num_articles_cache( $post_id ) { wp_cache_delete( get_num_articles_cache_key( $post_id ) ); -} \ No newline at end of file +} diff --git a/includes/functions/plugins/article-export.php b/includes/functions/plugins/article-export.php index 11beb39..1018851 100644 --- a/includes/functions/plugins/article-export.php +++ b/includes/functions/plugins/article-export.php @@ -48,9 +48,9 @@ function a( $function ) { function output_article_export_buttons() { ?>
-

- - +

+ +
diff( $now )->format( "%R%a" ); if( ! $not_today ) { - $export_status = sprintf( __( 'Exported on %1$s by %2$s', 'eight-day-week' ), $export_datetime->format( get_option( 'date_format' ) ), $user->display_name ); + $export_status = sprintf( __( 'Exported on %1$s by %2$s', 'eight-day-week-print-workflow' ), $export_datetime->format( get_option( 'date_format' ) ), $user->display_name ); } else { - $export_status = sprintf( __( 'Exported at %1$s by %2$s', 'eight-day-week' ), $export_datetime->format( _x( 'g:ia', 'Format for article export timestamp', 'eight-day-week' ) ), $user->display_name ); + $export_status = sprintf( __( 'Exported at %1$s by %2$s', 'eight-day-week-print-workflow' ), $export_datetime->format( _x( 'g:ia', 'Format for article export timestamp', 'eight-day-week-print-workflow' ) ), $user->display_name ); } return $export_status; @@ -267,7 +267,7 @@ function __construct( $ids, $print_issue_id, $print_issue_title ) { $article_ids = array_filter( $ids, 'is_numeric' ); if ( count( $ids ) !== count( $article_ids ) ) { - throw new \Exception( __( 'Invalid article IDs specified in the request.', 'eight-day-week' ) ); + throw new \Exception( __( 'Invalid article IDs specified in the request.', 'eight-day-week-print-workflow' ) ); } $this->ids = $ids; @@ -941,4 +941,4 @@ function filter_xml_filename_author( $file_name, $article, $xml ) { } return $file_name; -} \ No newline at end of file +} diff --git a/includes/functions/plugins/article-status.php b/includes/functions/plugins/article-status.php index 67a6af9..b6772b8 100644 --- a/includes/functions/plugins/article-status.php +++ b/includes/functions/plugins/article-status.php @@ -34,16 +34,16 @@ function ns( $function ) { */ function register_taxonomy() { $labels = [ - 'name' => __( 'Article Status', 'eight-day-week' ), - 'singular_name' => __( 'Article Statuses', 'eight-day-week' ), - 'all_items' => __( 'Article Statuses', 'eight-day-week' ), - 'edit_item' => __( 'Edit Article Status', 'eight-day-week' ), - 'view_item' => __( 'View Article Status', 'eight-day-week' ), - 'update_item' => __( 'Update Article Status', 'eight-day-week' ), - 'add_new_item' => __( 'Add New Article Status', 'eight-day-week' ), - 'new_item_name' => __( 'New Article Status', 'eight-day-week' ), - 'search_items' => __( 'Search Article Status', 'eight-day-week' ), - 'not_found' => __( 'No Article Statuses found', 'eight-day-week' ), + 'name' => __( 'Article Status', 'eight-day-week-print-workflow' ), + 'singular_name' => __( 'Article Statuses', 'eight-day-week-print-workflow' ), + 'all_items' => __( 'Article Statuses', 'eight-day-week-print-workflow' ), + 'edit_item' => __( 'Edit Article Status', 'eight-day-week-print-workflow' ), + 'view_item' => __( 'View Article Status', 'eight-day-week-print-workflow' ), + 'update_item' => __( 'Update Article Status', 'eight-day-week-print-workflow' ), + 'add_new_item' => __( 'Add New Article Status', 'eight-day-week-print-workflow' ), + 'new_item_name' => __( 'New Article Status', 'eight-day-week-print-workflow' ), + 'search_items' => __( 'Search Article Status', 'eight-day-week-print-workflow' ), + 'not_found' => __( 'No Article Statuses found', 'eight-day-week-print-workflow' ), ]; $args = [ @@ -84,8 +84,8 @@ function admin_menu() { //to determine whether or not the active submenu gets a "current" CSS class. add_submenu_page( EDW_ADMIN_MENU_SLUG, - __( 'Article Statuses', 'eight-day-week' ), - __( 'Article Statuses', 'eight-day-week' ), + __( 'Article Statuses', 'eight-day-week-print-workflow' ), + __( 'Article Statuses', 'eight-day-week-print-workflow' ), 'manage_' . EDW_PRINT_ISSUE_CPT, 'edit-tags.php?taxonomy=' . EDW_ARTICLE_STATUS_TAX . '&post_type=print-issue' ); @@ -99,7 +99,7 @@ function admin_menu() { * @return array Modified columns */ function filter_article_columns_article_status( $columns ) { - $columns['article_status'] = __( 'Article Status', 'eight-day-week' ); + $columns['article_status'] = __( 'Article Status', 'eight-day-week-print-workflow' ); return $columns; } @@ -154,7 +154,7 @@ function output_bulk_article_status_editor() { $statuses = get_indexed_article_statuses(); ?>
-

+

- - + +
__( 'Invalid article IDs specified in the request.', 'eight-day-week' ) ] ); + \Eight_Day_Week\Core\send_json_error( [ 'message' => __( 'Invalid article IDs specified in the request.', 'eight-day-week-print-workflow' ) ] ); } $article_ids = explode( ',', $article_ids ); @@ -212,4 +212,4 @@ function bulk_edit_article_statuses( $status_term_id, $article_ids ) { throw new \Exception( $result->get_error_message() ); } } -} \ No newline at end of file +} diff --git a/includes/functions/plugins/issue-publication.php b/includes/functions/plugins/issue-publication.php index 1c4b39e..54924e8 100644 --- a/includes/functions/plugins/issue-publication.php +++ b/includes/functions/plugins/issue-publication.php @@ -39,18 +39,18 @@ function admin_menu() { */ function register_taxonomy() { $labels = [ - 'name' => __( 'Publications', 'eight-day-week' ), - 'singular_name' => __( 'Publication', 'eight-day-week' ), - 'search_items' => __( 'Search Publications', 'eight-day-week' ), - 'all_items' => __( 'All Publications', 'eight-day-week' ), - 'edit_item' => __( 'Edit Publication', 'eight-day-week' ), - 'update_item' => __( 'Update Publication', 'eight-day-week' ), - 'add_new_item' => __( 'Add New Publication', 'eight-day-week' ), - 'new_item_name' => __( 'New Publication Name', 'eight-day-week' ), - 'menu_name' => __( 'Publication', 'eight-day-week' ), + 'name' => __( 'Publications', 'eight-day-week-print-workflow' ), + 'singular_name' => __( 'Publication', 'eight-day-week-print-workflow' ), + 'search_items' => __( 'Search Publications', 'eight-day-week-print-workflow' ), + 'all_items' => __( 'All Publications', 'eight-day-week-print-workflow' ), + 'edit_item' => __( 'Edit Publication', 'eight-day-week-print-workflow' ), + 'update_item' => __( 'Update Publication', 'eight-day-week-print-workflow' ), + 'add_new_item' => __( 'Add New Publication', 'eight-day-week-print-workflow' ), + 'new_item_name' => __( 'New Publication Name', 'eight-day-week-print-workflow' ), + 'menu_name' => __( 'Publication', 'eight-day-week-print-workflow' ), 'separate_items_with_commas' => '', - 'choose_from_most_used' => __( 'Choose a Publication', 'eight-day-week' ), - 'not_found' => __( 'No Publications found.', 'eight-day-week' ) + 'choose_from_most_used' => __( 'Choose a Publication', 'eight-day-week-print-workflow' ), + 'not_found' => __( 'No Publications found.', 'eight-day-week-print-workflow' ) ]; $args = [ @@ -67,4 +67,4 @@ function register_taxonomy() { ]; \register_taxonomy( 'print_issue_publication', EDW_PRINT_ISSUE_CPT, $args ); -} \ No newline at end of file +} diff --git a/includes/functions/plugins/issue-status.php b/includes/functions/plugins/issue-status.php index 0310aa7..6c08bf5 100644 --- a/includes/functions/plugins/issue-status.php +++ b/includes/functions/plugins/issue-status.php @@ -44,18 +44,18 @@ function a( $function ) { */ function register_taxonomy() { $labels = [ - 'name' => __( 'Issue Statuses', 'eight-day-week' ), - 'singular_name' => __( 'Issue Status', 'eight-day-week' ), - 'search_items' => __( 'Search Issue Statuses', 'eight-day-week' ), - 'all_items' => __( 'All Issue Statuses', 'eight-day-week' ), - 'edit_item' => __( 'Edit Issue Status', 'eight-day-week' ), - 'update_item' => __( 'Update Issue Status', 'eight-day-week' ), - 'add_new_item' => __( 'Add New Issue Status', 'eight-day-week' ), - 'new_item_name' => __( 'New Issue Status Name', 'eight-day-week' ), - 'menu_name' => __( 'Issue Status', 'eight-day-week' ), + 'name' => __( 'Issue Statuses', 'eight-day-week-print-workflow' ), + 'singular_name' => __( 'Issue Status', 'eight-day-week-print-workflow' ), + 'search_items' => __( 'Search Issue Statuses', 'eight-day-week-print-workflow' ), + 'all_items' => __( 'All Issue Statuses', 'eight-day-week-print-workflow' ), + 'edit_item' => __( 'Edit Issue Status', 'eight-day-week-print-workflow' ), + 'update_item' => __( 'Update Issue Status', 'eight-day-week-print-workflow' ), + 'add_new_item' => __( 'Add New Issue Status', 'eight-day-week-print-workflow' ), + 'new_item_name' => __( 'New Issue Status Name', 'eight-day-week-print-workflow' ), + 'menu_name' => __( 'Issue Status', 'eight-day-week-print-workflow' ), 'separate_items_with_commas' => '', - 'choose_from_most_used' => __( 'Choose from an existing Issue Status', 'eight-day-week' ), - 'not_found' => __( 'No Issue Statuses found.', 'eight-day-week' ), + 'choose_from_most_used' => __( 'Choose from an existing Issue Status', 'eight-day-week-print-workflow' ), + 'not_found' => __( 'No Issue Statuses found.', 'eight-day-week-print-workflow' ), ]; $args = [ @@ -92,7 +92,7 @@ function add_issue_status_filters() { $terms = get_terms( $tax_slug, [ 'hide_empty' => false ] ); echo '

- +

@@ -191,17 +191,17 @@ function add_section_output( $post ) { ?>
@@ -314,7 +314,7 @@ public static function create_ajax() { $name = isset( $_POST['name'] ) ? sanitize_text_field( $_POST['name'] ) : false; if ( ! $name ) { - Core\send_json_error( [ 'message' => __( 'Please enter a section name.', 'eight-day-week' ) ] ); + Core\send_json_error( [ 'message' => __( 'Please enter a section name.', 'eight-day-week-print-workflow' ) ] ); } $print_issue_id = absint( $_POST['print_issue_id'] ); @@ -336,7 +336,7 @@ public static function create_ajax() { Core\send_json_success( [ 'section_id' => $section->ID ] ); } - Core\send_json_error( [ 'message' => __( 'Whoops! Something went awry.', 'eight-day-week' ) ] ); + Core\send_json_error( [ 'message' => __( 'Whoops! Something went awry.', 'eight-day-week-print-workflow' ) ] ); } /** @@ -350,12 +350,12 @@ public static function update_title_ajax() { $title = isset( $_POST['title'] ) ? sanitize_text_field( $_POST['title'] ) : false; if ( ! $title ) { - Core\send_json_error( [ 'message' => __( 'Please enter a section name.', 'eight-day-week' ) ] ); + Core\send_json_error( [ 'message' => __( 'Please enter a section name.', 'eight-day-week-print-workflow' ) ] ); } $post_id = isset( $_POST['post_id'] ) ? sanitize_text_field( $_POST['post_id'] ) : false; if ( ! $post_id ) { - Core\send_json_error( [ 'message' => __( 'Whoops! This section appears to be invalid.', 'eight-day-week' ) ] ); + Core\send_json_error( [ 'message' => __( 'Whoops! This section appears to be invalid.', 'eight-day-week-print-workflow' ) ] ); } try { self::update_title( $title, $post_id ); @@ -420,7 +420,7 @@ function __construct( $id ) { private function import_post() { $post = get_post( $this->ID ); if ( ! $post instanceof \WP_Post ) { - throw new \Exception( __( 'Invalid post ID supplied', 'eight-day-week' ) ); + throw new \Exception( __( 'Invalid post ID supplied', 'eight-day-week-print-workflow' ) ); } $this->_post = $post; } @@ -466,7 +466,7 @@ function update( $args ) { if ( $result ) { return $result; } - throw new \Exception( sprintf( __( 'Failed to update section %d', 'eight-day-week' ), $this->ID ) ); + throw new \Exception( sprintf( __( 'Failed to update section %d', 'eight-day-week-print-workflow' ), $this->ID ) ); } /** @@ -478,7 +478,7 @@ function update( $args ) { */ function update_title( $title ) { if ( ! $title ) { - throw new \Exception( __( 'Please supply a valid, non-empty title', 'eight-day-week' ) ); + throw new \Exception( __( 'Please supply a valid, non-empty title', 'eight-day-week-print-workflow' ) ); } $title = sanitize_text_field( $title ); $args = [ @@ -574,5 +574,5 @@ function section_save_button(){ if ( Print_Issue\is_read_only_view() || ! User\current_user_can_edit_print_issue() ) { return; } - echo ''; -} \ No newline at end of file + echo ''; +} diff --git a/includes/functions/taxonomies.php b/includes/functions/taxonomies.php index 24b0d6a..a5189c8 100644 --- a/includes/functions/taxonomies.php +++ b/includes/functions/taxonomies.php @@ -55,7 +55,7 @@ function create_taxonomy_dropdown_metabox( $post, $metabox ) { $terms = (array) get_terms( $taxonomy->name, 'hide_empty=0' ); if( ! $terms ) { - echo '

' . sprintf( esc_html_x( 'No %s created.', 'When no terms are present, i.e. "No publications created."', 'eight-day-week' ), esc_html( $taxonomy->labels->name ) ) . '

'; + echo '

' . sprintf( esc_html_x( 'No %s created.', 'When no terms are present, i.e. "No publications created."', 'eight-day-week-print-workflow' ), esc_html( $taxonomy->labels->name ) ) . '

'; return; } @@ -74,7 +74,7 @@ function create_taxonomy_dropdown_metabox( $post, $metabox ) { // input name $name = $h ? 'tax_input['. $taxonomy->name .'][]' : 'tax_input['. $taxonomy->name .']'; - $default_text = sprintf( _x( 'No %s', 'Provides a select option for choosing "no" term.', 'eight-day-week' ), esc_html( $taxonomy->labels->singular_name ) ); + $default_text = sprintf( _x( 'No %s', 'Provides a select option for choosing "no" term.', 'eight-day-week-print-workflow' ), esc_html( $taxonomy->labels->singular_name ) ); $select = ''; $selected_term = false; @@ -126,4 +126,4 @@ function create_taxonomy_dropdown_metabox( $post, $metabox ) { echo '

' . esc_html( $selected_term ? $selected_term : $default_text ) . '

'; } -} \ No newline at end of file +} diff --git a/includes/functions/user-roles.php b/includes/functions/user-roles.php index 7cc1be3..37771c5 100644 --- a/includes/functions/user-roles.php +++ b/includes/functions/user-roles.php @@ -64,7 +64,7 @@ function add_print_editor_role() { PP\duplicate_role( 'subscriber', 'print_editor', - __( 'Print Editor', 'eight-day-week' ), + __( 'Print Editor', 'eight-day-week-print-workflow' ), get_editor_caps() ); } @@ -107,7 +107,7 @@ function add_print_production_role() { PP\duplicate_role( 'subscriber', 'print_production', - __( 'Eight Day Week', 'eight-day-week' ), + __( 'Eight Day Week', 'eight-day-week-print-workflow' ), get_production_caps() ); } @@ -163,12 +163,12 @@ function editable_roles( $roles ) { */ function output_print_role_on_user_list_table() { global $edw_roles; - + $role_names = get_role_names(); echo '