| Server IP : 93.115.150.27 / Your IP : 216.73.216.221 Web Server : LiteSpeed System : Linux host2.azar.host 4.18.0-553.80.1.lve.el8.x86_64 #1 SMP Wed Oct 22 19:29:36 UTC 2025 x86_64 User : dorfakkh ( 1797) PHP Version : 8.1.34 Disable Function : show_source, system, passthru, exec, popen, proc_open, mail MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/dorfakkh/public_html/wp-content/themes/dorfakkhabar/tabnakweb/ |
Upload File : |
<?php
add_action('init','of_options');
define('Options_Name', 'تنظیمات پوسته');
if (!function_exists('of_options')) {
function of_options(){
$shortname = "tabnakweb";
$themename = 'قالب من';
$mrjthemedir = get_template_directory_uri();
$prefix = 'tabnakweb_';
//Populate the options array
global $tt_options;
$tt_options = get_option('of_options');
$tt_pages = array();
$tt_pages_obj = get_pages('sort_column=post_parent,menu_order');
foreach ($tt_pages_obj as $tt_page) {
$tt_pages[$tt_page->ID] = $tt_page->post_title;
}
$select_a_page = array("select_a_page" => "برگه ای را انتخاب کنید:");
$wp_pages = $select_a_page + $tt_pages;
$tt_posts = array();
$tt_posts_obj = get_posts('numberposts=30');
foreach ($tt_posts_obj as $tt_post) {
$tt_posts[$tt_post->ID] = $tt_post->post_title;
}
$select_a_post = array("select_a_post" => "نوشته ای را انتخاب کنید:");
$wp_posts = $select_a_post + $tt_posts;
$tt_categories = array();
$tt_categories_obj = get_categories('hide_empty=0');
foreach ($tt_categories_obj as $tt_cat) {
$tt_categories[$tt_cat->cat_ID] = $tt_cat->cat_name;
}
$select_a_cat = array('selec_a_category'=>'دسته ای را انتخاب کنید:');
$wp_categories = $select_a_cat + $tt_categories;
//Folder Paths for "type" => "images"
$sampleurl = get_template_directory_uri() . '/admin/images/sample-layouts/';
$options = array(); // این خط را حذف نکنید
/////////////////////////////////////////////// تنظیمات از این جا به بعد قرار گیرند ///////////////////////////////////////
/* Option Page 1 - All Options */
$options[] = array(
"name" => 'تنظیمات عمومی',
"type" => "heading",
"slug" => 'tw_setting'
);
$options[] = array(
"name" => 'لوگوي سايت',
"desc" => 'حداکثر عرض 400',
"id" => $prefix."logo",
"std" => $mrjthemedir.'/images/logo.png',
"type" => "image_upload"
);
$options[] = array(
"name" => 'فاوآیکون',
"desc" => 'از این قسمت می توانید آیکون سایت خود را آپلود نمایید ، این آیکون می تواند با فرمت png یا gif و یا فرمت رایج آیکون یعنی ico باشد .',
"id" => $prefix."favicon",
"std" => $mrjthemedir.'/images/fav.png',
"type" => "image_upload"
);
$options[] = array(
"name" => 'کلمات کلیدی',
"desc" => "برای جداسازی از ( , ) در حالت صفحه کلید انگلیسی استفاده کنید",
"id" => $prefix."keywords",
"std" => "وب سايت ,تابناك وب, خبر ",
"type" => "textarea"
);
$options[] = array(
"name" => 'كپي رايت پاشنه سايت',
"desc" => "محل كپي رايت شما",
"id" => $prefix."copyright",
"std" => "تمامی حقوق برای پایگاه اطلاع رسانی من محفوظ می باشد.",
"type" => "text"
);
$options[] = array(
"name" => 'لوگوي پاشنه راست',
"desc" => 'حداکثر عرض 400',
"id" => $prefix."flogo",
"std" => $mrjthemedir.'/images/flogo.png',
"type" => "image_upload"
);
$options[] = array(
"name" => 'لوگوي پاشنه چپ',
"desc" => 'حداکثر عرض 400',
"id" => $prefix."flogoleft",
"std" => $mrjthemedir.'/images/flogoleft.png',
"type" => "image_upload"
);
$options[] = array(
"name" => 'تصوير لوگوي صفحه پرينت',
"desc" => 'حداکثر عرض 400',
"id" => $prefix."logop",
"std" => $mrjthemedir.'/images/logop.png',
"type" => "image_upload"
);
//================================================ social-network
$options[] = array(
"name" => 'شبكه هاي اجتماعي',
"type" => "heading",
"slug" => 'tw_social'
);
$options[] = array(
"name" => 'گوگل پلاس',
"desc" => "درج لينك",
"id" => $prefix."plus",
"std" => "#",
"type" => "text"
);
$options[] = array(
"name" => 'آپارات ',
"desc" => "درج لينك",
"id" => $prefix."aparat",
"std" => "#",
"type" => "text"
);
$options[] = array(
"name" => 'فيس بوك',
"desc" => "درج لينك",
"id" => $prefix."fb",
"std" => "#",
"type" => "text"
);
$options[] = array(
"name" => 'تلگرام',
"desc" => "درج لينك",
"id" => $prefix."telegram",
"std" => "#",
"type" => "text"
);
//================================================ special
$options[] = array(
"name" => 'تيتر يك',
"type" => "heading",
"slug" => 'tw_specialpro'
);
$options[] = array(
"name" => 'بلوك تيتر يك',
"desc" => 'انتخاب دسته بندی',
"id" => $prefix."specialcat",
"std" => "1",
"type" => "select",
"options" => $wp_categories
);
$options[] = array(
"desc" => 'تعداد پست',
"id" => $prefix."specialcount",
"std" => "3",
"type" => "text"
);
//================================================ news
$options[] = array(
"name" => 'عناوين اخبار',
"type" => "heading",
"slug" => 'tw_newspro'
);
$options[] = array(
"name" => 'بلوک اخبار',
"desc" => 'انتخاب دسته بندی',
"id" => $prefix."newscat",
"std" => "1",
"type" => "select",
"options" => $wp_categories
);
$options[] = array(
"desc" => 'تعداد اخبار',
"id" => $prefix."newscount",
"std" => "11",
"type" => "text"
);
//================================================ gallery
$options[] = array(
"name" => 'گالري',
"type" => "heading",
"slug" => 'tw_galleryblocks'
);
$options[] = array(
"name" => 'بلوک شماره يك',
"desc" => 'عنوان بلوک',
"id" => $prefix."gallerytitle",
"std" => "گزارش تصویری",
"type" => "text"
);
$options[] = array(
"desc" => 'انتخاب دسته بندي',
"id" => $prefix."gallerycat",
"std" => "1",
"type" => "select",
"options" => $wp_categories
);
$options[] = array(
"desc" => 'تعداد',
"id" => $prefix."gallerycount",
"std" => "4",
"type" => "text"
);
//================================================ sardab
$options[] = array(
"name" => 'بلوك انتخاب سردبير',
"type" => "heading",
"slug" => 'tw_sardabblocks'
);
$options[] = array(
"name" => 'بلوک شماره يك',
"desc" => 'عنوان بلوک',
"id" => $prefix."sardabtitle",
"std" => "پيشنهاد سردبير",
"type" => "text"
);
$options[] = array(
"desc" => 'انتخاب دسته بندی',
"id" => $prefix."sardabcat",
"std" => "1",
"type" => "select",
"options" => $wp_categories
);
$options[] = array(
"desc" => 'تعداد',
"id" => $prefix."sardabcount",
"std" => "4",
"type" => "text"
);
//================================================ rightblocks
$options[] = array(
"name" => 'بلوك هاي كناري',
"type" => "heading",
"slug" => 'tw_rightblocks'
);
$options[] = array(
"name" => 'بلوک شماره يك',
"desc" => 'عنوان بلوک',
"id" => $prefix."rightblock1title",
"std" => "يادداشت",
"type" => "text"
);
$options[] = array(
"desc" => 'انتخاب دسته بندي',
"id" => $prefix."rightblock1cat",
"std" => "1",
"type" => "select",
"options" => $wp_categories
);
$options[] = array(
"desc" => 'تعداد',
"id" => $prefix."rightblock1count",
"std" => "4",
"type" => "text"
);
$options[] = array(
"name" => 'بلوک شماره دو',
"desc" => 'عنوان بلوک',
"id" => $prefix."rightblock2title",
"std" => "مصاحبه",
"type" => "text"
);
$options[] = array(
"desc" => 'انتخاب دسته بندي',
"id" => $prefix."rightblock2cat",
"std" => "1",
"type" => "select",
"options" => $wp_categories
);
$options[] = array(
"desc" => 'تعداد',
"id" => $prefix."rightblock2count",
"std" => "4",
"type" => "text"
);
$options[] = array(
"name" => 'بلوک شماره سه',
"desc" => 'عنوان بلوک',
"id" => $prefix."rightblock3title",
"std" => "سخن روز",
"type" => "text"
);
$options[] = array(
"desc" => 'انتخاب دسته بندي',
"id" => $prefix."rightblock3cat",
"std" => "1",
"type" => "select",
"options" => $wp_categories
);
$options[] = array(
"desc" => 'تعداد',
"id" => $prefix."rightblock3count",
"std" => "4",
"type" => "text"
);
//================================================ ads
$options[] = array(
"name" => 'مديريت تبليغات',
"type" => "heading",
"slug" => 'tw_ads'
);
//==============زير اخبار
$options[] = array(
"name" => 'بنر سربرگ',
"desc" => "آپلود عکس / سایز : عرض 140پيكسل",
"id" => $prefix."contentheader-adsimg",
"std" => $mrjthemedir.'/images/ads.jpg',
"type" => "image_upload"
);
$options[] = array(
"desc" => "عنوان - alt و title",
"id" => $prefix."contentheader-adstitle",
"std" => "تابناك وب",
"type" => "text"
);
$options[] = array(
"desc" => "لینک",
"id" => $prefix."contentheader-adslink",
"std" => "http://tabnakweb.ir",
"type" => "text"
);
$options[] = array(
"name" => 'بنر كناري',
"desc" => "آپلود عکس / سایز : عرض 140پيكسل",
"id" => $prefix."contentads1img",
"std" => $mrjthemedir.'/images/120x240.gif',
"type" => "image_upload"
);
$options[] = array(
"desc" => "عنوان - alt و title",
"id" => $prefix."contentads1title",
"std" => "تابناك وب",
"type" => "text"
);
$options[] = array(
"desc" => "لینک",
"id" => $prefix."contentads1link",
"std" => "http://karinkala.com/",
"type" => "text"
);
//==============2
$options[] = array(
"name" => 'بنر كناري',
"desc" => "آپلود عکس / سایز : عرض 140پيكسل",
"id" => $prefix."contentads2img",
"std" => $mrjthemedir.'/images/120x240sample.jpg',
"type" => "image_upload"
);
$options[] = array(
"desc" => "عنوان - alt و title",
"id" => $prefix."contentads2title",
"std" => "تابناك وب",
"type" => "text"
);
$options[] = array(
"desc" => "لینک",
"id" => $prefix."contentads2link",
"std" => "http://tabnakweb.ir",
"type" => "text"
);
//==============3
$options[] = array(
"name" => 'بنر كناري',
"desc" => "آپلود عکس / سایز : عرض 140پيكسل",
"id" => $prefix."contentads3img",
"std" => $mrjthemedir.'/images/tabnakweb.gif',
"type" => "image_upload"
);
$options[] = array(
"desc" => "عنوان - alt و title",
"id" => $prefix."contentads3title",
"std" => "تابناك وب",
"type" => "text"
);
$options[] = array(
"desc" => "لینک",
"id" => $prefix."contentads3link",
"std" => "http://tabnakweb.ir",
"type" => "text"
);
//==============4
$options[] = array(
"name" => 'بنر كناري',
"desc" => "آپلود عکس / سایز : عرض 140پيكسل",
"id" => $prefix."contentads4img",
"std" => $mrjthemedir.'/images/120x240sample.jpg',
"type" => "image_upload"
);
$options[] = array(
"desc" => "عنوان - alt و title",
"id" => $prefix."contentads4title",
"std" => "تابناك وب",
"type" => "text"
);
$options[] = array(
"desc" => "لینک",
"id" => $prefix."contentads4link",
"std" => "http://tabnakweb.ir",
"type" => "text"
);
//==============4
$options[] = array(
"name" => 'بنر كناري',
"desc" => "آپلود عکس / سایز : عرض 140پيكسل",
"id" => $prefix."contentads5img",
"std" => $mrjthemedir.'/images/120x240sample.jpg',
"type" => "image_upload"
);
$options[] = array(
"desc" => "عنوان - alt و title",
"id" => $prefix."contentads5title",
"std" => "تابناك وب",
"type" => "text"
);
$options[] = array(
"desc" => "لینک",
"id" => $prefix."contentads5link",
"std" => "http://tabnakweb.ir",
"type" => "text"
);
//==============4
$options[] = array(
"name" => 'بنر كناري',
"desc" => "آپلود عکس / سایز : عرض 140پيكسل",
"id" => $prefix."contentads6img",
"std" => $mrjthemedir.'/images/120x240sample.jpg',
"type" => "image_upload"
);
$options[] = array(
"desc" => "عنوان - alt و title",
"id" => $prefix."contentads6title",
"std" => "تابناك وب",
"type" => "text"
);
$options[] = array(
"desc" => "لینک",
"id" => $prefix."contentads6link",
"std" => "http://tabnakweb.ir",
"type" => "text"
);
//==============7
$options[] = array(
"name" => 'بنر كناري',
"desc" => "آپلود عکس / سایز : عرض 140پيكسل",
"id" => $prefix."contentads7img",
"std" => $mrjthemedir.'/images/ads2.jpg',
"type" => "image_upload"
);
$options[] = array(
"desc" => "عنوان - alt و title",
"id" => $prefix."contentads7title",
"std" => "فروشگاه اینترنتی کارین کالا",
"type" => "text"
);
$options[] = array(
"desc" => "لینک",
"id" => $prefix."contentads7link",
"std" => "http://karinkala.com/",
"type" => "text"
);
//==============8
$options[] = array(
"name" => 'بنر كناري',
"desc" => "آپلود عکس / سایز : عرض 140پيكسل",
"id" => $prefix."contentads8img",
"std" => $mrjthemedir.'/images/ads3.jpg',
"type" => "image_upload"
);
$options[] = array(
"desc" => "عنوان - alt و title",
"id" => $prefix."contentads8title",
"std" => "فروشگاه اینترنتی کارین کالا",
"type" => "text"
);
$options[] = array(
"desc" => "لینک",
"id" => $prefix."contentads8link",
"std" => "http://karinkala.com/",
"type" => "text"
);
//==============9
$options[] = array(
"name" => 'بنر كناري',
"desc" => "آپلود عکس / سایز : عرض 140پيكسل",
"id" => $prefix."contentads9img",
"std" => $mrjthemedir.'/images/ads4.jpg',
"type" => "image_upload"
);
$options[] = array(
"desc" => "عنوان - alt و title",
"id" => $prefix."contentads9title",
"std" => "فروشگاه اینترنتی کارین کالا",
"type" => "text"
);
$options[] = array(
"desc" => "لینک",
"id" => $prefix."contentads9link",
"std" => "http://karinkala.com/",
"type" => "text"
);
////////////////////////////////////////// پایان تنظیمات //////////////////////////////////////////////////
update_option('of_template',$options);
update_option('of_themename',$themename);
update_option('of_shortname',$shortname);
return $options;
}
}
?>