if (!defined('ABSPATH')) { exit; } $user_catalog_form_url = wp_nonce_url(get_bloginfo('url') . '/wp-admin/index.php?page=pb_catalog', 'pb-user-catalog'); echo '<div class="wrap">'; if ('edit_tags' == $_REQUEST['action']) { // TODO: Move logic out of the template @(list($user_id, $blog_id) = explode(':', @$_REQUEST['ID'])); $user_id = absint($user_id); $blog_id = absint($blog_id); if (!$user_id || !current_user_can('edit_user', $user_id)) { wp_die(__('You do not have permission to do that.', 'pressbooks')); } $catalog = new \PressBooks\Catalog($user_id); $book = $catalog->getBook($blog_id); $profile = $catalog->getProfile(); ?> <h2><?php _e('Tags For', 'pressbooks'); echo ' ' . get_blog_option($blog_id, 'blogname'); ?> </h2> <form method="post" action="<?php echo $user_catalog_form_url; ?> " > <input type="hidden" name="action" value="edit_tags" /> <input type="hidden" name="ID" value="<?php echo "{$user_id}:{$blog_id}";