function hook_pubsubhubbub_render_feed($data, $conf)
{
$feedType = $data['_PAGE_'] == TemplatePage::FEED_RSS ? FeedBuilder::$FEED_RSS : FeedBuilder::$FEED_ATOM;
- $template = file_get_contents(PluginManager::$PLUGINS_PATH . '/pubsubhubbub/hub.'. $feedType .'.xml');
+ $template = file_get_contents(PluginManager::$PLUGINS_PATH . '/pubsubhubbub/hub.' . $feedType . '.xml');
$data['feed_plugins_header'][] = sprintf($template, $conf->get('plugins.PUBSUBHUB_URL'));
return $data;
*/
function hook_pubsubhubbub_save_link($data, $conf)
{
- $feeds = array(
- index_url($_SERVER) .'feed/atom',
- index_url($_SERVER) .'feed/rss',
- );
+ $feeds = [
+ index_url($_SERVER) . 'feed/atom',
+ index_url($_SERVER) . 'feed/rss',
+ ];
$httpPost = function_exists('curl_version') ? false : 'nocurl_http_post';
try {
*/
function nocurl_http_post($url, $postString)
{
- $params = array('http' => array(
+ $params = ['http' => [
'method' => 'POST',
'content' => $postString,
'user_agent' => 'PubSubHubbub-Publisher-PHP/1.0',
- ));
+ ]];
$context = stream_context_create($params);
$fp = @fopen($url, 'rb', false, $context);