# WPCE > Developer Manual A modular content editor for your WordPress website. ## Table of Contents #### Concepts - [Introduction — Why WPCE?](/documentation/concepts/introduction.md): Explain WPCE's developer-focused content-editor model for professional WordPress sites and its headless-CMS-inspired approach. - [Glossary](/documentation/concepts/glossary.md): Definitions of core WPCE terms including documents, elements, input types, instance managers, and WPCE developers. - [Input Types ](/documentation/concepts/input-types.md): Overview of WPCE's input type system, including registration, useInputType rendering, and property layout configuration. ##### Elements - [Defining Elements](/documentation/concepts/elements/definition.md): Reference for element definitions, covering IDs, labels, icons, groups, properties, dialogs, restrictions, inheritance, and masks. - [Register an Element Definition](/documentation/concepts/elements/registration.md): Register WPCE element definitions during wpce_instance_added by mounting them through editor.definition.mountElement(). - [Validate an Element ](/documentation/concepts/elements/validation.md): Add element-level validation with setValidationHandler() for rules that span multiple properties. - [Render an Element Preview](/documentation/concepts/elements/preview.md): Customize element previews in the editor with setPreviewHandler() or setElementNodeRenderer(). - [Inheritance and Masking](/documentation/concepts/elements/inheritance-and-masking.md): Extend element definitions through multilevel inheritance, with property overwriting and masking for specialized variants. - [Element Groups](/documentation/concepts/elements/groups.md): Configure element groups to control which elements can be inserted into containers, including conditional and inherited groups. - [Restrictions ](/documentation/concepts/elements/restrictions.md): Control element interactions with restrictions such as pinning, removal, hiding, copying, and dragging in or out. - [Writing Element Templates](/documentation/concepts/elements/templates.md): Render WPCE elements through the wpce_render_{element_id} filter, which receives the editor instance and element data. #### Built-in Input Types - [Text Input](/documentation/input-types/text.md): Configure single-line text inputs with pattern validation, length limits, and suggestion lists. - [Textarea Input](/documentation/input-types/textarea.md): Configure multiline text inputs with monospace rendering, pattern and length validation, and visibility conditions. - [Visual Text Input](/documentation/input-types/visualtext.md): Configure a WYSIWYG rich-text input with length validation and conditional visibility. - [Number Input ](/documentation/input-types/number.md): Configure numeric inputs with minimum, maximum, and step validation plus comparison-based visibility conditions. - [Date and Time Input](/documentation/input-types/datetime.md): Configure date and time inputs for date, time, datetime-local, month, or week values with minimum and maximum constraints. - [File Input](/documentation/input-types/file.md): Configure file attachment inputs with multiple selection, MIME-type restrictions, and list or grid presentation. - [Image Input](/documentation/input-types/image.md): Configure image picker inputs with multiple selection, dimensions, image sizes, and list or grid presentation. - [Link Input](/documentation/input-types/link.md): Use a hybrid link input for post relations or free text, with optional labels, new-tab targets, and mode switching. - [Select Input](/documentation/input-types/select.md): Configure dropdown select inputs with option arrays and isEmpty or equals conditions for visibility. - [Radio Input ](/documentation/input-types/radio.md): Configure single-choice radio inputs with options, descriptions, orientation, and isEmpty or equals conditions. - [Color Input](/documentation/input-types/color.md): Configure color inputs with predefined colors or a picker, regex filtering, dropdown or inline display, and wpce_get_color(). - [Repeater Input](/documentation/input-types/repeater.md): Configure repeatable arrays of sub-items with custom labels, collapsing, renaming, and minimum or maximum item counts. - [Relation Input](/documentation/input-types/relation.md): Configure REST-backed post or taxonomy relation inputs with filtering, multiple selection, and duplicate prevention. - [Menu Input ](/documentation/input-types/menu.md): Configure menu reference inputs with optional multiple selection and duplicate prevention. - [Post Input ](/documentation/input-types/post.md): Reference posts with the post input type, a simpler and faster alternative to relation inputs that needs no REST exposure. - [Term Input ](/documentation/input-types/term.md): Reference taxonomy terms with a searchable input, optional multiple selection, and taxonomy filtering. - [Editor Input](/documentation/input-types/editor.md): Embed a complete WPCE editor as an input property, including definition merging and get_inner_html() template usage. - [Checkboxes Input](/documentation/input-types/checkboxes.md): Configure multi-value checkbox inputs with options, orientation, and isEmpty or hasChecked visibility conditions. - [Column Layout Input](/documentation/input-types/columnlayout.md): Configure responsive column layouts with viewports, fixed or variable columns, order reversal, and isolated value storage. - [Table Input](/documentation/input-types/table.md): Configure two-dimensional table inputs with text, textarea, or visualtext cells and fixed or variable dimensions. ##### ⚠️ Experimental - [Spacing](/documentation/input-types/experimental/spacing.md): Experimental spacing input for margin and padding properties, with shorthand aliases such as m, mt, p, and pl. #### Actions - [`wpce_setup` ](/hooks/actions/wpce-setup.md): Action fired after WPCE initializes during WordPress init, intended for backend setup. - [`wpce_editor_setup` ](/hooks/actions/wpce-editor-setup.md): Action fired after the WPCE backend instance initializes during admin_init for editor-specific setup. - [`wpce_editor_styles` ](/hooks/actions/wpce-editor-styles.md): Action for enqueueing additional stylesheets that customize the WPCE editor. - [`wpce_edit_screen` ](/hooks/actions/wpce-edit-screen.md): Action fired immediately before rendering the WPCE editor for a post in the WordPress admin. - [`wpce_before_prerender` ](/hooks/actions/wpce-before-prerender.md): Action fired before document prerendering after save, allowing early preparation of prerendered content. - [`wpce_after_prerender` ](/hooks/actions/wpce-after-prerender.md): Action fired after document prerendering, with access to the prerendered content and document. - [`wpce_before_save` ](/hooks/actions/wpce-before-save.md): Action fired before a WPCE document is saved, receiving the post and document and also running for revisions and previews. - [`wpce_after_save` ](/hooks/actions/wpce-after-save.md): Action fired after a WPCE document is saved, receiving the post and document and also running for revisions and previews. - [`wpce_after_document_load` ](/hooks/actions/wpce-after-document-load.md): Action fired after a WPCE Document instance has been created from stored document data. - [`wpce_after_document_from_post` ](/hooks/actions/wpce-after-document-from-post.md): Action fired after Document::from_post() creates a WPCE document instance from a WordPress post. - [`wpce_load_node` ](/hooks/actions/wpce-load-node.md): Action fired for each node while loading a document, useful for filtering or removing hidden nodes. - [`wpce_save_node` ](/hooks/actions/wpce-save-node.md): Action fired for each cloned node before document save, useful for node-level side effects and cleanup. #### Filters - [`wpce_enable_if` ](/hooks/filters/wpce-enable-if.md): Deprecated legacy filter for enabling WPCE on admin screens, replaced by the post-type and post-specific filters. - [`wpce_enable_for_post_types` ](/hooks/filters/wpce-enable-for-post-types.md): Filter the post types for which WPCE is enabled globally. - [`wpce_enable_for_post` ](/hooks/filters/wpce-enable-for-post.md): Filter whether WPCE is enabled for an individual post. - [`wpce_enable_individual_node_endpoints` ](/hooks/filters/wpce-enable-individual-node-endpoints.md): Enable REST endpoints for individual document nodes, which are disabled by default for privacy. - [`wpce_edit_link_label` ](/hooks/filters/wpce-edit-link-label.md): Customize the label used by edit links to the WPCE editor in settings and post row actions. - [`wpce_before_edit_screen` ](/hooks/filters/wpce-before-edit-screen.md): Filter the post object before displaying its WPCE edit screen in the WordPress admin. - [`wpce_edit_screen_error` ](/hooks/filters/wpce-edit-screen-error.md): Provide a custom error message instead of the WPCE editor when edit-screen validation fails. - [`wpce_relation_list_posts` ](/hooks/filters/wpce-relation-list-posts.md): Filter the posts returned by WPCE relation and post input searches. - [`wpce_relation_list_terms` ](/hooks/filters/wpce-relation-list-terms.md): Filter the terms returned by WPCE relation and term input searches. - [`wpce_colors` ](/hooks/filters/wpce-colors.md): Define the colors available to WPCE color inputs with IDs, labels, hex values, and optional alpha values. - [`wpce_default_document` ](/hooks/filters/wpce-default-document.md): Filter the default document tree used when a new post is created. - [`wpce_before_document_load` ](/hooks/filters/wpce-before-document-load.md): Filter the document tree object before it is loaded into a WPCE Document instance. - [`wpce_before_document_from_post` ](/hooks/filters/wpce-before-document-from-post.md): Filter the post reference before Document::from_post() creates a WPCE document. - [`wpce_before_document_from_json` ](/hooks/filters/wpce-before-document-from-json.md): Filter the JSON string before Document::from_json() creates a WPCE document. - [`wpce_before_document_from_rest_request` ](/hooks/filters/wpce-before-document-from-rest-request.md): Filter a REST request before WPCE creates a Document from it. - [`wpce_before_document_from_save_request_body` ](/hooks/filters/wpce-before-document-from-save-request-body.md): Filter the save-request JSON body before WPCE creates a document from a frontend save. - [`wpce_asset_handle` ](/hooks/filters/wpce-asset-handle.md): Filter the script and stylesheet asset handles that WPCE automatically enqueues when elements appear on a page. - [`wpce_render_{$id}` ](/hooks/filters/wpce-render.md): Documents the legacy or incomplete rendering filter pattern and points toward element-specific wpce_render_{element_id} filters. - [`wpce_render_individual_node` ](/hooks/filters/wpce-render-individual-node.md): Filter the rendered content of nodes requested through individual REST rendering endpoints. - [`wpce_prerender` ](/hooks/filters/wpce-prerender.md): Filter prerendered content before it is stored after a WPCE document is saved. - [`wpce_instance_manager_options` ](/hooks/filters/wpce-instance-manager-options.md): Modify instance-manager configuration, including the user's developer status and other WPCE options. - [`wpce_is_developer` ](/hooks/filters/wpce-is-developer.md): Filter whether a user is treated as a WPCE developer and can access developer-only features. - [`wpce_show_developer_profile_field` ](/hooks/filters/wpce-show-developer-profile-field.md): Control whether user profiles show the Make this user a WPCE developer checkbox. #### Cookbook Recipes A-Z - [Custom Input Type Example](/cookbook/custom-input-type-example.md): Build a custom WPCE radio-button input type as a Vue component using the composition API and useInputType composable. - [Set a Default Document Tree ](/cookbook/default-document.md): Set the default WPCE document tree for newly created posts with the wpce_default_document filter. - [Disable the Edit Dialog](/cookbook/disable-edit-dialog.md): Disable the edit dialog for an element by setting dialog to false in its definition. - [Enable the Editor](/cookbook/enable-editor.md): Enable WPCE for selected post types or individual templates using the wpce_enable_for_post_types and wpce_enable_for_post filters. - [Expose Post Types and Taxonomies in the REST API](/cookbook/expose-in-rest.md): Expose custom post types and taxonomies through the REST API while keeping relation inputs compatible with WPCE helpers. - [Migrate to Another Domain](/cookbook/migrate-domains.md): Migrate WPCE content between domains by updating URLs embedded in base64-encoded document metadata with SQL. - [Modify Relation Data](/cookbook/modify-relation-data.md): Customize relation input data per REST request using the x-wpce-element-id and x-wpce-property-id headers. - [Override Color Preview](/cookbook/color-preview.md): Customize color input preview backgrounds with WPCE CSS custom properties, including previews for gradients and other complex values. - [Modify an Element after Creation ](/cookbook/modify-after-creation.md): Modify element properties immediately after creation in the editor by listening to the wpce_before_insert_node event. - [Per-Element Custom CSS ](/cookbook/custom-css.md): Enable per-element custom CSS with the allowCustomCss definition option, data-css-locator attributes, and developer settings. - [Rename Elements in the Database](/cookbook/rename-elements.md): Rename element definitions across stored WPCE documents by replacing quoted IDs inside base64-encoded database data. - [Common Templating Scenarios](/cookbook/templating-tips.md): Use WPCE PHP helpers such as wpce_serialize_attrs(), wpce_serialize_style(), and get_element_html() when rendering templates. - [Querying Elements in Document](/cookbook/querying-elements-in-document.md): Query WPCE document structures server-side with WPCE\Document::from_post() and property-query helper methods. - [Cache Computationally Expensive Work in Templates ](/cookbook/cache-in-templates.md): Cache expensive element-template computations with WordPress transients and invalidate them through the wpce_save_node action. - [Troubleshooting](/cookbook/troubleshooting.md): Troubleshoot elements missing from the WPCE add dialog by checking that their required groups option is configured. #### Release Notes - [WPCE 3.29.\*](/releases/3.29.md): WPCE 3.29 release notes covering default-value upgrades, value-based columnlayout storage, and isolation options. - [WPCE 3.28](/releases/3.28.0.md): WPCE 3.28 release notes covering new number and term inputs, input-type API improvements, layout and type-safety changes, and the PHP 8.0 requirement. ### Other - [Cookbook](/cookbook.md): Practical recipes for configuring, extending, querying, rendering, and troubleshooting WPCE in WordPress projects. - [Custom Input Types (Legacy) ](/cookbook/custom-input-types-legacy.md): Deprecated pre-3.28 patterns for implementing custom WPCE input types with the Vue Options API and AbstractInputComponent. - [Hooks](/hooks.md): Index of WPCE actions and filters available for integrating and extending the plugin from WordPress code. - [Release Notes](/releases.md): Index of WPCE release notes covering versions 3.28 and later.