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
[ | |
// Don't forget required attributes 'key', 'name' and 'label' | |
'type' => 'checkbox', | |
'instructions' => '', | |
'required' => 0, | |
'conditional_logic' => 0, | |
'wrapper' => [ | |
'width' => '', | |
'class' => '', | |
'id' => '', |
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
set nocompatible | |
set t_Co=256 | |
" search and replace on the whole document by default, no need to add "g" | |
set gdefault | |
" enable color scheme | |
syntax on | |
set background=dark | |
colorscheme solarized | |
set cursorline |
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
# *** | |
# Compression and Cache | |
# *** | |
<IfModule mod_expires.c> | |
ExpiresActive on | |
ExpiresDefault "access plus 1 month" | |
# CSS | |
ExpiresByType text/css "access plus 1 year" |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Geolocation with Javascript</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | |
</head> | |
<body> | |
<div class="container"> |
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
set t_Co=256 | |
" enable color scheme | |
syntax on | |
set background=dark | |
colorscheme solarized | |
set cursorline | |
" show line numbers | |
set number |
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 admin dashboard widgets for each .md file found in theme root. | |
* | |
* reads the *.md markdown files at the root of the theme and display a widget for each .md in the admin dashboard | |
* <!> Requires the class Parsedown https://github.com/erusev/parsedown | |
* <!> includes classes/Parsedown.php | |
*/ | |
add_action('wp_dashboard_setup', function(){ | |
$themeDir = get_template_directory(); |
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 | |
/** | |
* Cleaning Smartcrawl metabox | |
*/ | |
add_action('admin_head', function() { | |
echo ' | |
<style> | |
#wds-wds-meta-box .widefat tr{display:none} | |
#wds-wds-meta-box .widefat tr:nth-child(1), | |
#wds-wds-meta-box .widefat tr:nth-child(2), |
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 | |
/** | |
* Responsive Youtube embeds. | |
* | |
* Adds bootstrap responsive embed markup and classes and avoid showing related | |
* videos at the end of the videos. | |
*/ | |
add_filter( 'embed_oembed_html', function( $html, $url, $attr, $post_ID ) { | |
if ( false !== stripos( $html, '<iframe ' ) && false !== stripos( $html, '.youtube.com/embed' ) ) { | |
//don't show related videos |
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
<!-- | |
Make sure that the viewBox attributes are using the same values. | |
xlink:href should refer to the id of the <svg> and have a # sign before it. | |
--> | |
<div style="display:none"> | |
<svg id="mySVG" width="50" height="50" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">...</svg> | |
</div> | |
<svg viewBox="0 0 50 50"><use xlink:href="#mySVG"></use></svg> |
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 | |
/* | |
Plugin Name: Bwap Shortcodes | |
Description: Add shortcodes you write | |
Version: 0.1 | |
Author: Bwap | |
*/ | |
defined( 'ABSPATH' ) or die; | |
/** |
NewerOlder