You are here

function fb_likebox_patterns_export_all_settings in Facebook Page Plugin 7

Same name and namespace in other branches
  1. 7.2 fb_likebox_patterns/fb_likebox_patterns.module \fb_likebox_patterns_export_all_settings()

Implements function to export the values of the block configuration form. In this case we do not use the patterns_api_extract_actions() function, and we return directly the array with the action values ready to be fetched.

Parameters

$args:

$result:

1 string reference to 'fb_likebox_patterns_export_all_settings'
fb_likebox_patterns in fb_likebox_patterns/fb_likebox_patterns.module
Implements hook_patterns().

File

fb_likebox_patterns/fb_likebox_patterns.module, line 32
Submodule to enable compatibility of Facebook Likebox with patterns module. The current version makes use of the system pattern component, therefore it does not really call drupal_form_submit() for the block_admin_configure $form_id, and the values…

Code

function fb_likebox_patterns_export_all_settings($args = NULL, &$result = NULL) {
  $result = array();

  //Prepare a modify action with all the fb_likebox variables
  $variables_action = array(
    'tag' => 'variables',
  );
  $variables_action[] = array(
    'name' => 'fb_likebox_url',
    'value' => variable_get('fb_likebox_url', 'https://www.facebook.com/FacebookDevelopers'),
  );
  $variables_action[] = array(
    'name' => 'fb_likebox_colorscheme',
    'value' => variable_get('fb_likebox_colorscheme', 'light'),
  );
  $variables_action[] = array(
    'name' => 'fb_likebox_header',
    'value' => variable_get('fb_likebox_header', 'true'),
  );
  $variables_action[] = array(
    'name' => 'fb_likebox_stream',
    'value' => variable_get('fb_likebox_stream', 'true'),
  );
  $variables_action[] = array(
    'name' => 'fb_likebox_show_faces',
    'value' => variable_get('fb_likebox_show_faces', 'true'),
  );
  $variables_action[] = array(
    'name' => 'fb_likebox_scrolling',
    'value' => variable_get('fb_likebox_scrolling', 'no'),
  );
  $variables_action[] = array(
    'name' => 'fb_likebox_width',
    'value' => variable_get('fb_likebox_width', '292'),
  );
  $variables_action[] = array(
    'name' => 'fb_likebox_height',
    'value' => variable_get('fb_likebox_height', '556'),
  );
  $variables_action[] = array(
    'name' => 'fb_likebox_show_border',
    'value' => variable_get('fb_likebox_show_border', 'true'),
  );
  $variables_action[] = array(
    'name' => 'fb_likebox_force_wall',
    'value' => variable_get('fb_likebox_force_wall', 'false'),
  );
  $result[] = array(
    PATTERNS_MODIFY => $variables_action,
  );
  return $result;
}