<?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/
 */
/********************* 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 = '';
global $meta_boxes1;
$meta_boxes1 = array();
// 1st meta box
$meta_boxes1[] = array(
// Meta box id, UNIQUE per meta box. Optional since 4.1.5
'id' => 'themeinfoin',
// Meta box title - Will appear at the drag and drop handle bar. Required.
'title' => 'زمینه دلخواه نمونه کار ها',
// Post types, accept custom post types as well - DEFAULT is array('post'). Optional.
'pages' => array( 'nemone' ),
// Where the meta box appear: normal (default), advanced, side. Optional.
'context' => 'normal',
// Order of meta box: high (default), low. Optional.
'priority' => 'high',
// List of meta fields
'fields' => array(
array(
// Field name - Will be used as label
'name'  => 'تصویر پروژه',
// Field ID, i.e. the meta key
'id'    => "image-p",
'type'  => 'file-input',
// Default value (optional)
'std'   => 'تصویر',

),
array(
// Field name - Will be used as label
'name'  => 'تاریخ انجام',
// Field ID, i.e. the meta key
'id'    => "time-p",
'type'  => 'text',
// Default value (optional)
'std'   => '۲۴ ابان ۹۸',

),

array(
// Field name - Will be used as label
'name'  => 'نوع و مدل',
// Field ID, i.e. the meta key
'id'    => "model-p",
'type'  => 'text',
// Default value (optional)
'std'   => 'وردپرس',

),
array(
// Field name - Will be used as label
'name'  => 'شیوه انجام',
// Field ID, i.e. the meta key
'id'    => "shive",
'type'  => 'text',
// Default value (optional)
'std'   => 'دور کاری',

),
array(
// Field name - Will be used as label
'name'  => 'قیمت پروژه',
// Field ID, i.e. the meta key
'id'    => "price-gg",
'type'  => 'text',
// Default value (optional)
'std'   => '۵۰ هزار تومان',

),
array(
// Field name - Will be used as label
'name'  => 'لینک پروژه',
// Field ID, i.e. the meta key
'id'    => "mosha",
'type'  => 'text',
// Default value (optional)
'std'   => '#',

),
array(
// Field name - Will be used as label
'name'  => 'حالت نارنجی',
// Field ID, i.e. the meta key
'id'    => "narenj",
'type'  => 'text',
// Default value (optional)
'std'   => 'غیر فعال',

),
),
);
/********************* META BOX REGISTERING ***********************/
/**
 * Register meta boxes
 *
 * @return void
 */
function wtf_register_meta_boxes1()
{
// Make sure there's no errors when the plugin is deactivated or during upgrade
if ( !class_exists( 'RW_Meta_Box' ) )
return;
global $meta_boxes1;
foreach ( $meta_boxes1 as $meta_box1 )
{
new RW_Meta_Box( $meta_box1 );
}
}
// 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', 'wtf_register_meta_boxes1' ); ?>