Request for two plug-ins
We would like to request two plug-ins that will allow us to develop a child theme for our site without directly editing the functions.php file:
Code Snippets: https://wordpress.org/plugins/code-snippets/
Code Snippets Extended: https://wordpress.org/plugins/code-snippets-extended/
We have tested these on our development server and have found that they have the functionality that we need.
#1 Updated by Boone Gorges about 6 years ago
- Status changed from New to Reporter Feedback
- Target version set to Not tracked
Hi Gina - I'm afraid I can't allow these plugins on the Commons. They allow anyone to run arbitrary PHP code on the server, which is a significant risk to site security and stability.
Are there specific bits of functionality that you're looking to implement? Maybe we can help you get them up and running.
#2 Updated by Boone Gorges about 6 years ago
- File functions.php functions.php added
- Category name set to WordPress Themes
- Assignee set to Boone Gorges
- Target version changed from Not tracked to 1.8.13
Attaching the requested functionality for posterity. I can add it somewhere - with a few modifications, like a `function_exists()` wrapper on a couple of functions.
Can I get some clarification on where you want these to live? I can put them in your theme's functions.php, though it'll mean (a) that you will have to switch to a custom child theme of Canvas (I'm not sure how smooth that transition will be - I can't remember if Woo saves its settings in a way that makes them portable), and (b) the mods will be linked to the theme.
Another option is that I can put them into a custom plugin, to be activated only on acert.commons.gc.cuny.edu (and whatever other sites you tell me you'd like it whitelisted for). This is probably a more flexible option. If it's what you want to do, please let me know.
#4 Updated by Gina Cherry about 6 years ago
Well, I have no experience with this, so I will rely on the expertise of the two of you. Would either approach be easier to update? The code that David sent you is part of the customization we would like to do, and it's functionality that we need sooner rather than later, but we will be adding a bit more to it in the coming months...
#5 Updated by Boone Gorges about 6 years ago
In https://github.com/cuny-academic-commons/cac/commit/60e5eb37eb3769092db4af6a62f3af40aef3d834, I added the custom plugin, and whitelisted it for acert, acertdev, and acertdev2. The plugin, called "ACERT Custom", will be available to activate on those sites (and only those sites) after tonight's release.
I've attached a tarball called cac-acert-custom.tar that contains the plugin. Note that, for each function, I've either wrapped it in function_exists() or given it the prefix 'cac_acert_'. I did the former in cases where it appeared that you were copying functionality that might appear in another theme/plugin, and the latter when it looked like you'd put together some code from StackOverflow examples, etc. For future enhancements, please use this plugin as a base for development, and please open new tickets where you attach the modifications. Thanks!