# friends/2.8.8/templates/admin/edit-raw-rules.php

Friends, version 2.8.8. 43 lines.

- Page: https://pluginprobe.com/plugins/friends/2.8.8/code/templates/admin/edit-raw-rules.php
- Raw: https://pluginprobe.com/plugins/friends/2.8.8/raw/templates/admin/edit-raw-rules.php
- Modified: 2023-06-23T16:15:54+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/friends/2.8.8/code/templates/admin/edit-raw-rules.php#L10-L20`.

```php
<?php
/**
 * This template contains the raw rules editor.
 *
 * @version 1.0
 * @package Friends
 */

?>
<p class="description">
<?php
echo wp_kses(
	// translators: %s is a URL.
	sprintf( __( 'To allow copying rules between friends, <a href=%s>view the raw rules data</a>.', 'friends' ), '"#" id="toggle-raw-rules-data"' ),
	array(
		'a' => array(
			'href' => array(),
			'id'   => array(),
		),
	)
);
?>
</p>
<div id="raw-rules-data" style="display: none">
	<h2><?php esc_html_e( 'Raw Rules Data', 'friends' ); ?></h2>
	<form method="post">
		<?php wp_nonce_field( 'friend-rules-raw-' . $args['friend']->user_login ); ?>
		<table>
			<tbody>
				<tr>
					<th><label for="field"><?php esc_html_e( 'Rules as JSON', 'friends' ); ?></label></th>
					<td>
						<textarea name="rules" style="font-family: monospace" rows="5" cols="80"><?php echo esc_html( json_encode( $args['rules'], JSON_PRETTY_PRINT ) ); ?></textarea>
					</td>
				</tr>
			</tbody>
		</table>
		<p class="submit">
			<input type="submit" name="friend-rules-raw" class="button button-primary" value="<?php /* phpcs:ignore WordPress.WP.I18n.MissingArgDomain */ esc_html_e( 'Save Changes' ); ?>">
		</p>
	</form>
</div>

```
