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
'use strict' | |
###* | |
# @ngdoc filter | |
# @name app.filter:limitWords | |
# @description Angular filter to limit words count in a string | |
# # limitWords | |
### | |
angular.module 'app' | |
.filter 'limitWords', -> |
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
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
</IfModule> |
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
/** | |
* Sass-Ready media queries | |
* Here there are some presets of useful | |
* media queries breakpoints for various devices | |
* Usage: @media #{variable-name} { } | |
* and it will compile to: @media variable-name { } | |
* | |
*/ | |
// Devices |
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
/**************************************************** | |
* WP CSS - body_class() * | |
* The classes generated with body_class() function * | |
****************************************************/ | |
.rtl {} | |
.home {} | |
.blog {} | |
.archive {} | |
.date {} |
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
/** | |
* Print a back button to the first term ancestor | |
*/ | |
function wp_term_back_to_parent($id = null, $args = array()) { | |
if( !$id ) { | |
$id = get_query_var('cat'); | |
} | |
// get term ancestors |
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 | |
/** | |
* Suggested default use: | |
* add_action("publish_post", "wp_build_sitemap"); | |
* add_action("publish_page", "wp_build_sitemap"); | |
* add_action( "save_post", "wp_build_sitemap" ); | |
* | |
* or manually with arguments: wp_build_sitemap( array('priority' => 1) ); | |
* |
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
/** | |
* Parse a csv string to array of objects | |
* optionally enclosed by quotes | |
* delimited by user selectable character | |
*/ | |
function parseCSV(string, delimiter) { | |
var lines = string.split(/\r\n|\n/), // get all the lines | |
colnames = [], // the columns names array | |
result = []; // the result array |