$value){
$wpg2_g2path[$key] = $value;
}
// Update G2 Paths & Validate
if ($wpg2_g2path['g2_url']) {
$wpg2base = 'wp-content'.DIRECTORY_SEPARATOR.'plugins'.DIRECTORY_SEPARATOR.'wpg2';
@include_once(ABSPATH . $wpg2base . DIRECTORY_SEPARATOR . 'g2embeddiscoveryutilities.class');
$wpg2_g2path['g2_url'] = G2EmbedDiscoveryUtilities::normalizeG2Uri($wpg2_g2path['g2_url']);
}
$doubleslash = DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR;
$wpg2_g2path['g2_filepath'] = str_replace($doubleslash,DIRECTORY_SEPARATOR,$wpg2_g2path['g2_filepath']);
$wpg2_g2path['g2_filepath'] = str_replace($doubleslash,DIRECTORY_SEPARATOR,$wpg2_g2path['g2_filepath']);
$wpg2_g2path['g2_filepath'] = str_replace('/', DIRECTORY_SEPARATOR, $wpg2_g2path['g2_filepath']);
$wpg2_g2path['wpg2_relativepath'] = str_replace($doubleslash,DIRECTORY_SEPARATOR,$wpg2_g2path['wpg2_relativepath']);
$wpg2_g2path['wpg2_relativepath'] = str_replace($doubleslash,DIRECTORY_SEPARATOR,$wpg2_g2path['wpg2_relativepath']);
update_option('wpg2_g2paths', $wpg2_g2path);
}
// Verify WPG2 Internal g2_embeduri setting & Revalidate
wpg2_template_page();
wpg2_validate('silent');
}
//Get Current Gallery2 Plug-in Options
$wpg2_option = get_option('wpg2_options');
$wpg2_g2path = get_option('wpg2_g2paths');
// Validate Paths To Help Pin Point Errors.
if (!$validate_err) {
if (!$wpg2_g2path['g2_url']) {
$valmessage = ''.__('Validation Error: URL to your Gallery2 is Missing.','wpg2').'';
$validate_err=1;
}
}
if (!$validate_err) {
if ($wpg2_g2path['g2_url']) {
$ret = wpg2_validateuri($wpg2_g2path['g2_url'].'embed.php');
if ($ret) {
// Return the Error
$valmessage = ''.__('Possible Validation Problem with Gallery2 URL:').$ret.'';
$validate_warning=1;
}
}
}
if (!$validate_err) {
if (!file_exists($wpg2_g2path['g2_filepath'].$wpg2_g2path['wpg2_relativepath'].DIRECTORY_SEPARATOR.'templates'.DIRECTORY_SEPARATOR.'wpg2imageblock.tpl' ) ) {
$valmessage = ''.__('Validation Error: WPG2 plugin cannot validate the Gallery2 to WPG2 Relative Path ','wpg2').$wpg2_g2path['g2_filepath'].$wpg2_g2path['wpg2_relativepath'].DIRECTORY_SEPARATOR.'templates'.DIRECTORY_SEPARATOR.'wpg2imageblock.tpl';
$validate_err=1;
}
}
?>
$value){
$wpg2_option[$key] = $value;
}
update_option('wpg2_options', $wpg2_option);
?>
$value){
$wpg2_option[$key] = $value;
}
update_option('wpg2_options', $wpg2_option);
?>
$value){
$wpg2_option[$key] = $value;
}
update_option('wpg2_options', $wpg2_option);
?>
$value){
$wpg2_option[$key] = $value;
}
update_option('wpg2_options', $wpg2_option);
?>
$value){
$wpg2_option[$key] = $value;
}
update_option('wpg2_options', $wpg2_option);
?>