View upload_mime.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('upload_mimes','external_mimes'); | |
function external_mimes($mimes){ | |
return array_merge($mimes,array ( | |
'rar'=> 'application/x-rar-compressed', // you can add more? | |
)); | |
} |
View content-heading-auto-id.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Content heading auto ID | |
* | |
* Examples; | |
* <h*>Test Header</h*> | |
* <h* id="test-header">Test Header</h*> | |
*/ |
View for-a-clean-bxslider.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* For a clean bxSlider! | |
*/ | |
.bx-wrapper .bx-viewport { | |
background : none; | |
border : 0px; | |
left : 0px; | |
-moz-box-shadow : none; | |
-webkit-box-shadow : none; |
View wordpress_html5_insert_image_figure.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Change image tag | |
*/ | |
add_filter( 'image_send_to_editor', 'html5_insert_image', 10, 9 ); | |
function html5_insert_image($html, $id, $caption, $title, $align, $url, $size, $alt) { |
View bxslider-control-hover.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 ); |
View wp-add-class-attachment-link.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add class attachment link | |
*/ | |
add_filter('wp_get_attachment_link','add_class_attachment_link',10,1); | |
function add_class_attachment_link($html){ | |
$postid = get_the_ID(); |
OlderNewer