e' => __('Website', 'mfn-opts'), 'desc' => __('Portfolio', 'mfn-opts'), 'std' => 'Website', 'class' => 'small-text', ), array( 'id' => 'translate-view', 'type' => 'text', 'title' => __('View website', 'mfn-opts'), 'desc' => __('Portfolio', 'mfn-opts'), 'std' => 'View website', 'class' => 'small-text', ), array( 'id' => 'translate-task', 'type' => 'text', 'title' => __('Task', 'mfn-opts'), 'desc' => __('Portfolio', 'mfn-opts'), 'std' => 'Task', 'class' => 'small-text', ), ), ); // Translate Error 404 -------------------------------------------- $sections['translate-404'] = array( 'title' => __('Error 404 & Search', 'mfn-opts'), 'fields' => array( array( 'id' => 'translate-info-404', 'type' => 'info', 'title' => '', 'desc' => __('Error 404', 'mfn-opts'), 'class' => 'mfn-info', ), array( 'id' => 'translate-404-title', 'type' => 'text', 'title' => __('Title', 'mfn-opts'), 'desc' => __('Ooops... Error 404', 'mfn-opts'), 'std' => 'Ooops... Error 404', ), array( 'id' => 'translate-404-subtitle', 'type' => 'text', 'title' => __('Subtitle', 'mfn-opts'), 'desc' => __('We are sorry, but the page you are looking for does not exist.', 'mfn-opts'), 'std' => 'We are sorry, but the page you are looking for does not exist.', ), array( 'id' => 'translate-404-text', 'type' => 'text', 'title' => __('Text', 'mfn-opts'), 'desc' => __('Please check entered address and try again or', 'mfn-opts'), 'std' => 'Please check entered address and try again or ', ), array( 'id' => 'translate-404-btn', 'type' => 'text', 'title' => __('Button', 'mfn-opts'), 'desc' => __('go to homepage', 'mfn-opts'), 'std' => 'go to homepage', 'class' => 'small-text', ), array( 'id' => 'translate-info-search', 'type' => 'info', 'title' => '', 'desc' => __('Search', 'mfn-opts'), 'class' => 'mfn-info', ), array( 'id' => 'translate-search-title', 'type' => 'text', 'title' => __('Title', 'mfn-opts'), 'desc' => __('Ooops...', 'mfn-opts'), 'std' => 'Ooops...', ), array( 'id' => 'translate-search-subtitle', 'type' => 'text', 'title' => __('Subtitle', 'mfn-opts'), 'desc' => __('No results found for:', 'mfn-opts'), 'std' => 'No results found for:', ), ), ); // Translate WPML -------------------------------------------- $sections['translate-wpml'] = array( 'title' => __('WPML Installer', 'mfn-opts'), 'fields' => array( array( 'id' => 'translate-wpml-info', 'type' => 'info', 'title' => '', 'desc' => __('WPML is an optional premium plugin and it is NOT included into the theme', 'mfn-opts'), 'class' => 'mfn-info desc', ), array( 'id' => 'translate-wpml-installer', 'type' => 'custom', 'title' => __('WPML Installer', 'mfn-opts'), 'sub_desc' => __('WPML makes it easy to build multilingual sites and run them. It’s powerful enough for corporate sites, yet simple for blogs.', 'mfn-opts'), 'action' => 'wpml', ), ), ); // Custom CSS & JS ======================================================================== // CSS -------------------------------------------- $sections['css'] = array( 'title' => __('CSS', 'mfn-opts'), 'fields' => array( array( 'id' => 'custom-css', 'type' => 'textarea', 'title' => __('Custom CSS', 'mfn-opts'), 'sub_desc' => __('Paste your custom CSS code here', 'mfn-opts'), 'class' => 'custom-css', ), ), ); // JS -------------------------------------------- $sections['js'] = array( 'title' => __('JS', 'mfn-opts'), 'fields' => array( array( 'id' => 'custom-js', 'type' => 'textarea', 'title' => __('Custom JS', 'mfn-opts'), 'sub_desc' => __('Paste your custom JS code here', 'mfn-opts'), 'desc' => __('To use jQuery code wrap it into jQuery(function($){ ... });', 'mfn-opts'), ), ), ); global $MFN_Options; $MFN_Options = new MFN_Options( $menu, $sections ); } } // add_action('init', 'mfn_opts_setup', 0); mfn_opts_setup(); /** * This is used to return option value from the options array */ if( ! function_exists( 'mfn_opts_get' ) ) { function mfn_opts_get( $opt_name, $default = null ){ global $MFN_Options; return $MFN_Options->get( $opt_name, $default ); } } /** * This is used to echo option value from the options array */ if( ! function_exists( 'mfn_opts_show' ) ) { function mfn_opts_show( $opt_name, $default = null ){ global $MFN_Options; $option = $MFN_Options->get( $opt_name, $default ); if( ! is_array( $option ) ){ echo $option; } } } /** * Add new mimes for custom font upload */ if( ! function_exists( 'mfn_upload_mimes' ) ) { function mfn_upload_mimes( $existing_mimes = array() ){ $existing_mimes['woff'] = 'font/woff'; $existing_mimes['ttf'] = 'font/ttf'; $existing_mimes['svg'] = 'font/svg'; $existing_mimes['eot'] = 'font/eot'; return $existing_mimes; } } add_filter( 'upload_mimes', 'mfn_upload_mimes' );