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 | |
/** | |
* Smarty plugin | |
* | |
* @package Smarty | |
* @subpackage PluginsModifier | |
* Place this file inside the smarty/libs/plugins directory and invoke as any other modifier (e.g. {$birth_date|calculate_age} ) | |
*/ | |
/** |
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
/** | |
* Limit embedded gist window size. Show scrollbars when necessary. | |
* @link https://imelgrat.me/ | |
*/ | |
/* Limit width. Show scrollbars when exceeding width */ | |
.gist { | |
max-width:350px; | |
overflow:auto; | |
} |
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 | |
/* Create custom posts in WordPress taking data from a MySQL database. | |
@link https://imelgrat.me/wordpress/bulk-upload-custom-posts-wordpress/ | |
Load WordPress functions and plug-ins. Put correct path for this file. | |
This example assumes you're using it from a sub-folder of WordPress. | |
If you run it from somewhere else, adjust path to wp-load.php accordingly. | |
*/ | |
require_once('../wp-load.php'); | |
$database['hostname'] = 'SERVER'; |
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
.panel-title { | |
cursor:pointer; | |
} | |
h4.tab-title | |
{ | |
font-family: "avenirheavy", Helvetica, Arial, "sans-serif"; | |
font-weight: normal; | |
font-size: 22px; | |
color: #ffffff; | |
} |
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 | |
/** | |
* Retrieve and parse OPML (Outline Processor Markup Language) Parser Class. | |
* Extracts the properties of content from OPML files using a PHP class | |
* | |
* @link https://github.com/imelgrat/opml-parser | |
* | |
* @link https://imelgrat.me/php/find-atom-opml-rss-feeds/ | |
*/ | |
require_once('opml-parser.php'); |
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 | |
/** | |
* Redirect missing WordPress URLs . | |
* | |
* If you want to redirect the browser every time a page can’t be found while avoiding SEO impact, you can open your 404.php file | |
* in your theme’s folder and paste this at the top. If it doesn’t exist, then create a blank 404.php file. | |
* | |
* @link https://imelgrat.me/wordpress/dead-links-redirect-avoid-seo-impact/ | |
*/ | |
header("HTTP/1.1 301 Moved Permanently"); |
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 | |
/** | |
* Convert date format. | |
* | |
* Use regular expressions to detect dates and convert the detected dates into a MySQL-compatible DATE format. | |
* | |
* @link https://imelgrat.me/php/date-formatting-detect-convert/ | |
*/ | |
function convert_date_format($old_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
/** | |
* Attach a handler to collapsible sets. | |
* | |
* Attach a handler to every collapsible (filtered by their jQM’s role) so that, | |
* every time a collapsible’s header is tapped, it will scroll to the top of the page (both header and content).. | |
* | |
* @link https://imelgrat.me/javascript/collapsible-scroll-jquery-mobile/ | |
*/ | |
$(document).on('pagebeforeshow', function() | |
{ |
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
/** | |
* Debounce window-resize events | |
* | |
* Debouncing JavaScript events to prevent jerky action during UI changes. | |
* | |
* @link https://imelgrat.me/javascript/debouncing-javascript-events/ | |
*/ | |
$(window).bind('resize', function(e) | |
{ | |
window.resizeEvt; |
NewerOlder