HEX
Server: nginx/1.24.0
System: Linux mail.365consultoria.com 6.8.0-1057-oracle #58~22.04.1-Ubuntu SMP Tue Jun 30 18:20:56 UTC 2026 aarch64
User: www (1002)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/laet.adv.br/wp-content/themes/betheme/functions/theme-sidebars.php
<?php
/**
 * Theme sidebars.
 *
 * @package Betheme
 * @author Muffin group
 * @link https://muffingroup.com
 */

/**
 * Sidebar | Add
 */

if (! function_exists('mfn_register_sidebars')) {
	function mfn_register_sidebars()
	{

		// custom sidebars

		$sidebars = mfn_opts_get('sidebars');
		if (is_array($sidebars)) {
			foreach ($sidebars as $sidebar) {
				register_sidebar(array(
					'name' => $sidebar,
					'id' => 'sidebar-'. str_replace('+', '-', urlencode(strtolower(trim($sidebar)))),
					'description'	=> __('Custom sidebar created in Theme Options.', 'betheme'),
					'before_widget' => '<aside id="%1$s" class="widget %2$s">',
					'after_widget' => '</aside>',
					'before_title' => '<h3>',
					'after_title' => '</h3>',
				));
			}
		}

		// footer areas

		for ($i = 1; $i <= 5; $i++) {
			register_sidebar(array(
				'name' => __('Footer', 'mfn-opts') .' | #'.$i,
				'id' => 'footer-area-'.$i,
				'description'	=> __('Appears in the Footer section of the site.', 'betheme'),
				'before_widget' => '<aside id="%1$s" class="widget %2$s">',
				'after_widget' => '</aside>',
				'before_title' => '<h4>',
				'after_title' => '</h4>',
			));
		}

		// sliding top

		for ($i = 1; $i <= 4; $i++) {
			register_sidebar(array(
				'name' => __('Sliding Top', 'mfn-opts') .' | #'.$i,
				'id' => 'top-area-'.$i,
				'description'	=> __('Appears in the Sliding Top section of the site.', 'betheme'),
				'before_widget' => '<aside id="%1$s" class="widget %2$s">',
				'after_widget' => '</aside>',
				'before_title' => '<h4>',
				'after_title' => '</h4>',
			));
		}

		// Page | Search

		register_sidebar(array(
			'name' => __('Page | Search', 'mfn-opts'),
			'id' => 'mfn-search',
			'description'	=> __('Main sidebar for Search page that appears on the right. Leave it empty to use Full Width layout.', 'betheme'),
			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
			'after_widget' => '</aside>',
			'before_title' => '<h3>',
			'after_title' => '</h3>',
		));

		// Forum | bbPress

		register_sidebar(array(
			'name' => __('Plugin | bbPress', 'mfn-opts'),
			'id' => 'forum',
			'description'	=> __('Main sidebar for bbPress pages that appears on the right. Leave it empty to use Full Width layout.', 'betheme'),
			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
			'after_widget' => '</aside>',
			'before_title' => '<h3>',
			'after_title' => '</h3>',
		));

		// Forum | BuddyPress

		register_sidebar(array(
			'name' => __('Plugin | BuddyPress', 'mfn-opts'),
			'id' => 'buddy',
			'description'	=> __('Main sidebar for BuddyPress pages that appears on the right. Leave it empty to use Full Width layout.', 'betheme'),
			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
			'after_widget' => '</aside>',
			'before_title' => '<h3>',
			'after_title' => '</h3>',
		));

		// Events | Events Callendar

		register_sidebar(array(
			'name' => __('Plugin | Events Calendar', 'mfn-opts'),
			'id' => 'events',
			'description'	=> __('Main sidebar for The Events Calendar pages that appears on the right. Leave it empty to use Full Width layout.', 'betheme'),
			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
			'after_widget' => '</aside>',
			'before_title' => '<h3>',
			'after_title' => '</h3>',
		));

		// Download | Easy Digital Downloads

		register_sidebar(array(
			'name' => __('Plugin | Easy Digital Downloads', 'mfn-opts'),
			'id' => 'edd',
			'description'	=> __('Main sidebar for Easy Digital Downloads single pages that appears on the right. Leave it empty to use Full Width layout.', 'betheme'),
			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
			'after_widget' => '</aside>',
			'before_title' => '<h3>',
			'after_title' => '</h3>',
		));

		// Shop | WooCommerce

		register_sidebar(array(
			'name' => __('Plugin | WooCommerce', 'mfn-opts'),
			'id' => 'shop',
			'description'	=> __('Main sidebar for WooCommerce pages that appears on the right. Leave it empty to use Full Width layout.', 'betheme'),
			'before_widget' => '<aside id="%1$s" class="widget %2$s">',
			'after_widget' => '</aside>',
			'before_title' => '<h3>',
			'after_title' => '</h3>',
		));
	}
}
add_action('widgets_init', 'mfn_register_sidebars');

/**
 * Sidebar | Add: Categories
 */

if (! function_exists('mfn_register_sidebars_cat')) {
	function mfn_register_sidebars_cat()
	{

		// blog categories

		$categories = get_categories(array(
			'taxonomy' => 'category',
		));

		if (is_array($categories)) {
			foreach ($categories as $category) {
				register_sidebar(array(
					'name' => __('Blog', 'mfn-opts') .' | '. $category->cat_name,
					'id' => 'blog-cat-'. trim($category->slug),
					'description'	=> __('Sidebar for Blog Category. Appears only when you select sidebar for Blog.', 'betheme'),
					'before_widget' => '<aside id="%1$s" class="widget %2$s">',
					'after_widget' => '</aside>',
					'before_title' => '<h4>',
					'after_title' => '</h4>',
				));
			}
		}

		// portfolio categories

		$post_types_disable = mfn_opts_get('post-type-disable');

		if (! isset($post_types_disable['portfolio'])) {

			$categories = get_categories(array(
				'taxonomy' => 'portfolio-types',
			));

			if (is_array($categories)) {
				foreach ($categories as $category) {
					register_sidebar(array(
						'name' => __('Portfolio', 'mfn-opts') .' | '. $category->cat_name,
						'id' => 'portfolio-cat-'. trim($category->slug),
						'description'	=> __('Appears on Portfolio Category Page.', 'betheme'),
						'before_widget' => '<aside id="%1$s" class="widget %2$s">',
						'after_widget' => '</aside>',
						'before_title' => '<h4>',
						'after_title' => '</h4>',
					));
				}
			}

		}

	}
}

$theme_disable = mfn_opts_get('theme-disable');
if (! isset($theme_disable['categories-sidebars'])) {
	add_action('init', 'mfn_register_sidebars_cat');	// get_categories can be call only on init
}