| Server IP : 188.130.25.202 / Your IP : 216.73.216.134 Web Server : Apache System : Linux mutu11105.phpnet.org 6.1.0-51-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.177-1 (2026-07-16) x86_64 User : apren ( 41742) PHP Version : 7.4.33-security-e058b01e1b Disable Function : pcntl_exec,symlink,passthru,socket_listen,link,shell_exec,popen,dl,exec,system,virtual,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,symlink,link,syslog,putenv,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /web6/apren/www/ELC/admin/functions/ |
Upload File : |
<?php
/**
* SMOF Admin
*
* @package WordPress
* @subpackage SMOF
* @since 1.4.0
* @author Syamil MJ
*/
/**
* Head Hook
*
* @since 1.0.0
*/
function of_head() { do_action( 'of_head' ); }
/**
* Add default options upon activation else DB does not exist
*
* @since 1.0.0
*/
function of_option_setup()
{
global $of_options, $options_machine;
$options_machine = new Options_Machine($of_options);
if (!get_option(OPTIONS))
{
update_option(OPTIONS,$options_machine->Defaults);
}
}
/**
* Change activation message
*
* @since 1.0.0
*/
function optionsframework_admin_message() {
//Tweaked the message on theme activate
?>
<script type="text/javascript">
jQuery(function(){
var message = '<p>This theme comes with an <a href="<?php echo admin_url('admin.php?page=optionsframework'); ?>">options panel</a> to configure settings. This theme also supports widgets, please visit the <a href="<?php echo admin_url('widgets.php'); ?>">widgets settings page</a> to configure them.</p>';
jQuery('.themes-php #message2').html(message);
});
</script>
<?php
}
/**
* Get header classes
*
* @since 1.0.0
*/
function of_get_header_classes_array()
{
global $of_options;
foreach ($of_options as $value)
{
if ($value['type'] == 'heading')
$hooks[] = str_replace(' ','',strtolower($value['name']));
}
return $hooks;
}
// Generate custom styles file
function generate_options_css($newdata) {
$sd_data = $newdata;
$css_dir = get_stylesheet_directory() . '/framework/css/'; // Shorten code, save 1 call
ob_start(); // Capture all output (output buffering)
require($css_dir . 'custom-styles.php'); // Generate CSS
$css = ob_get_clean(); // Get generated CSS (output buffering)
file_put_contents($css_dir . 'custom-styles.css', $css, LOCK_EX); // Save it
}
/**
* For use in themes
*
* @since forever
*/
$sd_data = get_option(OPTIONS);