Wordpress Functions.php Dosyası İçin Faydalı Kodlar #1 [TR] Useful Codes for Wordpress Functions.php File # 1 [EN]

in #utopian-io7 years ago (edited)

Wordpress Functions.php Dosyası İçin Faydalı Kodlar #1 [TR] Useful Codes for Wordpress Functions.php File # 1 [EN]

Hello friends.
I will show you how to add a few features to the Functions.php file in your WordPress theme file.
Useful Codes for Wordpress Functions.php File # 1

Wordpress temaları Functions.php dosyası ile beraber gelir. Bu dosya bir eklenti niteliğindedir ve wordpresste bu dosya ile güzel işler ortaya çıkarabilirsiniz. Bu yazımda sizlere Wordpress Functions.php dosyanız için bazı ek özellikler göstereceğim.
Functions.php nedir?
Functions.php dosyası Wordpressin ücretli ve ücretsiz temalarıyla beraber gelen bir fonsiyon dosyasıdır.bu dosyanın amacı tema işlevlerini ve fonsiyonları kontrol edebilmektir.kendiniz özel kodlar ekleyebilrsiniz. Bu dosya bi nevi eklenti niteliği görmektedir. Eklediğiniz kodlar ile wordpress üzerinde küçük çaplı eklenti eklemiş olursunuz.
Functions.php dosyasına nasıl ulaşabilirim?
Öncelikle Functions.php dosyasına nasıl ulaşacağanı sizlere göstereceğim.
1.Yöntem Admin Panelinden Functions.php Ulaşma
• Admin paneli üzerinde “Görünüm>>Düzenleyici” sekmesini tıklıyoruz.

• Açılan sayfada öncelikle kullandığımız temayı seçiyoruz ardından Functions.php dosyasına tıklıyoruz. kodları ok işareti ile gösterdiğim alana yazıyoruz.

  1. Yöntem Serveriniz de Kurulu Olan Tema Dosyasından Functions.php Dosyasına Ulaşma
    • Yerel disk C: >>wamp>>www>>wp-connect>>Themes dizinini takip ederek kullandığınız tema dosyasının içine girerek Functions.php dosyasına ulaşablirsiniz.

• Notepad++ proğramı yardımı ile dosyanın içeriğine ulaşıp değiştirme olanağına sahip olabilirsiniz.

Functions.php dosyasına kod nasıl ekenir?
Eklemeyi dosya içerisinde etiketi arasında herhangi bir yere yapabilirsiniz. Bu eklemeler genellikle dosyanın en alt kısmına ?> tagının hemen öncesine yapılır.
Functions.php dosyasına ekleyeceğimiz 4 Özellik

1.özellik :Tüm Site Ayarlarını Görüntüleyen Gizli Yönetici Özelliklerini Etkinleştirin.
Kod:
// Tum ayarlar icin ozel idari - tum ayarlar menu baglantisi
function all_settings_link() {
add_options_page(__('All Settings'), __('All Settings'), 'administrator', 'options.php');
}
add_action('admin_menu', 'all_settings_link');

  1. özellik : Admin Paneli Giriş Logusunu Değiştirme

Kod:
// WordPress giriş sayfası logusunu değiştirme
function custom_loginlogo() {
echo ''; } add_action('login_head', 'custom_loginlogo');

  1. Özellik: WordPress Güncelleme Bildirilerini Admin Dışındaki Tüm Kullanıcılara Kapatma

Kod:
// WordPress guncelleme bildirimlerini admin kullanicilari disinda kalan kullanicilara kapat
global $user_login;
get_currentuserinfo();
if (!current_user_can('update_plugins')) { // Kullanıcının eklentiyi güncelleme yetkisi olup olmadigina bakar
add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_version_check' );" ), 2 );
add_filter( 'pre_option_update_core', create_function( '$a', "return null;" ) );
}

  1. Özellik: WordPress jQuery Dosyalarını Google CDN Üzerinden Çekme

Kod:
//jQuery Google Library
function replace_jquery() {
if (!is_admin()) {
// comment out the next two lines to load the local copy of jQuery
wp_deregister_script('jquery');
wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', false, '1.11.3');
wp_enqueue_script('jquery');
}
}
add_action('init', 'replace_jquery');


Not: 4. Özellik Wordpress v3.1 için geçerlidir.

Konuyu beğendiyseniz oylamayı unutmayın teşekkürler @habercitr

source: kod1
source:kod2
source:kod3
source: kod4



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by habercitr from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, someguy123, neoxian, followbtcnews/crimsonclad, and netuoso. The goal is to help Steemit grow by supporting Minnows and creating a social network. Please find us in the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP. Be sure to leave at least 50SP undelegated on your account.

Tesekkurler post icin
Hemen bizi aydinlaatin emek veip sagolasin baskan

@eileenbeach has voted on behalf of @minnowpond.
If you would like to recieve upvotes from minnowponds team on all your posts, simply FOLLOW @minnowpond.

            To receive an BiggerUpvote send 0.5 SBD to @minnowpond with your posts url as the memo
            To receive an BiggerUpvote and a reSteem send 1.25SBD to @minnowpond with your posts url as the memo
            To receive an upvote send 0.25 SBD to @minnowpond with your posts url as the memo
            To receive an reSteem send 0.75 SBD to @minnowpond with your posts url as the memo
            To receive an upvote and a reSteem send 1.00SBD to @minnowpond with your posts url as the memo

@ering has voted on behalf of @minnowpond.
If you would like to recieve upvotes from minnowponds team on all your posts, simply FOLLOW @minnowpond.

            To receive an BiggerUpvote send 0.5 SBD to @minnowpond with your posts url as the memo
            To receive an BiggerUpvote and a reSteem send 1.25SBD to @minnowpond with your posts url as the memo
            To receive an upvote send 0.25 SBD to @minnowpond with your posts url as the memo
            To receive an reSteem send 0.75 SBD to @minnowpond with your posts url as the memo
            To receive an upvote and a reSteem send 1.00SBD to @minnowpond with your posts url as the memo

Your contribution cannot be approved because it does not follow the Utopian Rules.

  • This does not belong into the tutorial repository and not step by step tutorial for performing actions with functions.php.
  • You must be the author of the tutorial.

You can contact us on Discord.
[utopian-moderator]

Teknoloji Haberleri ni sitemizden takip edebilirsiniz.

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 64222.70
ETH 2651.63
USDT 1.00
SBD 2.77