HEX
Server: Apache
System: Linux webd003.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: slyfwmm (169339)
PHP: 8.1.34
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/slyfwmm/foar/wp-content/themes/flexfit/framework/functions/meta-box.php
<?php
/**
 * Registering meta boxes
 *
 * All the definitions of meta boxes are listed below with comments.
 * Please read them CAREFULLY.
 *
 * You also should read the changelog to know what has been changed before updating.
 *
 * For more information, please visit:
 * @link http://www.deluxeblogtips.com/meta-box/docs/define-meta-boxes
 */

/********************* META BOX DEFINITIONS ***********************/

/**
 * Prefix of meta keys (optional)
 * Use underscore (_) at the beginning to make keys hidden
 * Alt.: You also can make prefix empty to disable it
 */
// Better has an underscore as last sign
$prefix = 'minti_';

global $meta_boxes;

$meta_boxes = array();

/* ----------------------------------------------------- */
// Background Styling
/* ----------------------------------------------------- */

$meta_boxes[] = array(
	'id' => 'styling',
	'title' => 'Background Styling Options',
	'pages' => array( 'post', 'page', 'project' ),
	'context' => 'normal',
	'priority' => 'high',

	// List of meta fields
	'fields' => array(
		array(
			'name'	=> 'Background image',
			'desc'	=> 'Choose your background-image for this page.',
			'id'		=> "{$prefix}bgimage",
			'type'	=> 'plupload_image',
			'max_file_uploads' => 1,
		),
		array(
			'name'		=> 'Background Repeat',
			'id'		=> "{$prefix}bgrepeat",
			'type'		=> 'select',
			'options'	=> array(
				'stretch'		=> 'stretch image',
				'repeat'		=> 'repeat',
				'no-repeat'		=> 'no-repeat',
				'repeat-x'		=> 'repeat-x',
				'repeat-y'		=> 'repeat-y'
			),
			'multiple'	=> false,
			'std'		=> array( 'stretch' )
		),
		array(
			'name'		=> 'Background Position',
			'id'		=> "{$prefix}bgposition",
			'desc'		=> 'Choose background position (only if background gets repeated not stretched.)',
			'type'		=> 'select',
			'options'	=> array(
				'top left'		=> 'top left',
				'top center'		=> 'top center',
				'top right'		=> 'top right',
				'center center'			=> 'center center',
				'bottom left'			=> 'bottom left',
				'bottom center'		=> 'bottom center',
				'bottom right'		=> 'bottom right'
			),
			'multiple'	=> false,
			'std'		=> array( 'top left' )
		)
	)
);

/* ----------------------------------------------------- */
// Home Slider Metabox
/* ----------------------------------------------------- */
$meta_boxes[] = array(
	'id' => 'home_slider',
	'title' => 'Slide Layout',
	'pages' => array( 'home_slider' ),
	'context' => 'normal',

	'fields' => array(
	
		array(
			'name'		=> 'Short Caption (for Mobile Devices)',
			'desc'		=> 'This Caption will be shown on Tablets & Smartphones.',
			'id'		=> $prefix . 'slide_shortdescription',
			'type'		=> 'textarea',
			'std'		=> "",
			'cols'		=> "40",
			'rows'		=> "10"
		),		
		array(
			'name'		=> 'Slide Layout',
			'id'		=> $prefix . 'slidelayout',
			'desc'		=> 'Choose which layout this slide should have.',
			'type'		=> 'select',
			'options'	=> array(
				'option1'		=> 'Image only (no Caption)',
				'option2'		=> 'Bottom Caption',
				'option3'		=> 'Left Caption',
				'option4'		=> 'Right Caption',
				'option5'		=> 'Text only (no Image)',
				'option6'		=> 'Video ID'
			),
			'multiple'	=> false,
			'std'		=> array( 'option 1' )
		),
		array(
			'name'		=> 'Caption Skin',
			'id'		=> $prefix . 'slideskin',
			'desc'		=> 'Choose which which skin color you prefer for the caption (not for HTML Mode)',
			'type'		=> 'select',
			'options'	=> array(
				'option1'		=> 'Dark Caption',
				'option2'		=> 'Light Caption',
			),
			'multiple'	=> false,
			'std'		=> array( 'option1' )
		)
	)
);

/* ----------------------------------------------------- */
// Project Info Metabox
/* ----------------------------------------------------- */
$meta_boxes[] = array(
	'id' => 'project_info',
	'title' => 'Project Information',
	'pages' => array( 'project' ),
	'context' => 'normal',

	'fields' => array(
		
		array(
			'name'		=> 'Short Project Description',
			'desc'		=> 'Very Short Description (will be shown on project overview page & home page)',
			'id'		=> $prefix . 'description',
			'type'		=> 'textarea',
			'std'		=> "",
			'cols'		=> "40",
			'rows'		=> "1"
		),
	
		// TEXT
		array(
			'name'		=> 'Project link',
			'id'		=> $prefix . 'link',
			'desc'		=> 'URL to the Project if available (Do not forget the http://)',
			'clone'		=> false,
			'type'		=> 'text',
			'std'		=> ''
		),
		array(
			'name'		=> 'Enable Lightbox',
			'id'		=> $prefix . 'lightbox',
			'desc'		=> 'Enable Lightbox on project overview page & home page',
			'type'		=> 'select',
			'options'	=> array(
				'no'		=> 'No',
				'yes'		=> 'Yes'
			),
			'multiple'	=> false,
			'std'		=> array( 'no' )
		),
	)
);

/* ----------------------------------------------------- */
// Project Slides Metabox
/* ----------------------------------------------------- */
$meta_boxes[] = array(
	'id'		=> 'project_slides',
	'title'		=> 'Project Slides',
	'pages'		=> array( 'project' ),
	'context' => 'normal',

	'fields'	=> array(
		array(
			'name'	=> 'Project Slider Images',
			'desc'	=> 'Upload up to 20 project images for a slideshow - or only one to display a single image.',
			'id'	=> $prefix . 'screenshot',
			'type'	=> 'plupload_image',
			'max_file_uploads' => 20,
		)
		
	)
);

/* ----------------------------------------------------- */
// Project Video Metabox
/* ----------------------------------------------------- */
$meta_boxes[] = array(
	'id'		=> 'project_video',
	'title'		=> 'Project Video',
	'pages'		=> array( 'project' ),
	'context' => 'normal',

	'fields'	=> array(
		array(
			'name'		=> 'Video Source',
			'id'		=> $prefix . 'source',
			'type'		=> 'select',
			'options'	=> array(
				'youtube'		=> 'Youtube',
				'vimeo'			=> 'Vimeo',
				'own'			=> 'Own Embed Code'
			),
			'multiple'	=> false,
			'std'		=> array( 'no' )
		),
		array(
			'name'	=> 'Video URL or own Embedd Code',
			'id'	=> $prefix . 'embed',
			'desc'	=> 'Just paste the ID of the video (E.g. http://www.youtube.com/watch?v=<strong>GUEZCxBcM78</strong>) you want to show, or insert own Embed Code. <br />This will show the Video <strong>INSTEAD</strong> of the Image Slider.<br /> Make Sure the width is about 610px',
			'type' 	=> 'textarea',
			'std' 	=> "",
			'cols' 	=> "40",
			'rows' 	=> "8"
		)
	)
);

/* ----------------------------------------------------- */

/*
// 2nd meta box
$meta_boxes[] = array(
	'id'		=> 'additional',
	'title'		=> 'Additional Information',
	'pages'		=> array( 'post', 'film', 'project' ),

	'fields'	=> array(
		// WYSIWYG/RICH TEXT EDITOR
		array(
			'name'	=> 'Your thoughts about Deluxe Blog Tips',
			'id'	=> "{$prefix}thoughts",
			'type'	=> 'wysiwyg',
			'std'	=> "It's great!",
			'desc'	=> 'Do you think so?'
		),
		// FILE UPLOAD
		array(
			'name'	=> 'Upload your source code',
			'desc'	=> 'Any modified code, or extending code',
			'id'	=> "{$prefix}code",
			'type'	=> 'file'
		),
		// IMAGE UPLOAD
		array(
			'name'	=> 'Screenshots',
			'desc'	=> 'Screenshots of problems, warnings, etc.',
			'id'	=> "{$prefix}screenshot",
			'type'	=> 'image'
		),
		// PLUPLOAD IMAGE UPLOAD (WP 3.3+)
		array(
			'name'	=> 'Screenshots (plupload)',
			'desc'	=> 'Screenshots of problems, warnings, etc.',
			'id'	=> "{$prefix}screenshot2",
			'type'	=> 'plupload_image',
			'max_file_uploads' => 1,
		),
		// THICKBOX IMAGE UPLOAD (WP 3.3+)
		array(
			'name'	=> 'Screenshots (thickbox upload)',
			'desc'	=> 'Screenshots of problems, warnings, etc.',
			'id'	=> "{$prefix}screenshot3",
			'type'	=> 'thickbox_image',
		)
	)
);

// 3rd meta box
$meta_boxes[] = array(
	'id'		=> 'survey',
	'title'		=> 'Survey',
	'pages'		=> array( 'post', 'slider', 'project' ),

	'fields'	=> array(
		// COLOR
		array(
			'name'		=> 'Your favorite color',
			'id'		=> "{$prefix}color",
			'type'		=> 'color'
		),
		// CHECKBOX LIST
		array(
			'name'		=> 'Your hobby',
			'id'		=> "{$prefix}hobby",
			'type'		=> 'checkbox_list',
			// Options of checkboxes, in format 'key' => 'value'
			'options'	=> array(
				'reading'	=> 'Books',
				'sport'		=> 'Gym, Boxing'
			),
			'desc'		=> 'What do you do in free time?'
		),
		// TIME
		array(
			'name'		=> 'When do you get up?',
			'id'		=> "{$prefix}getdown",
			'type'		=> 'time',
			// Time format, default hh:mm. Optional. @link See: http://goo.gl/hXHWz
			'format'	=> 'hh:mm:ss'
		),
		// DATETIME
		array(
			'name'		=> 'When were you born?',
			'id'		=> "{$prefix}born_time",
			'type'		=> 'datetime',
			// Time format, default hh:mm. Optional. @link See: http://goo.gl/hXHWz
			'format'	=> 'hh:mm:ss'
		),
		// TAXONOMY
		array(
			'name'    => 'Categories',
			'id'      => "{$prefix}cats",
			'type'    => 'taxonomy',
			'options' => array(
				// Taxonomy name
				'taxonomy'	=> 'category',
				// How to show taxonomy: 'checkbox_list' (default) or 'checkbox_tree', 'select_tree' or 'select'. Optional
				'type'		=> 'select_tree',
				// Additional arguments for get_terms() function. Optional
				'args'		=> array()
			),
			'desc'		=> 'Choose One Category'
		)
	)
);

*/

/********************* META BOX REGISTERING ***********************/

/**
 * Register meta boxes
 *
 * @return void
 */
function YOUR_PREFIX_register_meta_boxes()
{
	global $meta_boxes;

	// Make sure there's no errors when the plugin is deactivated or during upgrade
	if ( class_exists( 'RW_Meta_Box' ) )
	{
		foreach ( $meta_boxes as $meta_box )
		{
			new RW_Meta_Box( $meta_box );
		}
	}
}
// Hook to 'admin_init' to make sure the meta box class is loaded before
// (in case using the meta box class in another plugin)
// This is also helpful for some conditionals like checking page template, categories, etc.
add_action( 'admin_init', 'YOUR_PREFIX_register_meta_boxes' );