You are here

vkxp.api.php in VK CrossPoster 7.2

Same filename and directory in other branches
  1. 6.3 vkxp.api.php
  2. 6 vkxp.api.php
  3. 6.2 vkxp.api.php
  4. 7 vkxp.api.php

vkxp.api.php Hooks provided by the vkxp module.

File

vkxp.api.php
View source
<?php

/**
 * @file vkxp.api.php
 * Hooks provided by the vkxp module.
 */

/**
 * Allows to change http query params.
 *
 * $query contains 3 values:
 *   @param $query['method']: string with vk api method name.
 *   @param $query['params']: array with parameters that will be posted.
 *   @param $query['request_url']: url to request will be sent.
 */
function hook_vkxp_query_alter(&$query) {
  if ($query['method'] == 'wall.post') {
    $query['params']['message'] .= "\n" . t('Attachments disabled');
    unset($query['params']['attachments']);
  }
}

Functions

Namesort descending Description
hook_vkxp_query_alter Allows to change http query params.