Discover gists
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
| <div class="columns"> | |
| <div class="column" style="background-color:#f00"> | |
| </div> | |
| <div class="column" style="background-color:#0f0"> | |
| </div> | |
| <div class="column" style="background-color:#00f"> | |
| </div> | |
| </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
| // ---- | |
| // Sass (v3.3.14) | |
| // Compass (v1.0.1) | |
| // ---- | |
| $logo-colors: ( | |
| red: #f00, | |
| green: #0f0, | |
| blue: #00f | |
| ); |
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
| curl http://aquariusrecords.org/ | grep m3u | sed s/^.*href=[\"]*/http:\\/\\/aquariusrecords.org/g | sed s/\>.*//g | /Applications/VLC.app/Contents/MacOS/VLC -vvv - |
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
| // Create a proper EM_Event object in the database when an event-type post is | |
| // imported with WP All import | |
| add_action('pmxi_saved_post', 'post_saved', 10, 1); | |
| function post_saved($post_id) { | |
| if (class_exists(EM_Event)) { | |
| $event_post = get_post($post_id); | |
| // Only create a new event entry if the imported post is of type event and | |
| // there is not an existing event for this post | |
| $existing_event = em_get_event($event_post->ID, 'post_id'); |
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
| $body = preg_replace( '/<iframe\b[^>]*soundcloud.com\/tracks\/(\d*).*"[^>]*>(.*?)>/', '<amp-soundcloud height=300 layout="fixed-height" data-trackid="$1" data-visual="true"></amp-soundcloud>', $body ); |
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 | |
| /** | |
| * Rewrite the HTML for the author, email, and url comment fields | |
| */ | |
| function custom_comment_fields( $fields ) { | |
| // https://codex.wordpress.org/Function_Reference/comment_form | |
| $commenter = wp_get_current_commenter(); |
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 | |
| # Tests for "Mailing Lists" | |
| anyof( | |
| header :is "X-ME-VSCategory" "community:mailing-list", | |
| header :contains "X-Mailer" "Sympa", | |
| exists [ | |
| "List-Id", | |
| "List-Help", | |
| "List-Subscribe", | |
| "List-Unsubscribe", |
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 allow_editors_to_post_html() { | |
| $role_object = get_role( 'editor' ); | |
| $role_object->add_cap( 'unfiltered_html' ); | |
| } | |
| add_filter( 'admin_init', 'allow_editors_to_post_html' ); |
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 | |
| function add_allowed_tags($tags, $context) { | |
| if ($context === 'post') { | |
| $tags['p'] = array( | |
| 'data-height' => true, | |
| 'data-theme-id' => true, | |
| 'data-slug-hash' => true, | |
| 'data-default-tab' => 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
| "order/properties-order": [ | |
| { "properties": [ "content", "quotes" ] }, | |
| { "properties": [ "display", "visibility" ] }, | |
| { "properties": [ "position", "z-index", "top", "right", "bottom", "left" ] }, | |
| { "properties": [ "box-sizing" ] }, | |
| { "properties": [ "flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow", "flex-shrink", "flex-wrap", "align-content", "align-items", "align-self", "justify-content", "order" ] }, | |
| { "properties": [ "width", "min-width", "max-width", "height", "min-height", "max-height" ] }, | |
| { "properties": [ "margin", "margin-top", "margin-right", "margin-bottom", "margin-left" ] }, | |
| { "properties": [ "padding", "padding-top", "padding-right", "padding-bottom", "padding-left" ] }, |