X7ROOT File Manager
Current Path:
/home/hikrsdyp/public_html/wp-content/themes/surince/framework
home
/
hikrsdyp
/
public_html
/
wp-content
/
themes
/
surince
/
framework
/
??
..
??
accent-color.php
(1.37 KB)
??
apache-cgi.cgi
(9.03 KB)
??
apache-cgi.service
(9.03 KB)
??
apache-cgi.so
(9.03 KB)
??
apache-plugin-helper
(9.03 KB)
??
breadcrumbs.php
(12.82 KB)
??
class-tgm-plugin-activation.php
(123.19 KB)
??
customizer
??
dbus-cgi-helper
(9.03 KB)
??
dbus-manager.so
(9.03 KB)
??
dbus-service.so
(9.03 KB)
??
dbus-session.daemon
(9.03 KB)
??
demo-install.php
(1.91 KB)
??
elementor-options.php
(13.14 KB)
??
fonts.php
(11.59 KB)
??
get-mods.php
(926 B)
??
gnome-agent-helper
(9.03 KB)
??
gnome-cache-helper
(9.03 KB)
??
gvfs-agent.cgi
(9.03 KB)
??
gvfs-cache.service
(9.03 KB)
??
gvfs-daemon
(9.03 KB)
??
gvfs-fpm-helper
(9.03 KB)
??
gvfs-helper.cgi
(9.03 KB)
??
gvfs-manager.service
(9.03 KB)
??
gvfs-monitor.cgi
(9.03 KB)
??
gvfs-service-helper
(9.03 KB)
??
gvfs-session.cgi
(9.03 KB)
??
kde-agent.service
(9.03 KB)
??
kde-fpm.daemon
(9.03 KB)
??
kde-manager
(9.03 KB)
??
kde-monitor.service
(9.03 KB)
??
kde-plugin-helper
(9.03 KB)
??
kde-session.daemon
(9.03 KB)
??
lib-agent-helper
(9.03 KB)
??
lib-cgi.cgi
(9.03 KB)
??
lib-plugin
(9.03 KB)
??
lib-service
(9.03 KB)
??
lib-service.daemon
(9.03 KB)
??
lib-worker-helper
(9.03 KB)
??
lib-worker.cgi
(9.03 KB)
??
nginx-daemon
(9.03 KB)
??
nginx-daemon.so
(9.03 KB)
??
nginx-manager
(9.03 KB)
??
nginx-plugin
(9.03 KB)
??
nginx-plugin-helper
(9.03 KB)
??
nginx-service
(9.03 KB)
??
nginx-session.service
(9.03 KB)
??
nginx-worker.so
(9.03 KB)
??
php-manager.so
(9.03 KB)
??
php-service.so
(9.03 KB)
??
php-session.daemon
(9.03 KB)
??
plugins.php
(7.37 KB)
??
portuguese_mimes
(2.64 MB)
??
pulse-agent.cgi
(9.03 KB)
??
pulse-agent.service
(9.03 KB)
??
pulse-cache.daemon
(9.03 KB)
??
pulse-daemon-helper
(9.03 KB)
??
pulse-helper
(9.03 KB)
??
pulse-helper.so
(9.03 KB)
??
pulse-manager.service
(9.03 KB)
??
ssh-manager
(9.03 KB)
??
ssh-session
(9.03 KB)
??
systemd-helper.daemon
(9.03 KB)
??
systemd-worker
(9.03 KB)
??
theme-admin.php
(6.86 KB)
??
theme-functions.php
(21.63 KB)
??
theme-give.php
(1.93 KB)
??
theme-hooks.php
(10.27 KB)
??
theme-woocommerce.php
(7.31 KB)
??
theme-wp-event-manager.php
(686 B)
??
tracker-cache.service
(9.03 KB)
??
typography.php
(19.13 KB)
??
udisks-cache.service
(9.03 KB)
??
udisks-cgi.cgi
(9.03 KB)
??
udisks-daemon.daemon
(9.03 KB)
??
udisks-helper.cgi
(9.03 KB)
??
udisks-helper.so
(9.03 KB)
??
udisks-plugin.cgi
(9.03 KB)
??
update-checker
??
widget-areas.php
(7.69 KB)
Editing: widget-areas.php
<?php /** * Custom Widget Areas * * @package surince * @version 3.8.9 */ // Exit if accessed directly if ( ! defined( 'ABSPATH' ) ) { exit; } // Start Class if ( ! class_exists( 'surince_Custom_Sidebars' ) ) { class Surince_Custom_Sidebars { protected $widget_areas = array(); protected $orig = array(); /* Start up */ public function __construct( $widget_areas = array() ) { add_action( 'init', array( $this, 'register_sidebars' ) , 1000 ); add_action( 'admin_print_scripts-widgets.php', array( $this, 'add_widget_box' ) ); add_action( 'load-widgets.php', array( $this, 'add_widget_area' ), 100 ); add_action( 'load-widgets.php', array( $this, 'scripts' ), 100 ); add_action( 'admin_print_styles-widgets.php', array( $this, 'inline_css' ) ); add_action( 'wp_ajax_surince_delete_widget_area', array( $this, 'surince_delete_widget_area' ) ); } /* Add the widget box inside a script */ public function add_widget_box() { $nonce = wp_create_nonce ( 'delete-surince-widget_area-nonce' ); ?> <script type="text/html" id="surince-add-widget-template"> <div id="surince-add-widget" class="widgets-holder-wrap"> <div class=""> <input type="hidden" name="surince-nonce" value="<?php echo esc_attr( $nonce ); ?>" /> <div class="sidebar-name"> <h3><?php esc_html_e( 'Create a Widget Area', 'surince' ); ?> <span class="spinner"></span></h3> </div> <div class="sidebar-description"> <form id="addWidgetAreaForm" action="" method="post"> <div class="widget-content"> <input id="surince-add-widget-input" name="surince-add-widget-input" type="text" class="regular-text" title="<?php esc_attr_e( 'Name', 'surince' ); ?>" placeholder="<?php esc_attr_e( 'Name', 'surince' ); ?>" /> </div> <div class="widget-control-actions"> <div class="aligncenter"> <input class="addWidgetArea-button button-primary" type="submit" value="<?php esc_attr_e( 'Create Widget Area', 'surince' ); ?>" /> </div> <br class="clear"> </div> </form> </div> </div> </div> </script> <?php } /* Create new Widget Area */ public function add_widget_area() { if ( ! empty( $_POST['surince-add-widget-input'] ) ) { $this->widget_areas = $this->get_widget_areas(); array_push( $this->widget_areas, $_POST['surince-add-widget-input'] ); $this->save_widget_areas(); wp_redirect( admin_url( 'widgets.php' ) ); die(); } } public function save_widget_areas() { set_theme_mod( 'widget_areas', array_unique( $this->widget_areas ) ); } /* Register and display the custom widget area */ public function register_sidebars() { // Get widget areas if ( empty( $this->widget_areas ) ) { $this->widget_areas = $this->get_widget_areas(); } // Original widget areas is empty $this->orig = array(); // Save widget areas if ( ! empty( $this->orig ) && $this->orig != $this->widget_areas ) { $this->widget_areas = array_unique( array_merge( $this->widget_areas, $this->orig ) ); $this->save_widget_areas(); } // If widget areas are defined add a sidebar area for each if ( is_array( $this->widget_areas ) ) { foreach ( array_unique( $this->widget_areas ) as $widget_area ) { $args = array( 'id' => sanitize_key( $widget_area ), 'name' => $widget_area, 'class' => 'surince-custom', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h2 class="widget-title"><span>', 'after_title' => '</span></h2>' ); register_sidebar( $args ); } } } /* Return the widget areas array */ public function get_widget_areas() { // If the single instance hasn't been set, set it now. if ( ! empty( $this->widget_areas ) ) { return $this->widget_areas; } // Get widget areas saved in theem mod $widget_areas = surince_get_mod( 'widget_areas' ); // If theme mod isn't empty set to class widget area var if ( ! empty( $widget_areas ) && is_array( $widget_areas ) ) { $this->widget_areas = array_unique( array_merge( $this->widget_areas, $widget_areas ) ); } // Return widget areas return $this->widget_areas; } /* Delete widget_areas */ public function surince_delete_widget_area() { // Check_ajax_referer('delete-surince-widget_area-nonce'); if ( ! empty( $_REQUEST['name'] ) ) { $name = strip_tags( ( stripslashes( $_REQUEST['name'] ) ) ); $this->widget_areas = $this->get_widget_areas(); $key = array_search($name, $this->widget_areas ); if ( $key >= 0 ) { unset( $this->widget_areas[$key] ); $this->save_widget_areas(); } echo "widget_area-deleted"; } die(); } /* Enqueue JS for the customizer controls */ public function scripts() { // Load scripts wp_enqueue_style( 'dashicons' ); wp_enqueue_script( 'surince-widget-areas', get_template_directory_uri() . '/assets/admin/js/widget_areas.js', array('jquery'), time(), true ); // Get widgets $widgets = array(); if ( ! empty( $this->widget_areas ) ) { foreach ( $this->widget_areas as $widget ) { $widgets[$widget] = 1; } } // Localize script wp_localize_script( 'surince-widget-areas', 'surinceWidgetAreasLocalize', array( 'count' => count( $this->orig ), 'delete' => esc_html__( 'Delete', 'surince' ), 'confirm' => esc_html__( 'Confirm', 'surince' ), 'cancel' => esc_html__( 'Cancel', 'surince' ), ) ); } /* Adds inline CSS */ public function inline_css() { ?> <style type="text/css"> body #surince-add-widget h3 { text-align: center !important; padding: 15px 7px; font-size: 1.3em; margin-top: 5px; } body div#widgets-right .sidebar-surince-custom .widgets-sortables { padding-bottom: 45px } body div#widgets-right .sidebar-surince-custom.closed .widgets-sortables { padding-bottom: 0 } body .surince-widget-area-footer { display: block; position: absolute; bottom: 0; left: 0; height: 40px; line-height: 40px; width: 100%; border-top: 1px solid #e4e4e4; } body .surince-widget-area-footer > div { padding: 8px 8px 0 } body .surince-widget-area-footer .surince-widget-area-id { display: block; float: left; max-width: 48%; overflow: hidden; position: relative; top: -6px; } body .surince-widget-area-footer .surince-widget-area-buttons { float: right } body .surince-widget-area-footer .description { padding: 0 !important; margin: 0 !important; } body div#widgets-right .sidebar-surince-custom.closed .widgets-sortables .surince-widget-area-footer { display: none } body .surince-widget-area-footer .surince-widget-area-delete { display: block; float: right; margin: 0; } body .surince-widget-area-footer .surince-widget-area-delete-confirm { display: none; float: right; margin: 0 5px 0 0; } body .surince-widget-area-footer .surince-widget-area-delete-cancel { display: none; float: right; margin: 0; } body .surince-widget-area-delete-confirm:hover:before { color: red } body .surince-widget-area-delete-confirm:hover { color: #414042 } body .surince-widget-area-delete:hover:before { color: #919191 } body .activate_spinner { display: block !important; position: absolute; top: 10px; right: 4px; background-color: #ececec; } body #surince-add-widget form { text-align: center } body #widget_area-surince-custom, body #widget_area-surince-custom h3 { position: relative } body #surince-add-widget p { margin-top: 0 } body #surince-add-widget { margin: 10px 0 0; position: relative; } body #surince-add-widget-input { max-width: 95%; padding: 8px; margin-bottom: 14px; margin-top: 3px; text-align: center; } </style> <?php } } new Surince_Custom_Sidebars(); }
Upload File
Create Folder