{"id":17144173,"url":"https://github.com/harryfinn/preview-custom-fields-wp-plugin","last_synced_at":"2025-10-30T19:17:49.625Z","repository":{"id":139564482,"uuid":"59216644","full_name":"harryfinn/preview-custom-fields-wp-plugin","owner":"harryfinn","description":"Preview custom fields WordPress Plugin","archived":false,"fork":false,"pushed_at":"2016-05-20T16:14:12.000Z","size":4,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-29T15:35:27.105Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harryfinn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-19T14:57:43.000Z","updated_at":"2016-12-28T00:14:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"fbeb980f-aae9-4e56-8103-4a94d690c16b","html_url":"https://github.com/harryfinn/preview-custom-fields-wp-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harryfinn%2Fpreview-custom-fields-wp-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harryfinn%2Fpreview-custom-fields-wp-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harryfinn%2Fpreview-custom-fields-wp-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harryfinn%2Fpreview-custom-fields-wp-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harryfinn","download_url":"https://codeload.github.com/harryfinn/preview-custom-fields-wp-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245249230,"owners_count":20584497,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T20:43:16.123Z","updated_at":"2025-10-30T19:17:44.593Z","avatar_url":"https://github.com/harryfinn.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Preview custom fields WordPress Plugin\n\n## About this plugin\n\nThis plugin adds support for a missing piece of WordPress functionality\nregarding the previewing of post types with custom meta fields.\n\nBy default, the WordPress CMS only stores revisions and preview data for the\nprimary title (`post_name`) and content (`post_content`) fields. Meta fields are\nnot included which results in inconsistencies when attempting to view a preview\nversion of a post type item.\n\nThis plugin hooks into the points at which a valid preview revision is made and\nenforces the saving of all associated custom fields for the item being\npreviewed.\n\n## Installing\n\nTo install, simply download a `.zip` version of this repository and upload to\nyour WordPress instance via the Admin screens,\n`Plugins -\u003e Add New -\u003e Upload Plugin`. Finally, active the plugin.\n\n## Usage\n\nEvery time a post item is previewed, this plugin will loop through an array of\ncustom field meta keys and ensure they are saved correctly against the revision\nor autosave for the current item.\n\nIn order to add fields to this process you will need to use the following\nclass function:\n\n```PHP\nPreviewCustomFields::add_meta_keys([\n  '_cmb2_page_author_name',\n  '_cmb2_page_author_age'\n]);\n```\n\nThe code above adds the two example custom fields `_cmb2_page_author_name` and\n`_cmb2_page_author_age` fields. You can call this method as many times as\nrequired or all at once.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharryfinn%2Fpreview-custom-fields-wp-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharryfinn%2Fpreview-custom-fields-wp-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharryfinn%2Fpreview-custom-fields-wp-plugin/lists"}