public static function display_backend() { $items = self::get_items(); ?> <fieldset> <legend><i class="fa fa-fw fa-flag"></i> <?php echo ___('Report settings'); ?> </legend> <p class="description"><?php echo ___('Vistors can report to you as comment if some problems with post. Here are some keywords to use (only available in comment).'); ?> </p> <input type="text" class="small-text text-select" value="%post_link%" title="<?php echo ___('Post link'); ?> " readonly> <input type="text" class="small-text text-select" value="%post_id%" title="<?php echo ___('Post ID'); ?> " readonly> <input type="text" class="small-text text-select" value="%report_name%" title="<?php echo ___('Report name'); ?> " readonly> <table class="form-table"> <tbody> <tr> <th><label for="<?php echo __CLASS__; ?> -enabled"><?php echo ___('Enable or not?'); ?> </label></th> <td> <select name="<?php echo __CLASS__; ?> [enabled]" id="<?php echo __CLASS__; ?> -enabled" class="widefat"> <?php the_option_list(-1, ___('Disable'), self::get_options('enabled')); ?> <?php the_option_list(1, ___('Enable'), self::get_options('enabled')); ?> </select> </td> </tr> <tr> <th><label for="<?php echo __CLASS__; ?> -page"><?php echo ___('The page of report collection'); ?> </label></th> <td> <?php theme_features::page_option_list(__CLASS__, 'page'); ?> </td> </tr> <tr> <th><label for="<?php echo __CLASS__; ?> -export-text"><?php echo ___('Export text'); ?> </label></th> <td> <input type="text" name="<?php echo __CLASS__; ?> [export-text]" id="<?php echo __CLASS__; ?> -export-text" value="<?php echo esc_attr(self::get_options('export-text')); ?> " placeholder="<?php echo ___('The link export text'); ?> " class="widefat"> </td> </tr> </tbody> </table> <div id="<?php echo __CLASS__; ?> -container" data-tpl="<?php echo esc_attr(self::get_tpl_backend()); ?> " hidden> <?php if ($items) { foreach ($items as $k => $v) { echo self::get_tpl_backend($k, $items); } } else { echo self::get_tpl_backend(0); } ?> </div> <table class="form-table" id="<?php echo __CLASS__; ?> -control" hidden> <tbody> <tr> <th><?php echo ___('Control'); ?> </th> <td> <a href="javascript:;" id="<?php echo __CLASS__; ?> -add" class="add button button-primary"><i class="fa fa-plus"></i> <?php echo ___('Add new item'); ?> </a> </td> </tr> </tbody> </table> </fieldset> <?php }