This file contains hidden or 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
| @mixin at2x($image_name, $w: auto, $h: auto, $extention: '.png') { | |
| background-image: image-url($image_name + $extention); | |
| $x2img : $image_name + '@2x' + $extention; | |
| @media screen and (-webkit-min-device-pixel-ratio : 1.5) { | |
| background-image: image-url($x2img); | |
| background-size: $w $h; | |
| } | |
| } |
This file contains hidden or 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
| function get_responsive_image($id, $src, $alt = "") { | |
| $large = wp_get_attachment_image_src( $id, 'large' ); | |
| $medium = wp_get_attachment_image_src( $id, 'medium' ); | |
| $small = wp_get_attachment_image_src( $id, 'thumbnail' ); | |
| $output = '<div class="img-responsive">'; | |
| $output.= ' <div data-picture data-alt="' . $alt . '">'; | |
| $output.= ' <div data-src="' . $small[0] . '"></div>'; | |
| $output.= ' <div data-src="' . $medium[0] . '" data-media="(min-width: 786px)"></div>'; | |
| $output.= ' <div data-src="' . $large[0] . '" data-media="(min-width: 920px)"></div>'; |
This file contains hidden or 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
| if ( isset($_GET['debug']) && $_GET['debug'] == 'debug') | |
| define('WP_DEBUG', true); |
This file contains hidden or 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
| .hide-text { | |
| text-indent: 100%; | |
| white-space: nowrap; | |
| overflow: hidden; | |
| } |
This file contains hidden or 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 | |
| // Source: http://brandonsummers.name/blog/2012/02/10/using-bitbucket-for-automated-deployments/ | |
| date_default_timezone_set('Europe/Amsterdam'); | |
| class Deploy { | |
| /** | |
| * A callback function to call after the deploy has finished. |
This file contains hidden or 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
| if ($_SERVER['HTTP_HOST'] == 'localhost:8888') { | |
| define('DB_NAME', 'stefvork_database'); | |
| define('DB_USER', 'root'); | |
| define('DB_PASSWORD', 'root'); | |
| define('DB_HOST', 'localhost'); | |
| } else { | |
| define('DB_NAME', 'baardbaard_domein'); | |
| define('DB_USER', 'baardbaard_user'); | |
| define('DB_PASSWORD', 'password'); | |
| define('DB_HOST', 'localhost'); |
This file contains hidden or 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
| // Add to functions.php | |
| // Pagination for paged posts, Page 1, Page 2, Page 3, with Next and Previous Links, No plugin | |
| function html5wp_pagination() | |
| { | |
| global $wp_query; | |
| $big = 999999999; | |
| echo paginate_links(array( | |
| 'base' => str_replace($big, '%#%', get_pagenum_link($big)), | |
| 'format' => '?paged=%#%', | |
| 'current' => max(1, get_query_var('paged')), |
NewerOlder