Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Dragan Todorovic danyj

💭
I may be slow to respond.
View GitHub Profile
View gist:2edb3d83bae4c363bf839f0dd5f1343f
function thz_create_missing_attachment_size( $attachment_id = false , $handle = false ){
if( !$handle ){
return wp_get_attachment_url( $attachment_id );
}
global $_wp_additional_image_sizes;
$default_image_sizes = get_intermediate_image_sizes();
View gist:1c719e347d0d710667111705c32ac2ff
<?php
//define('_JREQUEST_NO_CLEAN', 1);
define( '_JEXEC', 1 );
define( 'DS', DIRECTORY_SEPARATOR );
define('JPATH_BASE',str_replace(basename(dirname(__FILE__)),"",dirname(__FILE__)));
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
jimport( 'joomla.filesystem.file');
jimport( 'joomla.filesystem.folder' );
jimport( 'joomla.methods' );
View thz-animation view
<?php if ( ! defined( 'FW' ) ) { die( 'Forbidden' ); }
/**
* @var string $id
* @var array $option
* @var array $data
* @var array $inner_option
*/
{
View Thz-animation-class
<?php if (!defined('FW')) {
die('Forbidden');
}
class FW_Option_Type_Thzanimation extends FW_Option_Type
{
public function get_type()
{
return 'thz-animation';
}
@danyj
danyj / settings.php
Created Dec 14, 2017
Unyson wp-shortcode bug check
View settings.php
<?php if ( ! defined( 'FW' ) ) {
die( 'Forbidden' );
}
/**
* Framework options
*
* @var array $options Fill this array with options to generate framework settings form in backend
*/
$options = array(
'main' => array(
View gist:6db326913d4c1b0f0138b12abf584d23
$AndreiBday = '9-26-2016';
if ( date("m-d-Y") == $AndreiBday ) {
echo 'HAPPY BDAY';
} else {
echo 'Sh*t I\'m in trouble';
}
View gist:fcc8cc8d2681520695e8ee150cf55168
{
"a462b7d97f600cfdc7be74827590f666": {
"theme": "modern",
"skin": "lightgray",
"language": "en",
"formats": {
"alignleft": [
{
"selector": "p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",
"styles": {