Skip to content

Instantly share code, notes, and snippets.

View danyj's full-sized avatar
💭
I may be slow to respond.

Dragan Todorovic danyj

💭
I may be slow to respond.
View GitHub Profile
@danyj
danyj / gist:2edb3d83bae4c363bf839f0dd5f1343f
Last active February 25, 2018 18:56
Create missing image size
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();
<?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' );
<?php if ( ! defined( 'FW' ) ) { die( 'Forbidden' ); }
/**
* @var string $id
* @var array $option
* @var array $data
* @var array $inner_option
*/
{
<?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 December 14, 2017 14:29
Unyson wp-shortcode bug check
<?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(
$AndreiBday = '9-26-2016';
if ( date("m-d-Y") == $AndreiBday ) {
echo 'HAPPY BDAY';
} else {
echo 'Sh*t I\'m in trouble';
}
{
"a462b7d97f600cfdc7be74827590f666": {
"theme": "modern",
"skin": "lightgray",
"language": "en",
"formats": {
"alignleft": [
{
"selector": "p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",
"styles": {