$PGP_Show_Image_Label = $_POST['PGP_Show_Image_Label']; $PGP_Gallery_Layout = $_POST['PGP_Gallery_Layout']; $PGP_Open_Link = $_POST['PGP_open_link']; $PGP_Color = $_POST['PGP_Color']; $PGP_Font_Style = $_POST['PGP_Font_Style']; $PGP_Light_Box = $_POST['PGP_Light_Box']; $PGP_Image_Border = $_POST['PGP_Image_Border']; $PGP_Custom_CSS = $_POST['PGP_Custom_CSS']; $PGP_Settings_Array = serialize(array('PGP_Effect' => $PGP_Effect, 'PGP_Effect_animation' => $PGP_Effect_animation, 'PGP_Show_Gallery_Title' => $PGP_Show_Gallery_Title, 'PGP_Show_Image_Label' => $PGP_Show_Image_Label, 'PGP_Gallery_Layout' => $PGP_Gallery_Layout, 'PGP_Open_Link' => $PGP_Open_Link, 'PGP_Color' => $PGP_Color, 'PGP_Font_Style' => $PGP_Font_Style, 'PGP_Light_Box' => $PGP_Light_Box, 'PGP_Image_Border' => $PGP_Image_Border, 'PGP_Custom_CSS' => $PGP_Custom_CSS)); $PGP_Gallery_Settings = "PGP_Gallery_Settings_" . $PostID; update_post_meta($PostID, $PGP_Gallery_Settings, $PGP_Settings_Array); } } } global $PGP; $PGP = PGP::forge(); /** * Gallery Plugin Pro Short Code [PGP]. */ require_once "photo-gallery-short-code.php"; add_action('media_buttons', 'pgp_custom_button', 16); add_action('admin_footer', 'pgp_inline_popup_content'); function pgp_custom_button() { $img = plugins_url('/images/gallery.png', __FILE__); $container_id = 'PGP'; echo '<a class="button button-primary thickbox" title="' . __("Select Gallery to insert into post", PGP_TEXT_DOMAIN) . '" href="#TB_inline?width=400&inlineId=' . $container_id . '"> <span class="wp-media-buttons-icon" style="background: url(' . $img . '); background-repeat: no-repeat; background-position: left bottom;"></span> ' . __("Gallery Shortcode", "PGP_TEXT_DOMAIN") . ' </a>';