Skip to content

Instantly share code, notes, and snippets.

View fatihtoprak's full-sized avatar
🎯
Focusing

Fatih Toprak fatihtoprak

🎯
Focusing
View GitHub Profile
<?php
/* Template Name: Holding Page */
if ( !is_user_logged_in()) {
get_template_part('holdingpage');
exit(0);
}
get_header(); ?>
<?php
//redirect subscribers to the home url
add_action( 'admin_init', 'custom_profile_redirect', 12 );
function custom_profile_redirect() {
global $current_user;
get_currentuserinfo();
if ($current_user->user_level == 0)
{
wp_redirect( home_url() ); exit;
}
$(document).ready(function() {
$.ajax({
url: "www.facebook.com/feeds/page.php?id=255576081168962&format=json",
dataType: "json",
timeout: 15000,
add_action( 'wp_enqueue_scripts', 'wptuts_enqueue_video_js' );
function wptuts_enqueue_video_js() {
if ( is_page_template( 'page-cats.php' ) )
wp_enqueue_script( 'video_js', get_template_directory_uri() . '/js/video.js', array( 'jquery' ) );
}
@fatihtoprak
fatihtoprak / no-ip.php
Created July 29, 2013 19:41
No ip for wordpress comment Author in Admin area
<?php
function hide_ip($ip) {
return ( strstr($_SERVER['PHP_SELF'], 'wp-admin/') ) ? 'hidden' : $ip;
}
add_filter('get_comment_author_IP', 'hide_ip');
?>
@fatihtoprak
fatihtoprak / gist:8235157
Last active January 2, 2016 02:09
update post meta
<?php
function save_urun_meta_price( $post_id ) {
// - Update the post's metadata.
if ( isset( $_REQUEST['urun_indirimli_fiyat'] ) ) {
$product_price = get_post_meta( $post_id, 'urun_fiyat', true );
$product_discount = of_get_option('urun_discount');
Title: Bankaadı Şube Adı Şubesi Tüm Bilgileri, İl-ilçe
Örnek: İş bankası Kadirli Şubesi Tüm Bilgileri, Osmaniye-Kadirli
Description: Bankaadı Şube Adı Şubesi'ne ait telefon numarası, fax numarası, adres(harita), şube kodu ve swift kodu gibi resmi bilgilerdir.
Örnek: İş Bankası Kadirli Şubesi'ne ait telefon numarası, fax numarası, adres(harita), şube kodu ve swift kodu gibi resmi bilgilerdir.
Keywords: bankaadı şubeadı şubesi, bankaadı şubeadı şubesi telefon, bankaadı şubeadı şubesi adres, bankaadı şubeadı şube kodu
Örnek : iş bankası kadirli şubesi, iş bankası kadirli şubesi telefon, iş bankası kadirli şubesi adres, iş bankası kadirli şube kodu
@fatihtoprak
fatihtoprak / mobile.nav.js
Created April 21, 2014 04:39
Simple jQuery Mobile menu detect
var mobileMenu = $(window).width();
$(window).resize(function() {
mobileMenu = $(window).width();
if (mobileMenu < 720) {
$('#allCategroyList').removeClass('catNav');
$('#allCategroyList').addClass('mobileNav');
} else {
$('#allCategroyList').addClass('catNav');
$('#allCategroyList').removeClass('mobileNav');
<link rel="stylesheet/less" href="path/folder/main.less">
<script src="//cdnjs.cloudflare.com/ajax/libs/less.js/1.7.0/less.min.js"></script>
<link rel="stylesheet" href="path/folder/css/main.css">