Skip to content

Instantly share code, notes, and snippets.

View for-a-clean-bxslider.css
/*
* For a clean bxSlider!
*/
.bx-wrapper .bx-viewport {
background : none;
border : 0px;
left : 0px;
-moz-box-shadow : none;
-webkit-box-shadow : none;
View selectbox_menu_walker.php
<?php
/**
* SelectBox box menu walker
* @author : takien, tarikcayir
* @link : http://takien.com
* @version : 1.1
*
* use this on args:
* 'walker' => new SelectBox_Menu_Walker,
* 'items_wrap' => '<select id="%1$s" class="%2$s">%3$s</select>',
View remove_p_tags.php
<?php
add_filter('the_content', 'remove_p_tags', 20, 1);
function remove_p_tags($content){
$content = force_balance_tags($content);
return preg_replace('#<p>\s*+(<br\s*/*>)?\s*</p>#i', '', $content);
}
View bxslider-control-hover.css
/**
* Controls hover fade effect!
*
* Change class name -> slider_class_name
*/
.bx-controls-direction {
opacity: 0;
transition: opacity .25s ease-in-out;
-moz-transition: opacity .25s ease-in-out;
View wordpress-3.8-dashicons.php
<?php
/*
* WP 3.8 Add CPT Admin icon
*/
add_action( 'admin_head', 'cpt_admin_icon' );
function cpt_admin_icon(){
echo '
<style>
#adminmenu #menu-posts-project div.wp-menu-image:before { content: "\f100"; }
View wp-load-fancybox-modal.php
<?php
/*
* Load jQuery FancyBox Modal!
*/
add_action('wp_enqueue_scripts', 'fancbox_scripts');
function fancbox_scripts() {
wp_enqueue_style('fancybox-style', get_template_directory_uri().'/fancybox/jquery.fancybox.css', false ,'2.1.5', 'all' );
wp_enqueue_script('fancybox', get_template_directory_uri().'/fancybox/jquery.fancybox.min.js', array('jquery'),'2.1.51', true );
@tarikcayir
tarikcayir / wp-gallery-disable.php
Last active Aug 29, 2015
WordPress default gallery disable!
View wp-gallery-disable.php
View wp-add-class-attachment-link.php
View all-qtranslate-taxonomies.php
<?php
/**
* All qTranslate Taxonomies!
*/
add_action('admin_init', 'qtranslate_edit_taxonomies');
function qtranslate_edit_taxonomies(){
$args = array(
View Hide Add Media Button
<?php
function RemoveAddMediaButtonsForNonAdmins(){
if ( !current_user_can( 'manage_options' ) ) {
remove_action( 'media_buttons', 'media_buttons' );
}
}
add_action('admin_head', 'RemoveAddMediaButtonsForNonAdmins');