You are here

function hook_vkxp_query_alter in VK CrossPoster 6

Same name and namespace in other branches
  1. 6.3 vkxp.api.php \hook_vkxp_query_alter()
  2. 6.2 vkxp.api.php \hook_vkxp_query_alter()
  3. 7.2 vkxp.api.php \hook_vkxp_query_alter()
  4. 7 vkxp.api.php \hook_vkxp_query_alter()

Allows to change http query params $query contains 3 values:

Parameters

$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

1 invocation of hook_vkxp_query_alter()
vkxp_query in ./vkxp.module
Function makes query to vkontakte.ru Allows using hook_vkxp_query_alter() for altering query params

File

./vkxp.api.php, line 16
Hooks provided by the vkxp module.

Code

function hook_vkxp_query_alter(&$query) {
  if ($query['method'] == 'wall.post') {
    $query['params']['message'] .= "\n" . t('Attachments disabled');
    unset($query['params']['attachments']);
  }
}