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 our Custom Fields to simple products | |
| */ | |
| function mytheme_woo_add_custom_fields() { | |
| global $woocommerce, $post; | |
| echo '<div class="options_group">'; | |
| // Text Field |
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 | |
| /** | |
| * ----------------------------------------------------------------------------------------- | |
| * Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php` | |
| * ----------------------------------------------------------------------------------------- | |
| */ | |
| // HTML Minifier | |
| function minify_html($input) { |
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 | |
| /** | |
| * Retrieves an image from a URL and uploads it using ld_handle_upload_from_path. See that function for more details. | |
| * | |
| * Note: This function should also work for local file paths as well, but the implementation is slightly different than ld_handle_upload_from_path. | |
| * | |
| * @param $image_url | |
| * @param int $attach_to_post | |
| * @param bool|true $add_to_media |
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
| ## Configure eth0 | |
| # | |
| # vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
| DEVICE="eth0" | |
| NM_CONTROLLED="yes" | |
| ONBOOT=yes | |
| HWADDR=A4:BA:DB:37:F1:04 | |
| TYPE=Ethernet | |
| BOOTPROTO=static |
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 if (!defined('BASEPATH')) exit('No direct script access allowed'); | |
| /* | |
| Manage multiple hostnames (domains, sub-domains) within a single instance of CodeIgniter. | |
| Example: | |
| If you had the following domain/sub-domain style for your site: | |
| your-domain.com |
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 query_posts(array('category_name' => 'category', 'posts_per_page' => 5 )); ?> | |
| <?php while (have_posts()) : the_post(); ?> | |
| <article> | |
| <header> | |
| <h2><?php the_title(); ?></h2> | |
| </header> | |
| <?php if (has_post_thumbnail()) : ?> | |
| <figure> | |
| <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> |
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 | |
| /** | |
| * Get first paragraph from a WordPress post. Use inside the Loop. | |
| * | |
| * @return string | |
| */ | |
| function get_first_paragraph(){ | |
| global $post; | |
| $str = wpautop( get_the_content() ); |
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 | |
| /** | |
| * WordPress Query Comprehensive Reference | |
| * Compiled by luetkemj - luetkemj.com | |
| * | |
| * CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
| * Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php | |
| */ | |
| $args = array( |
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 | |
| /** | |
| * Bootstrap Pagination. | |
| * | |
| * Echos Bootstraped paginated links (http://getbootstrap.com/components/#pagination). | |
| * | |
| * @since 0.0.1 | |
| * | |
| * @param array $args { | |
| * An array of arguments. Optional. |
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
| { | |
| "vars": { | |
| "@gray-darker": "lighten(#000, 13.5%)", | |
| "@gray-dark": "lighten(#000, 20%)", | |
| "@gray": "lighten(#000, 33.5%)", | |
| "@gray-light": "lighten(#000, 46.7%)", | |
| "@gray-lighter": "lighten(#000, 93.5%)", | |
| "@brand-primary": "#0e71b4", | |
| "@brand-success": "#5cb85c", | |
| "@brand-info": "#5bc0de", |
NewerOlder