/** * @param mixed[] $options New value for gallery branch of DG options array. * @param int $blog The blog we're retrieving options for (null => current blog). */ public static function setOptions($options, $blog = null) { $dg_options = DocumentGallery::getOptions($blog); $dg_options['gallery'] = $options; DocumentGallery::setOptions($dg_options, $blog); }
/** * Key: Attachment ID * Val: array * + timestamp - When the thumbnail was generated (or generation failed). * + thumb_path - System path to thumbnail image. * + thumb_url - URL pointing to the thumbnail for this document. * + thumber - Generator used to create thumb OR false if failed to gen. * * @param array $options Thumber options to store in DB */ private static function setOptions($options, $blog = null) { $dg_options = DocumentGallery::getOptions($blog); $dg_options['thumber'] = $options; DocumentGallery::setOptions($dg_options, $blog); }
/** * Runs activation setup for Document Gallery on all blog(s) it is activated on. * * @param int $blog Blog to update or null if updating current blog. */ private static function _activate($blog) { $options = DocumentGallery::getOptions($blog); // first activation if (is_null($options)) { DocumentGallery::setOptions(self::getDefaultOptions(), $blog); } }
/** * Gets logging options. * * @param int $blog ID of the blog to be retrieved in multisite env. * * @return array Logger options for the blog. */ public static function getOptions($blog = null) { $options = DocumentGallery::getOptions($blog); return $options['logging']; }