{"id":153662,"date":"2022-02-18T21:04:33","date_gmt":"2022-02-18T21:04:33","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/custom-code-keeper\/"},"modified":"2025-01-23T20:08:14","modified_gmt":"2025-01-23T20:08:14","slug":"custom-code-keeper","status":"publish","type":"plugin","link":"https:\/\/hat.wordpress.org\/plugins\/custom-code-keeper\/","author":10063352,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"3.1","stable_tag":"3.1","tested":"6.7.5","requires":"5.6","requires_php":"7.4","requires_plugins":null,"header_name":"Gravity PHP Code Keeper","header_author":"Orbital Forge","header_description":"Provides a reliable and consistent way to store and load custom form-related code on your site.","assets_banners_color":"2c3639","last_updated":"2025-01-23 20:08:14","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/typewheel.xyz\/give\/?via=GH-CCK","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/custom-code-keeper","header_author_uri":"https:\/\/gravityhopper.com\/","rating":0,"author_block_rating":0,"active_installs":20,"downloads":2746,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","faq","changelog"],"tags":{"2.2.2":{"tag":"2.2.2","author":"UaMV","date":"2022-02-18 21:04:08"},"2.3":{"tag":"2.3","author":"UaMV","date":"2022-03-08 23:13:47"},"2.3.1":{"tag":"2.3.1","author":"UaMV","date":"2022-11-10 19:51:38"},"3.0":{"tag":"3.0","author":"UaMV","date":"2024-06-19 22:16:07"},"3.1":{"tag":"3.1","author":"UaMV","date":"2025-01-23 20:08:14"}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3227705,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3227705,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":2681608,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":2681608,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["2.2.2","2.3","2.3.1","3.0","3.1"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1214,2275,2695,662],"plugin_category":[42],"plugin_contributors":[84143],"plugin_business_model":[],"class_list":["post-153662","plugin","type-plugin","status-publish","hentry","plugin_tags-code","plugin_tags-developer","plugin_tags-gravity","plugin_tags-php","plugin_category-contact-forms","plugin_contributors-uamv","plugin_committers-uamv"],"banners":{"banner":"https:\/\/ps.w.org\/custom-code-keeper\/assets\/banner-772x250.png?rev=2681608","banner_2x":"https:\/\/ps.w.org\/custom-code-keeper\/assets\/banner-1544x500.png?rev=2681608","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/custom-code-keeper\/assets\/icon-128x128.png?rev=3227705","icon_2x":"https:\/\/ps.w.org\/custom-code-keeper\/assets\/icon-256x256.png?rev=3227705","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<h4>How does it work?<\/h4>\n\n<p>PHP Code Keeper for Gravity Forms\u2026<\/p>\n\n<ul>\n<li>creates a directory at <code>wp-content\/uploads\/gravity_hopper\/code\/<\/code>.<\/li>\n<li>adds a file <code>gf-global-code.php<\/code> <em>(for housing globally run code)<\/em>.<\/li>\n<li>optionally creates\/duplicates\/deletes a <code>gf-00xx.php<\/code> file for every form created\/duplicated\/deleted. <em>(for housing form-specific code)<\/em><\/li>\n<li>will load all files in the code directory associated with an existing form or having prefix that has been explicitly allowed.<\/li>\n<li>allows exporting any number of code files to compressed .zip.<\/li>\n<li>introduces pages in the Gravity Forms interface whereby you can manage custom PHP code.<\/li>\n<\/ul>\n\n<p><strong>Code Keeper does not restrict when specific files are included on the site. All code from allowed files residing in the <code>gravity_hopper\/code\/<\/code> directory will run for all forms. Always use appropriate hooks and\/or conditional checks when targeting specific forms and fields.<\/strong><\/p>\n\n<h4>Why use it?<\/h4>\n\n<p>PHP Code Keeper provides orderliness to your code customizations, gives you a better sense of the specific code running across your site, and helps ensure your customizations are not lost when other site modifications are made.<\/p>\n\n<p>Learn more in the walk-through article <em><a href=\"https:\/\/orbitalforge.com\/custom-code-keeper-for-gravity-forms\/\">What is PHP Code Keeper for Gravity Forms?<\/a><\/em><\/p>\n\n<h4>Need more for your Gravity Forms development?<\/h4>\n\n<p>Saving you time and effort with every form you build, <strong><a href=\"https:\/\/orbitalforge.com\">Orbital Forge<\/a><\/strong> offers an elite array of builder tools that integrates seamlessly with Gravity Forms.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id='does%20php%20code%20keeper%20load%20custom%20code%20per%20form%3F'><h3>Does PHP Code Keeper load custom code per form?<\/h3><\/dt>\n<dd><p>No. This plugin is intended for code wrangling only and does not restrict when code is run. All code from allowed files residing in the <code>gravity_hopper\/code\/<\/code> directory will run for all forms. Always use appropriate hooks and\/or conditional checks when targeting specific forms and fields.<\/p><\/dd>\n<dt id='can%20i%20edit%20the%20custom%20code%20from%20within%20my%20wordpress%20dashboard%3F'><h3>Can I edit the custom code from within my WordPress dashboard?<\/h3><\/dt>\n<dd><p>Yes! Create, edit, and delete files via <strong>Forms \u2192 Code<\/strong> and <strong>Form \u2192 Settings \u2192 Code Keep<\/strong><\/p>\n\n<p>You can also add a link to open the files directly in your preferred code editor using the filter <code>gravityhopper-cck\/opoen_file_uri<\/code>.<\/p>\n\n<pre><code>`\n<\/code><\/pre>\n\n<p>add_filter( 'gravityhopper-cck\/open_file_uri', function( $uri, $filename ) {\n    return array(\n        'app'       =&gt; 'VS Code',\n        'protocol'  =&gt; 'vscode:\/',\n        'path'      =&gt; $filename\n    );\n}, 10, 2 );\n    `<\/p><\/dd>\n<dt id='how%20are%20files%20loaded%3F'><h3>How are files loaded?<\/h3><\/dt>\n<dd><p>Allowed files within the directory <code>gravity_hopper\/code\/<\/code> of your uploads directory will be loaded.<\/p>\n\n<p>The file <code>gf-global-code.php<\/code> will always be loaded and will be loaded before other files.<\/p>\n\n<p>Any files matching prefix patterns allowed via the filter <code>gravityhopper-cck\/allowed_file_prefixes<\/code> will be loaded in the order they appear in that filtered array.<\/p>\n\n<p>Finally, any form-specific files named using the convention <code>gform-00xx.php<\/code> will be loaded next, provided a form matching the ID exists on the site.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>3.1 \/\/ 2025.01-Jan.23<\/h4>\n\n<p>\ud83d\udce6 NEW: Adds <code>gravityhopper-cck\/open_file_uri<\/code> filter\n\ud83d\udcd6 DOC: Rebrands authorship to Orbital Forge<\/p>\n\n<h4>3.0.1 \/\/ 2024.11-Nov.01<\/h4>\n\n<p>\u2728 IMPROVE: Remove unnecessary logging\n\u2728 IMPROVE: Adjust height of editor to ensure visibility of last line<\/p>\n\n<h4>3.0 \/\/ 2024.06-Jun.19<\/h4>\n\n<p>\ud83d\udce6 NEW: Allows file editing and management via UI\n\ud83d\udce6 NEW: Adds integration with Gravity Hopper: Keyboard Shortcut module<\/p>\n\n<h4>2.3.1 \/\/ 2022.11-Nov.10<\/h4>\n\n<p>\u2728 IMPROVE: Performance in checking files to load\n\ud83d\udcd6 DOC: Tested up to 6.1<\/p>\n\n<h4>2.3 \/\/ 2022.03-Mar.08<\/h4>\n\n<p>\ud83d\udc1b FIX: Load on <code>init<\/code> rather than <code>gform_loaded<\/code> to prevent form breakage\n\u2728 IMPROVE: Consolidates multiple calls to GFAPI::get_forms()\n\u2728 IMPROVE: Adds more details to system report\n\ud83d\udcd6 DOC: Simplifies readme file<\/p>\n\n<h4>2.2.2 \/\/ 2022.02-Feb.18<\/h4>\n\n<p>\ud83d\ude80 RELEASE: renaming the plugin<\/p>\n\n<h4>2.2.1 \/\/ 2022.02-Feb.15<\/h4>\n\n<p>\ud83d\udcd6 DOC: formats readme file<\/p>\n\n<h4>2.2 \/\/ 2022.02-Feb.15<\/h4>\n\n<p>\ud83d\ude80 RELEASE: Initial public launch<\/p>","raw_excerpt":"Provides a reliable and consistent way to create, store, edit, and load custom form-related PHP code on your site.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/153662","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=153662"}],"author":[{"embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/uamv"}],"wp:attachment":[{"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=153662"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=153662"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=153662"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=153662"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=153662"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/hat.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=153662"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}