Skip to content

Instantly share code, notes, and snippets.

View renekorss's full-sized avatar

Rene Korss renekorss

View GitHub Profile
@renekorss
renekorss / voog-articles-publish.php
Created July 5, 2016 13:33
Publish all Voog articles
<?php
const HOST = 'HOST.voog.com';
const TOKEN = 'MY_TOKEN';
// Get first 250 articles
$articles = curlRequest('articles?per_page=250');
foreach ($articles as $article)
{
$newData = array(
@renekorss
renekorss / extensions.php
Created April 4, 2016 06:40
Custom Joomla! form field to generate extensions (components, modules, plugins, libraries) dropdown list
<?php
/**
* Custom Joomla! form field to generate extensions dropdown list
*
* @author Rene Korss <rene.korss@gmail.com>
* @copyright 2016 All rights reserved.
* @license MIT
*
* Usage examples:
*
@renekorss
renekorss / minicolor.php
Last active April 1, 2016 21:34
Custom Joomla! form field to generate minicolors input with optional opacity slider
<?php
/**
* Custom Joomla! form field to generate minicolors input with optional opacity slider
*
* NOTE: replace PATH_TO_CUSTOM_MINICOLORS with path to minicolors files. See below.
*
* @author Rene Korss <rene.korss@gmail.com>
* @copyright 2016 All rights reserved.
* @license MIT
*
@renekorss
renekorss / WP-order-by-multiple-meta-keys.php
Last active August 29, 2015 14:22
Order Wordpress posts by multiple meta key values
<?php
/**
* Wordpress order by multiple meta key values
*
* @author Rene Korss <rene.korss@gmail.com>
*/
// Override orderby
function orderby_multiple_meta_keys( $orderby ){
@renekorss
renekorss / rename-files.php
Created November 12, 2014 12:26
Rename files in subfolders
<?php
function glob_recursive($pattern, $flags = 0) {
$files = glob($pattern, $flags);
foreach (glob(dirname($pattern).'/*', GLOB_ONLYDIR|GLOB_NOSORT) as $dir) {
$files = array_merge($files, glob_recursive($dir.'/'.basename($pattern), $flags));
}
return $files;
}
$root = $_GET['root'];