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
| Date.prototype.addDays = function(days) { | |
| var dat = new Date(this.valueOf()); | |
| dat.setDate(dat.getDate() + days); | |
| return dat; | |
| }; | |
| // Source: http://stackoverflow.com/questions/497790 | |
| function convertDate ( d ) { | |
| // Converts the date in d to a date-object. The input can be: | |
| // a date object: returned without modification |
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 | |
| // Prevent loading this file directly and/or if the class is already defined | |
| if ( ! defined( 'ABSPATH' ) || class_exists( 'WPGitHubUpdater' ) || class_exists( 'WP_GitHub_Updater' ) ) | |
| return; | |
| /** | |
| * | |
| * | |
| * @version 1.6 |
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
| img { | |
| object-fit: cover; | |
| } |
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
| /** | |
| * CSS3 Tooltips | |
| * Created by Martin Ivanov | |
| * http://wemakesites.net | |
| */ | |
| /* the tooltip will be applied to any element, containing data-title attribute */ | |
| [data-title] | |
| { | |
| position: relative; |
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
| /** | |
| * Crossbrowser RGBA and Prevention of Opacity Propagation | |
| * Created by Martin Ivanov | |
| * http://wemakesites.net | |
| */ | |
| .outer | |
| { | |
| position: absolute; | |
| top: 24px; |
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 array_chunk(input, size, preserve_keys) { | |
| // discuss at: http://phpjs.org/functions/array_chunk/ | |
| // original by: Carlos R. L. Rodrigues (http://www.jsfromhell.com) | |
| // improved by: Brett Zamir (http://brett-zamir.me) | |
| // note: Important note: Per the ECMAScript specification, objects may not always iterate in a predictable order | |
| // example 1: array_chunk(['Kevin', 'van', 'Zonneveld'], 2); | |
| // returns 1: [['Kevin', 'van'], ['Zonneveld']] | |
| // example 2: array_chunk(['Kevin', 'van', 'Zonneveld'], 2, true); | |
| // returns 2: [{0:'Kevin', 1:'van'}, {2: 'Zonneveld'}] | |
| // example 3: array_chunk({1:'Kevin', 2:'van', 3:'Zonneveld'}, 2); |
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
| # Apache Configuration File | |
| # (!) Using `.htaccess` files slows down Apache, therefore, if you have access | |
| # to the main server config file (usually called `httpd.conf`), you should add | |
| # this logic there: http://httpd.apache.org/docs/current/howto/htaccess.html. | |
| # ############################################################################## | |
| # # CROSS-ORIGIN RESOURCE SHARING (CORS) # | |
| # ############################################################################## |
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 redirectTohttps() { | |
| if($_SERVER['HTTPS']!=”on”) { | |
| $redirect= “https://”.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; | |
| header(“Location:$redirect”); | |
| } | |
| } | |
| ?> |
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
| RewriteEngine On | |
| RewriteCond %{HTTP_HOST} !^my-domain\.com$ [NC] | |
| RewriteRule ^(.*)$ http://my-domain.com/$1 [R=301,L] |
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
| RewriteEngine On | |
| RewriteCond %{HTTP_HOST} !^www\. | |
| RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] |