---
url: /hooks/filters/wpce-render.md
description: >-
  Documents the legacy or incomplete rendering filter pattern and points toward
  element-specific wpce_render_{element_id} filters.
---

# `wpce_render_{$id}`&#x20;

Filters the rendered content of all elements with the ID `$id`.

:::warning
This hook is from a very early WPCE version and is not properly implemented as a WordPress filter.

That means: It receives the WPCE instance as its first parameter, but returns the rendered content as a string. Therefore it is not designed to have multiple filters attached to it.
:::

## Parameters

1. `WPCE $wpce`

   The [`WPCE`](https://bitbucket.org/ownbit/ownbit-wpce/src/dev/plugin/includes/WPCE.php) instance.

2. `object $element`

   The element being rendered.

## Example

```php
// Declare how to render 'text' elements
add_filter('wpce_render_text', function (WPCE $wpce, $element) {
	return <<<HTML
		{$element->properties->text}
		HTML;
}, 10, 2);
```

## Related

* [`wpce_prerender`](./wpce-prerender)
