A mixin for writing @font-face rules in SASS.
Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.
@include font-face(Samplino, fonts/Samplino);| <?php | |
| /** | |
| * Insert an attachment from a URL address. | |
| * | |
| * @param string $url The URL address. | |
| * @param int|null $parent_post_id The parent post ID (Optional). | |
| * @return int|false The attachment ID on success. False on failure. | |
| */ | |
| function wp_insert_attachment_from_url( $url, $parent_post_id = null ) { |
| function prefix_customizer_register( $wp_customize ) { | |
| $wp_customize->add_panel( 'panel_id', array( | |
| 'priority' => 10, | |
| 'capability' => 'edit_theme_options', | |
| 'theme_supports' => '', | |
| 'title' => __( 'Example Panel', 'textdomain' ), | |
| 'description' => __( 'Description of what this panel does.', 'textdomain' ), | |
| ) ); |
| <?php | |
| class comment_walker extends Walker_Comment { | |
| var $tree_type = 'comment'; | |
| var $db_fields = array( 'parent' => 'comment_parent', 'id' => 'comment_ID' ); | |
| // constructor – wrapper for the comments list | |
| function __construct() { ?> | |
| <section class="comments-list"> |
Yet another framework syndrome
| Name | Date | URL | Stars |
|---|---|---|---|
| Jake | April 2010 | https://github.com/mde/jake | 1000 |
| Brunch | January 2011 | http://brunch.io/ | 3882 |
| <?php | |
| $curl = curl_init(); | |
| curl_setopt_array($curl, Array( | |
| CURLOPT_URL => 'http://blogs.guggenheim.org/map/feed/', | |
| CURLOPT_USERAGENT => 'spider', | |
| CURLOPT_TIMEOUT => 120, | |
| CURLOPT_CONNECTTIMEOUT => 30, | |
| CURLOPT_RETURNTRANSFER => TRUE, |
| #!/bin/sh | |
| ## backup each mysql db into a different file, rather than one big file | |
| ## as with --all-databases. This will make restores easier. | |
| ## To backup a single database simply add the db name as a parameter (or multiple dbs) | |
| ## Putting the script in /var/backups/mysql seems sensible... on a debian machine that is | |
| ## Create the user and directories | |
| # mkdir -p /var/backups/mysql/databases | |
| # useradd --home-dir /var/backups/mysql --gid backup --no-create-home mysql-backup | |
| ## Remember to make the script executable, and unreadable by others |
| <?php | |
| /** | |
| * Return a custom field stored by the Advanced Custom Fields plugin | |
| * | |
| * @global $post | |
| * @param str $key The key to look for | |
| * @param mixed $id The post ID (int|str, defaults to $post->ID) | |
| * @param mixed $default Value to return if get_field() returns nothing | |
| * @return mixed | |
| * @uses get_field() |