Skip to content

Instantly share code, notes, and snippets.

View ozlemcimen's full-sized avatar

Ozlem Cimen ozlemcimen

View GitHub Profile
@ozlemcimen
ozlemcimen / woo_reorder_product_tab.php
Last active December 4, 2017 14:30
WooCommerce ürün sekmelerinin sıralamasını değiştirir.
<?php
function wolinka_reorder_tabs( $tabs ) {
$tabs['reviews']['priority'] = 1; // 1st - reviews
$tabs['description']['priority'] = 2; // 2nd - description
$tabs['additional_information']['priority'] = 3; // 3rd - Additional information third
return $tabs;
}
add_filter( 'woocommerce_product_tabs', 'wolinka_reorder_tabs', 98 );
@ozlemcimen
ozlemcimen / woo_new_add_product_tab.php
Last active December 5, 2017 07:30
WooCommerce ürün içerik sayfasına yeni sekme ekler.
<?php
function wolinka_new_add_product_tab ( $tabs ) {
// Add the new tab
$tabs['test_tab'] = array(
'title' => __( 'New Tab', 'woocommerce' ),
'priority' => 50,
'callback' => 'wolinka_new_product_tab_content'
);
return $tabs;
<?php
// Bu komut dosyasi, Cpanel yedeginizi otomatik olarak belli zaman araliklarinda ya farkli bir sunucuya ya da kendi ftp sunucunuza yedek aldirir.
// Guvenlik acisindan public_html ya da www dizinlerinde bu dosyayi bulundurmayiniz.
// Bu komut dosyasi, https://gist.github.com/nikhgupta/1071596 adresinden alinti yapilarak cozum uretilmistir.
// Cpanel Erisimi Icin Gerekli Bilgiler
$cpuser = "cpanel_kullanici_adi"; // Cpanel'e giris yapmak icin kullanilan kullanici adi
$cppass = "cpanel_sifre"; // Cpanel'e giris yapmak icin kullanilan sifre
$domain = "siteadi.com"; // Yedeklemesini yapmak istediginiz domain adi
$skin = "paper_lantern"; // Cpanel icin kullanilan tema adi. Guncel surumlerde "paper_lantern" temasi kullanilmaktadir. Eger eski versiyon cpanel kullaniyorsaniz "x" kullanilabilir. Cpanel tema secimi onemlidir, aksi halde script calismaz.
<?php
// PHP script to allow periodic cPanel backups automatically, optionally to a remote FTP server.
// This script contains passwords. KEEP ACCESS TO THIS FILE SECURE! (place it in your home dir, not /www/)
// ********* THE FOLLOWING ITEMS NEED TO BE CONFIGURED *********
// Info required for cPanel access
$cpuser = "username"; // Username used to login to CPanel
$cppass = "password"; // Password used to login to CPanel
@ozlemcimen
ozlemcimen / limit_login_attempts.php
Last active November 20, 2016 09:45
Eklentisiz WordPress Login Ataklarını Sınırlayın
/**
* CLASS LIMIT LOGIN ATTEMPTS
* Prevent Mass WordPress Login Attacks by setting locking the system when login fail.
* To be added in functions.php or as an external file.
*/
if ( ! class_exists( 'Limit_Login_Attempts' ) ) {
class Limit_Login_Attempts {
var $failed_login_limit = 3; //Giris Denemesi
var $lockout_duration = 1800; //Sureyi sn cinsinden giriniz. 30 dakika: 60*30 = 1800
var $transient_name = 'attempted_login'; //Transient used