You are here

function _video_get_resolution_selected_option in Video 6

Same name and namespace in other branches
  1. 5 video.module \_video_get_resolution_selected_option()
  2. 6.2 video.module \_video_get_resolution_selected_option()

Get the selected resolution id from the videox and videoy fields

1 call to _video_get_resolution_selected_option()
video_form in ./video.module
Hook, displays the contents of the node form page for creating and editing nodes.

File

./video.module, line 1376
video.module

Code

function _video_get_resolution_selected_option($node) {
  $value = $node->videox . "x" . $node->videoy;
  $i = 1;
  while ($i <= 4) {
    if (variable_get('video_resolution_' . $i . '_value', '') == $value) {
      return $i;
    }
    $i++;
  }
}