WordPress / WordPress/performance
Plugin Proposal: Manage inserting of Code Snippets
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 461
- Forks
- 165
- Avg merge
- 11h 12m
- Merged PRs (30d)
- 28
Description
Overview
- Proposed plugin name: Code Snippets
- Proposed plugin slug: code-snippets
- Proposed plugin owner GitHub username(s): pbearne
About the plugin
Purpose
Create admin settings to allow management of Code Snippets so WP can control where and how they are added to rendered HTML.
Scope
Adds a WP settings page that enables adding/selecting of script blocks and allows the options to be managed
Rationale
There are lots of instructions ( GTM Code Snippets) on the web to add script blocks and sometimes HTML, and these are added to the header in an uncontrolled way or require a plugin.
Other
We create a location to paste the snippet, then parse it (store it as a CPT) to create settings that control how it is loaded/adjusted.
We also allow a JSON block to be pasted in as well to create the settings with options for the scripts that allow
Part of the settings control where the snippets are added to the page and or bundled into larger or external files
We just call the CPT with a meta query in the header/content/footer to insert as needed
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by reviewing the existing settings-page, custom post type, and header/content/footer insertion architecture before narrowing the proposal into implementable work. Done should include managed code snippets, selectable placement, and controlled loading or bundling as specified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, content
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100