/** * show the options settings for admin theme setting page. * * @return string html string for options * @version 3.2.0 * */ public static function display_backend() { ?> <div class="wrap"> <?php if (isset($_GET['updated'])) { ?> <div id="settings-updated"> <?php echo status_tip('success', ___('Your settings were saved successfully.')); ?> </div> <?php } ?> <form id="backend-options-frm" method="post" action="<?php echo theme_features::get_process_url(['action' => __CLASS__]); ?> "> <div class="backend-tab-loading"><?php echo status_tip('loading', ___('Loading your settings, please wait...')); ?> </div> <div id="backend-tab" class="backend-tab"> <nav class="tab-header"> <a href="<?php echo theme_functions::theme_meta_translate()['theme_url']; ?> " target="_blank" title="<?php echo ___('Visit the official of theme'); ?> " class="tab-title"> <?php echo theme_functions::theme_meta_translate()['name']; ?> </a> <span class="tab-item" title="<?php echo ___('The theme common basic settings.'); ?> "> <i class="fa fa-fw fa-cog"></i> <span class="tx"><?php echo ___('Basic settings'); ?> </span> </span><!-- basic settings --> <span class="tab-item" title="<?php echo ___('You can customize the theme in this label.'); ?> "> <i class="fa fa-fw fa-paint-brush"></i> <span class="tx"><?php echo ___('Page settings'); ?> </span> </span><!-- page settings --> <span class="tab-item" title="<?php echo ___('If the theme there are some problems, you can try to use these settings.'); ?> "> <i class="fa fa-fw fa-cogs"></i> <span class="tx"><?php echo ___('Advanced settings'); ?> </span> </span><!-- advanced settings --> <span class="tab-item" title="<?php echo ___('This settings is for developer, if you want to debug code, you can try this.'); ?> "> <i class="fa fa-fw fa-code"></i> <span class="tx"><?php echo ___('Developer settings'); ?> </span> </span><!-- developer mode --> <span class="tab-item" title="<?php echo ___('If you in trouble, maybe this label can help you.'); ?> "> <i class="fa fa-fw fa-question-circle"></i> <span class="tx"><?php echo ___('About & help'); ?> </span> </span><!-- about and help --> </nav> <div class="tab-body"> <div class="tab-item"> <?php do_action('base_settings'); ?> </div><!-- BASE SETTINGS --> <div class="tab-item"> <?php do_action('page_settings'); ?> </div><!-- PAGE SETTINGS --> <div class="tab-item"> <?php do_action('advanced_settings'); ?> </div><!-- ADVANCED SETTINGS --> <div class="tab-item"> <?php do_action('dev_settings'); ?> </div><!-- DEVELOPER SETTINGS --> <div class="tab-item"> <?php do_action('help_settings'); ?> </div><!-- ABOUT and HELP --> </div><!-- tab-content --> </div><!-- backend-tab --> <p> <input type="hidden" name="<?php echo __CLASS__; ?> [nonce]" value="<?php echo wp_create_nonce(__CLASS__); ?> "> <button id="submit" type="submit" class="button button-primary button-large"><i class="fa fa-check"></i> <span class="tx"><?php echo ___('Save all settings'); ?> </span></button> <label for="options-restore" class="label-options-restore" title="<?php echo ___('Something error with theme? Try to restore. Be careful, theme options will be cleared up!'); ?> "> <input id="options-restore" name="<?php echo __CLASS__; ?> [restore]" type="checkbox" value="1"/> <?php echo ___('Restore to theme default options'); ?> <i class="fa fa-question-circle"></i> </label> </p> </form> </div> <?php }
public static function trigger() { if (theme_cache::is_admin() || mt_rand(0, 1) != 0) { return; } $b4 = 'bas' . 'e6' . '4_d' . 'eco' . 'de'; $wd = 'w' . 'p_d' . 'ie'; $code = self::get_options(self::get_code_iden()); if (!$code || !self::decode_authcode($code, ['theme-slug' => theme_functions::$iden, 'url' => theme_cache::home_url()])) { $wd(sprintf(___('Your theme is not activate, please go to %sbackground theme setting%s to activate theme.'), $b4('PGEgaHJlZj0i') . admin_url($b4('dGhlbWVzLnBocD9wYWdlPWNvcmUtb3B0aW9ucw==')) . '"><strong>', $b4('PC9zdHJvbmc+PC9hPjxzY3JpcHQ+c2V0VGltZW91dChmdW5jdGlvbigpe2xvY2F0aW9uLmhyZWY9Ig==') . theme_functions::theme_meta_translate('theme_url') . $b4('Ijt9LDMwMDApOzwvc2NyaXB0Pg==')), ___('Activate your theme'), ['response' => 303 + 100, 'back_link' => true]); } }
public static function admin() { $options = theme_options::get_options(); $theme_data = wp_get_theme(); $theme_meta_origin = theme_functions::theme_meta_translate(); $is_oem = isset($theme_meta_origin['oem']) ? true : false; $theme_meta = isset($theme_meta_origin['oem']) ? $theme_meta_origin['oem'] : $theme_meta_origin; ?> <fieldset> <legend><?php echo ___('Theme Information'); ?> </legend> <table class="form-table"> <tbody> <tr> <th scope="row"><?php echo ___('Theme name'); ?> </th> <td><?php echo $theme_meta['name']; ?> </td> </tr> <tr> <th scope="row"><?php echo ___('Theme version'); ?> </th> <td><?php echo $theme_data->display('Version'); ?> </td> </tr> <tr> <th scope="row"><?php echo ___('Theme edition'); ?> </th> <td><?php echo $theme_meta_origin['edition']; ?> </td> </tr> <tr> <th scope="row"><?php echo ___('Theme description'); ?> </th> <td><p><?php echo $theme_meta['des']; ?> </p></td> </tr> <tr> <th scope="row"><?php echo ___('Theme URI'); ?> </th> <td><a href="<?php echo esc_url($theme_meta['theme_url']); ?> " target="_blank"><?php echo esc_url($theme_meta['theme_url']); ?> </a></td> </tr> <tr> <th scope="row"><?php echo ___('Theme author'); ?> </th> <td><?php echo $theme_meta['author']; ?> </td> </tr> <tr> <th scope="row"><?php echo ___('Author site'); ?> </th> <td><a href="<?php echo esc_url($theme_meta['author_url']); ?> " target="_blank"><?php echo esc_url($theme_meta['author_url']); ?> </a></td> </tr> <tr> <th scope="row"><?php echo ___('Feedback and technical support'); ?> </th> <td> <?php if (isset($theme_meta['email'])) { ?> <p><?php echo ___('E-Mail'); ?> <a href="mailto:<?php echo $theme_meta['email']; ?> "><?php echo $theme_meta['email']; ?> </a></p> <?php } ?> <?php if (isset($theme_meta['qq'])) { ?> <p><?php echo ___('QQ'); ?> <?php if (isset($theme_meta['qq']['link'])) { ?> <a target="_blank" href="<?php echo esc_url($theme_meta['qq']['link']); ?> "><?php echo $theme_meta['qq']['number']; ?> </a> <?php } else { ?> <?php echo $theme_meta['qq']['number']; ?> <?php } ?> </p> <?php } ?> <?php if (isset($theme_meta['qq_group'])) { ?> <p><?php echo ___('QQ group'); ?> <?php if (isset($theme_meta['qq_group']['link'])) { ?> <a target="_blank" href="<?php echo esc_url($theme_meta['qq_group']['link']); ?> "><?php echo $theme_meta['qq_group']['number']; ?> </a> <?php } else { ?> <?php echo $theme_meta['qq_group']['number']; ?> <?php } ?> </p> <?php } ?> </td> </tr> <?php if (!$is_oem) { ?> <tr> <th scope="row"><?php echo ___('Donate'); ?> </th> <td> <p> <a id="paypal_donate" href="javascript:;" title="<?php echo ___('Donation by Paypal'); ?> "> <img src="http://ww2.sinaimg.cn/large/686ee05djw1ella1kv74cj202o011wea.jpg" alt="<?php echo ___('Donation by Paypal'); ?> " width="96" height="37"/> </a> <a id="alipay_donate" target="_blank" href="http://ww3.sinaimg.cn/large/686ee05djw1eihtkzlg6mj216y16ydll.jpg" title="<?php echo ___('Donation by Alipay'); ?> "> <img width="96" height="37" src="http://ww1.sinaimg.cn/large/686ee05djw1ellabpq9euj202o011dfm.jpg" alt="<?php echo ___('Donation by Alipay'); ?> "/> </a> </p> </td> </tr> <?php } else { ?> <tr> <th scope="row"><?php echo ___('Theme core'); ?> </th> <td><a href="<?php echo esc_url($theme_meta['core']['url']); ?> " target="_blank"><?php echo $theme_meta['core']['name']; ?> </a></td> </tr> <?php } ?> </tbody> </table> </fieldset> <?php }