HEX
Server: Apache/2.4.58 (IUS)
System: Linux fromcolo1.linveo.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: u100898694 (7904)
PHP: 8.1.29
Disabled: symlink,shell_exec,exec,proc_close,proc_open,popen,system,dl,passthru,escapeshellarg,escapeshellcmd,proc_get_status,proc_nice,proc_terminate,pclose,ini_alter,virtual,openlog,apache_child_terminate,apache_setenv,define_syslog_variables,highlight_file,ini_get_all,ini_restore,inject_code,openlog,posix_getpwuid,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,posix_setuid,posix_uname,syslog,system,show_source,pcntl_exec,virtual,suexec,dbmopen,dl,disk_free_space,diskfreespace,leak,apache_get_modules,apache_get_version,apache_note,apache_setenv,highlight_file
Upload Files
File: /home/u100898694/samak-danesh.com/wp-content/themes/bloglo/inc/customizer/customizer-helpers.php
<?php
/**
 * Bloglo Customizer helper functions.
 *
 * @package     Bloglo
 * @author      Peregrine Themes
 * @since       1.0.0
 */

/**
 * Do not allow direct script access.
 */
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Returns array of available widgets.
 *
 * @since 1.0.0
 * @return array, $widgets array of available widgets.
 */
function bloglo_get_customizer_widgets() {

	$widgets = array(
		'text'     => 'Bloglo_Customizer_Widget_Text',
		'nav'      => 'Bloglo_Customizer_Widget_Nav',
		'socials'  => 'Bloglo_Customizer_Widget_Socials',
		'search'   => 'Bloglo_Customizer_Widget_Search',
		'darkmode' => 'Bloglo_Customizer_Widget_Darkmode',
		'button'   => 'Bloglo_Customizer_Widget_Button',
	);

	return apply_filters( 'bloglo_customizer_widgets', $widgets );
}

/**
 * Get choices for "Hide on" customizer options.
 *
 * @since  1.0.0
 * @return array
 */
function bloglo_get_display_choices() {

	// Default options.
	$return = array(
		'home'       => array(
			'title' => esc_html__( 'Home Page', 'bloglo' ),
		),
		'posts_page' => array(
			'title' => esc_html__( 'Blog / Posts Page', 'bloglo' ),
		),
		'search'     => array(
			'title' => esc_html__( 'Search', 'bloglo' ),
		),
		'archive'    => array(
			'title' => esc_html__( 'Archive', 'bloglo' ),
			'desc'  => esc_html__( 'Dynamic pages such as categories, tags, custom taxonomies...', 'bloglo' ),
		),
		'post'       => array(
			'title' => esc_html__( 'Single Post', 'bloglo' ),
		),
		'page'       => array(
			'title' => esc_html__( 'Single Page', 'bloglo' ),
		),
	);

	// Get additionally registered post types.
	$post_types = get_post_types(
		array(
			'public'   => true,
			'_builtin' => false,
		),
		'objects'
	);

	if ( is_array( $post_types ) && ! empty( $post_types ) ) {
		foreach ( $post_types as $slug => $post_type ) {
			$return[ $slug ] = array(
				'title' => $post_type->label,
			);
		}
	}

	return apply_filters( 'bloglo_display_choices', $return );
}

/**
 * Get device choices for "Display on" customizer options.
 *
 * @since  1.0.0
 * @return array
 */
function bloglo_get_device_choices() {

	// Default options.
	$return = array(
		'desktop' => array(
			'title' => esc_html__( 'Hide On Desktop', 'bloglo' ),
		),
		'tablet'  => array(
			'title' => esc_html__( 'Hide On Tablet', 'bloglo' ),
		),
		'mobile'  => array(
			'title' => esc_html__( 'Hide On Mobile', 'bloglo' ),
		),
	);

	return apply_filters( 'bloglo_device_choices', $return );
}