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 | |
/** | |
* @package polylang-sync-rate-my-post | |
*/ | |
/* | |
Plugin Name: polylang-sync-rate-my-post | |
Plugin URI: https://gist.github.com/Tyxz/09ea3d4b205738be2a8b2b777892b62a | |
Description: Sync the ratings of the Wordpress plugin "rate-my-post" with all polylang translated variants of it. | |
Version: 0.1 | |
Author: Arne Rantzen |
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
#!/usr/bin/python | |
# https://docs.python.org/3/howto/argparse.html | |
# https://pythonspot.com/reading-csv-files-in-python/ | |
# https://www.tutorialspoint.com/python/python_database_access.htm | |
# https://mysqlserverteam.com/how-to-create-multiple-accounts-for-an-app/ | |
import argparse | |
import csv | |
import MySQLdb | |
# Get script arguments |
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
/** | |
* ISO 8601 date | |
* @see http://webcloud.se/log/JavaScript-and-ISO-8601/ | |
* @example "2008-07-09T16:13:30+12:00" | |
*/ | |
function IsoDate() {}; | |
// Date inheritance |
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 | |
/** | |
* Resources lazy loading | |
* | |
* @category Zend | |
* @package Zend_Application | |
* @subpackage Bootstrap | |
* @version $Id$ | |
*/ |
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 | |
require_once 'Zend/Application/Resource/ResourceAbstract.php'; | |
require_once 'Zend/Log.php'; | |
/** | |
* Multilog Resource | |
* | |
* @category Zend | |
* @package Zend_Application |
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 Bootstrap extends Zend_Application_Bootstrap_Bootstrap | |
{ | |
/** | |
* Initialize SoapClient | |
*/ | |
public function _initMySoapClient() | |
{ | |
$options = $this->getOptions(); |
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 App_Zend_Application_Resource_Acl | |
extends Zend_Application_Resource_ResourceAbstract | |
{ | |
/** @var Zend_Acl **/ | |
protected $_acl = null; | |
/** @var string **/ | |
protected $_wildcard = '*'; | |
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 | |
/** | |
* Plugin to automatically init modules configuration | |
* | |
* @category Zend | |
* @package Zend_Controller | |
* @subpackage Plugin | |
* @author Jose Luis Jiménez Castelltort <jljc.work@gmail.com> | |
* @version $Id$ | |
*/ |
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 App | |
{ | |
/** @var Zend_Application */ | |
static protected $_application; | |
public function __construct() | |
{ | |
// Using INI |