$value){ $g2_image[$key] = $value; } update_option('wpg2_g2ic', $g2_image); ?>

" size="10" / >

/>;   />


" size="50" / >



/>
/> NOTE: This setting only applies to images inserted as <img> tags, as WPG2 tag will always be wrapped with a div tag.', 'wpg2') ?>
" size="30" / >
" size="30" / >
" size="30" / >
" size="30" / >

$value){ $g2_image[$key] = $value; } // delete_option('wpg2_g2ic_30_archive'); } update_option('wpg2_g2ic', $g2_image); } /** * Stores G2IC Defaults on Deactivation * * @param None * @return None */ function g2image_deactivation() { // Get Gallery2 IC Option Settings $g2_image = get_option('wpg2_g2ic'); $g2ic_archive['g2ic_images_per_page'] = $g2_image['g2ic_images_per_page']; $g2ic_archive['g2ic_display_filenames'] = $g2_image['g2ic_display_filenames']; $g2ic_archive['g2ic_default_alignment'] = $g2_image['g2ic_default_alignment']; $g2ic_archive['g2ic_custom_class_1'] = $g2_image['g2ic_custom_class_1']; $g2ic_archive['g2ic_custom_class_2'] = $g2_image['g2ic_custom_class_2']; $g2ic_archive['g2ic_custom_class_3'] = $g2_image['g2ic_custom_class_3']; $g2ic_archive['g2ic_custom_class_4'] = $g2_image['g2ic_custom_class_4']; $g2ic_archive['g2ic_custom_url'] = $g2_image['g2ic_custom_url']; $g2ic_archive['g2ic_class_mode'] = $g2_image['g2ic_class_mode']; $g2ic_archive['g2ic_click_mode'] = $g2_image['g2ic_click_mode']; $g2ic_archive['g2ic_click_mode_variable'] = $g2_image['g2ic_click_mode_variable']; $g2ic_archive['g2ic_wpg2id_tags'] = $g2_image['g2ic_wpg2id_tags']; $g2ic_archive['g2ic_default_action'] = $g2_image['g2ic_default_action']; $g2ic_archive['g2ic_sortby'] = $g2_image['g2ic_sortby']; // Save the WPG2 Options into WPG2 Archive update_option('wpg2_g2ic_30_archive', $g2ic_archive); // Delete GIC Option delete_option('wpg2_g2ic'); } /* ******************************************************************************************************** TINYMCE ******************************************************************************************************** */ /** * Adds g2image to the TinyMCE button bar * * @param string $buttons the buttons string from the WP filter * @return string the appended buttons string */ function g2image_wp_extended_editor_mce_buttons($buttons) { array_push($buttons, 'separator', 'g2image'); return $buttons; } /** * Adds g2image to the TinyMCE button Toolbar * * @param null * @return null */ function g2image_addbuttons() { // Don't bother doing this stuff if the current user lacks permissions if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') ) return; // Add only in Rich Editor mode if ( get_user_option('rich_editing') == 'true') { add_filter("mce_external_plugins", "g2image_plugin"); add_filter('mce_buttons', 'g2image_wp_extended_editor_mce_buttons'); } } /** * Adds g2image to the TinyMCE plugins list * * @param string $plugins the buttons string from the WP filter * @return string the appended plugins string */ function g2image_plugin($plugin_array) { $plugin_array['g2image'] = get_bloginfo('wpurl').'/wp-content/plugins/wpg2/g2image/editor_plugin.js'; return $plugin_array; } /** * Adds Additional WPG2 Specific Elements to the TinyMCE valid elements list * * @param string $valid_elements the valid elements string from the WP filter * @return string the appended valid elements string */ function g2image_wp_extended_editor_mce_valid_elements($valid_elements) { $valid_elements .= 'wpg2,wpg2id,div[class]'; return $valid_elements; } /** * Adds WPG2 Button to Wordpress Selected (Typically Write) Screens * * Javascript appended to the bottom of the "Write Post" or "Write Page" admin pages for the WPG2 quicktag. */ function g2image_callback() { $g2image_url = get_bloginfo('wpurl').'/wp-content/plugins/wpg2/g2image/'; // Only add the javascript to post.php, post-new.php, page.php, page-new.php, or bookmarklet.php pages if (strpos($_SERVER['REQUEST_URI'], 'post.php') || strpos($_SERVER['REQUEST_URI'], 'post-new.php') || strpos($_SERVER['REQUEST_URI'], 'page.php') || strpos($_SERVER['REQUEST_URI'], 'page-new.php') || strpos($_SERVER['REQUEST_URI'], 'bookmarklet.php')) { ?> if(g2_toolbar){ var theButton = document.createElement('input'); theButton.type = 'button'; theButton.value = ''; theButton.onclick = ; theButton.className = 'ed_button'; theButton.title = ""; theButton.id = ""; g2_toolbar.appendChild(theButton); }