Skip to content

Instantly share code, notes, and snippets.

View jentanbernardus's full-sized avatar
:shipit:
Coding everyday keeps the doctor away!

Jentan Bernardus jentanbernardus

:shipit:
Coding everyday keeps the doctor away!
View GitHub Profile
@jentanbernardus
jentanbernardus / Disable_the_dashboard_welcome_screen.php
Created January 7, 2013 00:43
Hide or Replace the WordPress Welcome Panel [ functions.php ]
//Disable the dashboard welcome screen
//This will only hide the panel, not replace it with any other content.
add_filter("get_user_metadata", "my_own_welcome_panel", 1, 4);
function my_own_welcome_panel($null, $object_id, $meta_key, $single) {
if($meta_key === 'my_own_welcome_panel') { return 0; }
}
@jentanbernardus
jentanbernardus / index.html
Created February 6, 2013 17:27
A CodePen by Jentan Bernardus. jQuery Countdown
<!-- Countdown dashboard start -->
<div id="countdown_dashboard">
<!--<h1>jQuery Countdown</h1>-->
<hr class="light">
<div class="dash weeks_dash">
<span class="dash_title">weeks</span>
<div class="digit">4</div>
<div class="digit">6</div>
</div>
@jentanbernardus
jentanbernardus / jquery.scoll.to.top.js
Created February 8, 2013 03:48
Simple jQuery Scroll To Top
$(document).ready(function(){
$("#go-to-top").hide();
$(function () {
$(window).scroll(function () {
if ($(this).scrollTop() > 100) {
$('#go-to-top').fadeIn();
} else {
$('#go-to-top').fadeOut();
}
});
@jentanbernardus
jentanbernardus / webkit-scrollbar.css
Created February 23, 2013 15:28
Custom scrollbars with CSS3 and WebKit
::-webkit-scrollbar {
width: 12px;
}
::-webkit-scrollbar-track {
background: none;
}
::-webkit-scrollbar-thumb {
background: -webkit-linear-gradient(left, #547c90, #002640);
<?php
/*
Plugin Name: Plugin Boilerplate
Version: 0.1-alpha
Description: This is how I like to make sense of the WordPress plugin architecture
Author: Adam Davis
Author URI: http://admataz.com
Plugin URI: http://admataz.com
Text Domain: admataz-plugin-boilerplate
Domain Path: /languages
@jentanbernardus
jentanbernardus / tweet_button.html
Created July 15, 2013 05:22
Asynchronous Tweet Button
<a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical">Tweet</a>
<!-- Put this JS at the bottom of the page -->
<script id="deferedjs" type="text/javascript">
var b = document.createElement('script');
b.type = 'text/javascript';
b.src = ('http://platform.twitter.com/widgets.js');
var a=document.getElementById("deferedjs");
a.parentNode.insertBefore(b,a);
</script>
<?php
add_filter('body_class','browser_body_class');
function browser_body_class($classes) {
global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;
if($is_lynx) $classes[] = 'lynx';
elseif($is_gecko) $classes[] = 'gecko';
elseif($is_opera) $classes[] = 'opera';
elseif($is_NS4) $classes[] = 'ns4';
elseif($is_safari) $classes[] = 'safari';
@jentanbernardus
jentanbernardus / functions.php
Created July 16, 2013 13:44
WordPress: Changing default wordpres email settings
add_filter('wp_mail_from', 'new_mail_from');
add_filter('wp_mail_from_name', 'new_mail_from_name');
function new_mail_from($old) {
return 'your email address';
}
function new_mail_from_name($old) {
return 'your name or your website';
}
@jentanbernardus
jentanbernardus / snippet.php
Last active January 6, 2023 14:18
WordPress: Disable new user and password change notification
<?php
if ( !function_exists('wp_new_user_notification') ) {
function wp_new_user_notification( ) {}
}
if ( !function_exists( 'wp_password_change_notification' ) ) {
function wp_password_change_notification() {}
@jentanbernardus
jentanbernardus / README.md
Created August 1, 2013 05:27
Unzip an uploaded file using php

Unzip an uploaded file using php


If you dont have shell access to your server and need to unzip a file on your php server you can use this script. It basically extracts the zip file into the directory you specify. Make sure the directory you want to extract it to has write permissions.