Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Only variables should be passed by reference #369

Merged
merged 6 commits into from
Feb 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions includes/admin/class-bc-admin-labels-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public function __construct() {
* Renders html of the edit labels page
*/
public function render_edit_label_page() {
$label_name = isset( $_GET['update_label'] ) ? $_GET['update_label'] : ''; // phpcs:ignore WordPress.Security.NonceVerification
?>
<div class="wrap">
<h2>
Expand All @@ -46,13 +47,13 @@ public function render_edit_label_page() {
<form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" class="validate">
<?php wp_nonce_field( 'brightcove-edit-label', 'brightcove-edit-label-nonce' ); ?>
<input type="hidden" name="action" value="brightcove-edit-label">
<input type="hidden" name="label-path" value="<?php echo ! empty( $_GET['update_label'] ) ? esc_attr( $_GET['update_label'] ) : ''; // phpcs:ignore ?>">
<input type="hidden" name="label-path" value="<?php echo esc_attr( $label_name ); ?>">
<table class="form-table">
<tbody>
<tr class="form-field form-required term-name-wrap">
<th scope="row"><label for="name">Label</label></th>
<th scope="row"><label for="name"><?php esc_html_e( 'Label', 'brightcove' ); ?></label></th>
<td>
<input name="label-update" id="name" type="text" value="<?php echo esc_attr( end( array_filter( explode( '/', $_GET['update_label'] ) ) ) ); ?>" size="40" aria-required="true"> <?php // phpcs:ignore WordPress.Security.NonceVerification ?>
<input name="label-update" id="name" type="text" value="<?php echo esc_attr( basename( trim( $label_name, '/' ) ) ); ?>" size="40" aria-required="true">
<p class="description"><?php esc_html_e( 'Enter the new label name.', 'brightcove' ); ?></p>
</td>
</tr>
Expand Down
Loading