HEX
Server: Apache
System: Linux web2213.uni5.net 5.4.282-1.el8.elrepo.x86_64 #1 SMP Mon Aug 19 18:33:22 EDT 2024 x86_64
User: clinicamaciel (596848)
PHP: 7.3.33
Disabled: apache_child_terminate,c99_buff_prepare,c99_sess_put,dl,eval,exec,leak,link,myshellexec,openlog,passthru,pclose,pcntl_exec,php_check_syntax,php_strip_whitespace,popen,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,symlink,system,socket_listen,socket_create_listen,putenv
Upload Files
File: /home/clinicamaciel/www/wp-content/plugins/easy-twitter-feed-widget/inc/extras.php
<?php
/**
 * Custom functions for the plugin
 */

/**
 * Plugin Data
 */
function do_etfw_plugin_data() {
	return get_plugin_data( DO_ETFW_DIR . 'easy-twitter-feed-widget.php' );
}

/**
 * Plugin Options Defaults
 *
 * Sane Defaults Logic
 * Plugin will not save default settings to the database without explicit user action
 * and Plugin will function properly out-of-the-box without user configuration.
 *
 * @param string $option - Name of the option to retrieve.
 * @return mixed
 */
function do_etfw_option_default( $option = 'enable' ) {

	$do_etfw_options_default = array (
		'twitter_script' => true,
	);

	if( isset( $do_etfw_options_default[$option] ) ) {
		return $do_etfw_options_default[$option];
	}

	return '';

}

/**
 * Retrieve the plugin option.
 *
 * @param string $option - Name of the option to retrieve.
 * @return mixed
 */
function do_etfw_option( $option = 'twitter_script' ) {

	$do_etfw_options = apply_filters( 'do_etfw_options', get_option( 'do_etfw_options' ) );

	if ( isset( $do_etfw_options[$option] ) ) {
		return $do_etfw_options[$option];
	} else {
		return do_etfw_option_default( $option );
	}

}

/**
 * Adds custom classes to the array of body classes.
 *
 * @param array $classes Classes for the body element.
 * @return array
 */
function do_etfw_body_classes( $classes ) {

	// WSNB Class
	if ( do_etfw_option( 'twitter_script' ) ) {
		$classes[] = 'do-etfw';
	}

	return $classes;
}
add_filter( 'body_class', 'do_etfw_body_classes' );