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
/** | |
* Scroll an element into view | |
* @param {Integer} duration in ms | |
* @param {Object} options such as middle (boolean) | |
*/ | |
Element.prototype.scrollTo = function(duration, options) { | |
if (typeof duration === 'undefined' || duration <= 0) { | |
duration = 1; // Minimum value that can be used | |
} | |
if (options === undefined) options = { |
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 | |
RewriteBase / | |
RewriteCond %{HTTP_HOST} !^www\. [NC] | |
RewriteRule .* http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
RewriteCond %{HTTP:X-Forwarded-Proto} !https | |
RewriteCond %{HTTPS} off [NC] | |
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
<?php | |
class similar_posts_widget extends WP_Widget | |
{ | |
function __construct() | |
{ | |
parent::__construct('similar_posts_widget', __('Similar Posts', 'custom-slug'), [ | |
'description' => __('Display similar post', 'custom-slug'), | |
]); | |
} |