Submit
Path:
~
/
home
/
getwphos
/
public_html
/
giulianos
/
wp-content
/
themes
/
mechano
/
admin
/
File Content:
theme-options.php
<?php function mechano_create_tabs($current = 'customizer') { $tabs = array( 'customizer' => 'Customizer', 'widget-areas' => 'Widget Areas', 'support' => 'Support' ); ?> <h1>Theme Options</h1> <h2 class="nav-tab-wrapper"> <?php foreach ($tabs as $tab => $name) { $class = ($tab == $current) ? ' nav-tab-active' : ""; echo "<a class='nav-tab$class' href='?page=mechano-theme-options&tab=$tab'>$name</a>"; } ?> </h2> <?php } /* ============================================================================================================================================ */ function mechano_theme_options_page() { global $pagenow; ?> <div class="wrap wrap2"> <div class="status"> <img alt="..." src="<?php echo esc_url(get_template_directory_uri()); ?>/admin/ajax-loader.gif"> <strong></strong> </div> <?php if ( isset( $_GET['tab'] ) ) { mechano_create_tabs($_GET['tab']); } else { mechano_create_tabs('customizer'); } ?> <div id="poststuff"> <?php // theme options page if ( $pagenow == 'themes.php' && $_GET['page'] == 'mechano-theme-options' ) { // tab from url if ( isset( $_GET['tab'] ) ) { $tab = $_GET['tab']; } else { $tab = 'customizer'; } switch ($tab) { case 'customizer' : if (isset( $_GET['saved'] ) == 'true') { echo '<div class="alert-success" title="Click to close"><p><strong>Saved.</strong></p></div>'; } ?> <div class="postbox"> <div class="inside"> <?php $mechano_admin_url = admin_url( 'themes.php?page=mechano-theme-options' ); ?> <form method="post" class="ajax-form" action="<?php echo esc_url( $mechano_admin_url ); ?>"> <?php wp_nonce_field("settings-page"); ?> <table> <tr> <td class="option-left"> <?php echo '<a class="button button-primary button-hero" href="' . esc_url(admin_url('customize.php')) . '">Customize Your Site</a>'; ?> </td> <td class="option-right"> The Customizer allows you to preview changes to your site before publishing them. </td> </tr> </table> </form> </div> <!-- .inside --> </div> <!-- .postbox --> <?php break; case 'widget-areas' : if (isset($_GET['saved']) == 'true') { $mechano_no_sidebar_name = get_option('mechano_no_sidebar_name'); if ($mechano_no_sidebar_name == "") { echo '<div class="updated notice is-dismissible"> <p>Enter text for a new widget area name.</p> </div>'; } else { echo '<div class="updated notice is-dismissible"> <p>Widget area created.</p> </div>'; } } elseif (isset($_GET['deleted']) == 'true') { delete_option('mechano_sidebars_with_commas'); echo '<div class="updated notice is-dismissible"> <p>Widget areas deleted.</p> </div>'; } ?> <div class="postbox"> <div class="inside"> <?php $mechano_admin_url = admin_url('themes.php?page=mechano-theme-options&tab=widget-areas'); ?> <form method="post" action="<?php echo esc_url($mechano_admin_url); ?>"> <?php wp_nonce_field( "settings-page" ); ?> <table> <tr> <td class="option-left"> <h4>New Widget Area</h4> <input type="text" name="mechano_new_sidebar_name" required="required" style="width: 100%;" value=""> </td> <td class="option-right"> Enter text for a new widget area name. </td> </tr> <tr> <td class="option-left"> <input type="submit" name="submit" class="button button-primary button-large" value="Create"> <input type="hidden" name="settings-submit" value="Y"> </td> <td class="option-right"> Create new widget area. </td> </tr> <tr> <td class="option-left"> <h4>Widget Areas</h4> <select name="sidebars" style="width: 100%;" size="10" disabled="disabled"> <?php $mechano_sidebars_with_commas = get_option( 'mechano_sidebars_with_commas' ); if ( $mechano_sidebars_with_commas != "" ) { $sidebars = preg_split("/[\s]*[,][\s]*/", $mechano_sidebars_with_commas); foreach ( $sidebars as $sidebar_name ) { echo '<option>' . $sidebar_name . '</option>'; } } ?> </select> </td> <td class="option-right"> New widget area name must be different from created widget area names. </td> </tr> <tr> <td class="option-left"> <?php $mechano_admin_url = admin_url( 'themes.php?page=mechano-theme-options&tab=widget-areas&deleted=true' ); ?> <a class="button button-large" style="margin-top: 20px;" href="<?php echo esc_url( $mechano_admin_url ); ?>">Delete</a> </td> <td class="option-right"> Remove widget areas. </td> </tr> </table> </form> </div> <!-- .inside --> </div> <!-- .postbox --> <?php break; case 'support' : if (isset( $_GET['saved'] ) == 'true') { echo '<div class="alert-success" title="Click to close"><p><strong>Saved.</strong></p></div>'; } ?> <div class="postbox"> <div class="inside"> <?php $mechano_admin_url = admin_url( 'themes.php?page=mechano-theme-options' ); ?> <form method="post" class="ajax-form" action="<?php echo esc_url($mechano_admin_url); ?>"> <?php wp_nonce_field("settings-page"); ?> <table> <tr> <td class="option-left"> <h4>Need Help?</h4> <a class="button button-primary" style="margin-top: 0px;" target="_blank" href="https://www.pixelwars.org/forums/">View Support Forum</a> </td> <td class="option-right"> Got something to say? </td> </tr> <tr> <td class="option-left"> <h4>Documentation</h4> <a class="button" target="_blank" href="https://docs.pixelwars.org/mechano.php">Get Documentation</a> </td> <td class="option-right"> Theme documentation is in the package. You can find it on ThemeForest in your downloads menu. </td> </tr> <tr> <td class="option-left"> <h4>Rate Theme</h4> <a class="button" target="_blank" href="https://themeforest.net/downloads">Rate on ThemeForest</a> </td> <td class="option-right"> If you liked the theme you can rate it on ThemeForest in your downloads menu. </td> </tr> <tr> <td class="option-left"> <h4>Follow Us</h4> <a class="button" target="_blank" href="https://themeforest.net/user/pixelwars/follow">Follow us on ThemeForest</a> <br> <br> <a class="button" target="_blank" href="https://www.facebook.com/pixelwarsdesign/">Follow us on Facebook</a> <br> <br> <a class="button" target="_blank" href="https://twitter.com/pixelwarsdesign">Follow us on Twitter</a> <br> <br> <a class="button" target="_blank" href="https://www.instagram.com/pixelwarsdesign/">Follow us on Instagram</a> <br> <br> <a class="button" target="_blank" href="https://www.youtube.com/c/pixelwarsdesign">Follow us on YouTube</a> </td> <td class="option-right"> Follow us and don't miss new upcoming premium themes. </td> </tr> </table> </form> </div> <!-- .inside --> </div> <!-- .postbox --> <?php break; } } ?> </div> <!-- #poststuff --> </div> <!-- .wrap .wrap2 --> <?php } /* ============================================================================================================================================ */ function mechano_theme_save_settings() { global $pagenow; if ( $pagenow == 'themes.php' && $_GET['page'] == 'mechano-theme-options' ) { if ( isset ( $_GET['tab'] ) ) { $tab = $_GET['tab']; } else { $tab = 'customizer'; } switch ( $tab ) { case 'customizer' : // ... break; case 'widget-areas' : update_option( 'mechano_no_sidebar_name', esc_attr( $_POST['mechano_new_sidebar_name'] ) ); if ( esc_attr( $_POST['mechano_new_sidebar_name'] ) != "" ) { $mechano_sidebars_with_commas = get_option( 'mechano_sidebars_with_commas', "" ); if ( $mechano_sidebars_with_commas == "" ) { update_option( 'mechano_sidebars_with_commas', esc_attr( $_POST['mechano_new_sidebar_name'] ) ); } else { update_option( 'mechano_sidebars_with_commas', get_option( 'mechano_sidebars_with_commas' ) . ',' . esc_attr( $_POST['mechano_new_sidebar_name'] ) ); } } break; } } } /* ============================================================================================================================================ */ function mechano_load_settings_page() { if ( isset( $_POST["settings-submit"] ) == 'Y' ) { check_admin_referer( "settings-page" ); mechano_theme_save_settings(); $url_parameters = isset( $_GET['tab'] ) ? 'tab=' . $_GET['tab'] . '&saved=true' : 'saved=true'; wp_redirect( admin_url( 'themes.php?page=mechano-theme-options&' . $url_parameters ) ); exit; } } /* ============================================================================================================================================ */ function mechano_theme_menu() { $settings_page = add_theme_page('Theme Options', 'Theme Options', 'edit_theme_options', 'mechano-theme-options', 'mechano_theme_options_page' ); add_action( "load-{$settings_page}", 'mechano_load_settings_page' ); } add_action( 'admin_menu', 'mechano_theme_menu' );
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
css
---
0755
demo-data
---
0755
js
---
0755
plugins
---
0755
about-author.php
1412 bytes
0644
admin--class-tgm-plugin-activation.php
126853 bytes
0644
admin--demo-import.php
10565 bytes
0644
admin--help-tab.php
2049 bytes
0644
admin--notice.php
9889 bytes
0644
ajax-loader.gif
4203 bytes
0644
archive-title.php
3072 bytes
0644
automatic-excerpt.php
3257 bytes
0644
content-none.php
1105 bytes
0644
customizer-default-values.php
3280 bytes
0644
customizer-sections.php
8509 bytes
0644
customizer-settings.php
262878 bytes
0644
enqueue-inline-script.php
2601 bytes
0644
enqueue-inline-style.php
66490 bytes
0644
enqueue-styles-scripts.php
13122 bytes
0644
functions-core.php
8160 bytes
0644
functions-layout-grid.php
1082 bytes
0644
functions-layout-regular.php
802 bytes
0644
functions-portfolio.php
2917 bytes
0644
functions-singular.php
13678 bytes
0644
functions-woocommerce.php
4674 bytes
0644
html-attributes.php
18503 bytes
0644
image-sizes.php
1986 bytes
0644
index.php
30 bytes
0644
navigation-archive.php
1231 bytes
0644
navigation-single.php
4441 bytes
0644
override-post-class.php
1447 bytes
0644
override-post-gallery.php
7368 bytes
0644
post-meta.php
7608 bytes
0644
pre-get-posts.php
353 bytes
0644
theme-options.php
11646 bytes
0644
widget_area-register.php
10228 bytes
0644
widget_area-sidebar-archive.php
4224 bytes
0644
widget_area-sidebar-singular.php
7161 bytes
0644
N4ST4R_ID | Naxtarrr