2 | .ttf', 'mfn-opts'), 'class' => '', ), array( 'id' => 'font-custom2-svg', 'type' => 'upload', 'title' => __('Font 2 | .svg', 'mfn-opts'), 'class' => '', ), array( 'id' => 'font-custom2-eot', 'type' => 'upload', 'title' => __('Font 2 | .eot', 'mfn-opts'), 'class' => '', ), ), ); // Translate / General -------------------------------------------- $sections['translate-general'] = array( 'title' => __('General', 'mfn-opts'), 'fields' => array( array( 'id' => 'translate', 'type' => 'switch', 'title' => __('Enable Translate', 'mfn-opts'), 'desc' => __('Turn it off if you want to use .mo .po files for more complex translation', 'mfn-opts'), 'options' => array('1' => 'On','0' => 'Off'), 'std' => '1' ), array( 'id' => 'translate-info', 'type' => 'info', 'title' => '', 'desc' => __('The fields must be filled out if you are using WPML String Translation
If you are using the English language, you can also use this tab to change some texts', 'mfn-opts'), 'class' => 'mfn-info desc', ), array( 'id' => 'translate-search-placeholder', 'type' => 'text', 'title' => __('Search Placeholder', 'mfn-opts'), 'desc' => __('Search Form', 'mfn-opts'), 'std' => 'Enter your search', 'class' => 'small-text', ), array( 'id' => 'translate-search-results', 'type' => 'text', 'title' => __('results found for:', 'mfn-opts'), 'desc' => __('Search Results', 'mfn-opts'), 'std' => 'results found for:', 'class' => 'small-text', ), array( 'id' => 'translate-home', 'type' => 'text', 'title' => __('Home', 'mfn-opts'), 'desc' => __('Breadcrumbs', 'mfn-opts'), 'std' => 'Home', 'class' => 'small-text', ), array( 'id' => 'translate-prev', 'type' => 'text', 'title' => __('Prev page', 'mfn-opts'), 'desc' => __('Pagination', 'mfn-opts'), 'std' => 'Prev page', 'class' => 'small-text', ), array( 'id' => 'translate-next', 'type' => 'text', 'title' => __('Next page', 'mfn-opts'), 'desc' => __('Pagination', 'mfn-opts'), 'std' => 'Next page', 'class' => 'small-text', ), array( 'id' => 'translate-load-more', 'type' => 'text', 'title' => __('Load more', 'mfn-opts'), 'desc' => __('Pagination', 'mfn-opts'), 'std' => 'Load more', 'class' => 'small-text', ), array( 'id' => 'translate-wpml-no', 'type' => 'text', 'title' => __('No translations available for this page', 'mfn-opts'), 'desc' => __('WPML Languages Menu', 'mfn-opts'), 'std' => 'No translations available for this page', ), array( 'id' => 'translate-info-items', 'type' => 'info', 'title' => '', 'desc' => __('Items Builder items and shortcodes', 'mfn-opts'), 'class' => 'mfn-info', ), array( 'id' => 'translate-before', 'type' => 'text', 'title' => __('Before', 'mfn-opts'), 'desc' => __('Before After', 'mfn-opts'), 'std' => 'Before', 'class' => 'small-text', ), array( 'id' => 'translate-after', 'type' => 'text', 'title' => __('After', 'mfn-opts'), 'desc' => __('Before After', 'mfn-opts'), 'std' => 'After', 'class' => 'small-text', ), array( 'id' => 'translate-days', 'type' => 'text', 'title' => __('Days', 'mfn-opts'), 'desc' => __('Countdown', 'mfn-opts'), 'std' => 'days', 'class' => 'small-text', ), array( 'id' => 'translate-hours', 'type' => 'text', 'title' => __('Hours', 'mfn-opts'), 'desc' => __('Countdown', 'mfn-opts'), 'std' => 'hours', 'class' => 'small-text', ), array( 'id' => 'translate-minutes', 'type' => 'text', 'title' => __('Minutes', 'mfn-opts'), 'desc' => __('Countdown', 'mfn-opts'), 'std' => 'minutes', 'class' => 'small-text', ), array( 'id' => 'translate-seconds', 'type' => 'text', 'title' => __('Seconds', 'mfn-opts'), 'desc' => __('Countdown', 'mfn-opts'), 'std' => 'seconds', 'class' => 'small-text', ), ), ); // Translate / Blog -------------------------------------------- $sections['translate-blog'] = array( 'title' => __('Blog & Portfolio', 'mfn-opts'), 'fields' => array( array( 'id' => 'translate-filter', 'type' => 'text', 'title' => __('Filter by', 'mfn-opts'), 'desc' => __('Blog, Portfolio', 'mfn-opts'), 'std' => 'Filter by', 'class' => 'small-text', ), array( 'id' => 'translate-tags', 'type' => 'text', 'title' => __('Tags', 'mfn-opts'), 'desc' => __('Blog', 'mfn-opts'), 'std' => 'Tags', 'class' => 'small-text', ), array( 'id' => 'translate-authors', 'type' => 'text', 'title' => __('Authors', 'mfn-opts'), 'desc' => __('Blog', 'mfn-opts'), 'std' => 'Authors', 'class' => 'small-text', ), array( 'id' => 'translate-all', 'type' => 'text', 'title' => __('Show all', 'mfn-opts'), 'desc' => __('Blog, Portfolio', 'mfn-opts'), 'std' => 'Show all', 'class' => 'small-text', ), array( 'id' => 'translate-item-all', 'type' => 'text', 'title' => __('All', 'mfn-opts'), 'desc' => __('Blog Item, Portfolio Item', 'mfn-opts'), 'std' => 'All', 'class' => 'small-text', ), array( 'id' => 'translate-published', 'type' => 'text', 'title' => __('Published by', 'mfn-opts'), 'desc' => __('Blog, Portfolio', 'mfn-opts'), 'std' => 'Published by', 'class' => 'small-text', ), array( 'id' => 'translate-at', 'type' => 'text', 'title' => __('at', 'mfn-opts'), 'sub_desc' => __('Published by .. at', 'mfn-opts'), 'desc' => __('Blog, Portfolio', 'mfn-opts'), 'std' => 'at', 'class' => 'small-text', ), array( 'id' => 'translate-categories', 'type' => 'text', 'title' => __('Categories', 'mfn-opts'), 'desc' => __('Blog, Portfolio', 'mfn-opts'), 'std' => 'Categories', 'class' => 'small-text', ), array( 'id' => 'translate-tags', 'type' => 'text', 'title' => __('Tags', 'mfn-opts'), 'desc' => __('Blog', 'mfn-opts'), 'std' => 'Tags', 'class' => 'small-text', ), array( 'id' => 'translate-readmore', 'type' => 'text', 'title' => __('Read more', 'mfn-opts'), 'desc' => __('Blog, Portfolio', 'mfn-opts'), 'std' => 'Read more', 'class' => 'small-text', ), array( 'id' => 'translate-like', 'type' => 'text', 'title' => __('Do you like it?', 'mfn-opts'), 'desc' => __('Blog', 'mfn-opts'), 'std' => 'Do you like it?', 'class' => 'small-text', ), array( 'id' => 'translate-related', 'type' => 'text', 'title' => __('Related posts', 'mfn-opts'), 'desc' => __('Blog, Portfolio', 'mfn-opts'), 'std' => 'Related posts', 'class' => 'small-text', ), array( 'id' => 'translate-client', 'type' => 'text', 'title' => __('Client', 'mfn-opts'), 'desc' => __('Portfolio', 'mfn-opts'), 'std' => 'Client', 'class' => 'small-text', ), array( 'id' => 'translate-date', 'type' => 'text', 'title' => __('Date', 'mfn-opts'), 'desc' => __('Portfolio', 'mfn-opts'), 'std' => 'Date', 'class' => 'small-text', ), array( 'id' => 'translate-website', 'type' => 'text', 'title' => __('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' );