Skip to content

Show snippet IDs in the editor and expand export options #555

Description

@code-snippets-bot

Summary

Display saved snippet IDs in the editor and expand the available snippet export options.

Current behavior

  • A saved snippet's ID is present in the editor URL, but is not displayed in the editor interface.
  • The All Snippets view can export selected active and inactive snippets.
  • The Trash view only offers Restore and Delete Permanently, so a trashed snippet must be restored before it can be exported.
  • There is no Export All Snippets option that includes active, inactive and trashed snippets together.

Proposed changes

  1. Display the numeric snippet ID within the editor for saved snippets.
  2. Add an Export action for selected snippets in the Trash view.
  3. Add an Export All Snippets option that includes active, inactive and trashed snippets in one export.

Permanently deleted snippets are outside the scope because their database records no longer exist.

Acceptance criteria

  • The editor displays the ID for an existing snippet without relying on the URL.
  • Users can export one or more snippets directly from Trash without restoring them first.
  • Export All Snippets includes active, inactive and trashed snippets.
  • Exporting does not restore, activate, deactivate or otherwise modify a snippet.
  • Existing export formats remain import-compatible.
  • Existing capability, nonce and multisite/network checks remain enforced.

User request

https://wordpress.org/support/topic/add-inside-snippets-export-deleted/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions