public function add_product_designer() { global $post; $product_settings = new FPD_Product_Settings($post->ID); $open_in_lightbox = $product_settings->get_option('open_in_lightbox') && trim($product_settings->get_option('start_customizing_button')) != ''; if (is_fancy_product($product_settings->master_id) && (!$product_settings->customize_button_enabled || $open_in_lightbox)) { FPD_Scripts_Styles::$add_script = true; $selector = 'fancy-product-designer-' . $product_settings->master_id . ''; //get availabe fonts $available_fonts = $product_settings->get_option('font_families[]') === false ? FPD_Fonts::get_enabled_fonts() : $product_settings->get_option('font_families[]'); if (!is_array($available_fonts)) { $available_fonts = str_split($available_fonts, strlen($available_fonts)); } //woocommerce if (get_post_type($post) === 'product') { $this->output_wc_start(); } //get assigned categories $fancy_content_ids = fpd_has_content($product_settings->master_id); if (!is_array($fancy_content_ids) || sizeof($fancy_content_ids) === 0) { return; } //define the designer margins $designer_margins = $product_settings->get_option('designer_margin'); $margin_styles = ''; if (!empty($designer_margins)) { @parse_str($designer_margins, $designer_margins); foreach ($designer_margins as $margin_key => $margin_val) { $margin_styles .= 'margin-' . $margin_key . ':' . $margin_val . 'px;'; } } //add class if lightbox is enabled $modal_box_css = $open_in_lightbox ? ' fpd-lightbox-enabled' : ''; $source_type = get_post_meta($product_settings->master_id, 'fpd_source_type', true); ?> <div id="<?php echo $selector; ?> " class="fpd-container <?php echo $product_settings->get_option('frame_shadow'); echo $modal_box_css; ?> " style="float: <?php echo $product_settings->get_option('designer_floating'); ?> ; <?php echo $margin_styles; ?> "> <?php foreach ($fancy_content_ids as $fancy_content_id) { if (empty($source_type) || $source_type == 'category') { $fancy_category = new Fancy_Category($fancy_content_id); echo '<div class="fpd-category" title="' . esc_attr($fancy_category->get_data()->title) . '">'; $fancy_products_data = $fancy_category->get_products(); foreach ($fancy_products_data as $fancy_product_data) { echo $this->get_product_html($fancy_product_data->ID); } echo '</div>'; //category } else { echo $this->get_product_html($fancy_content_id); } } //output designs if (!intval($product_settings->get_option('hide_designs_tab'))) { require_once FPD_PLUGIN_DIR . '/inc/class-designs.php'; $fpd_designs = new FPD_Designs($product_settings->get_option('design_categories[]') ? $product_settings->get_option('design_categories[]') : array(), $product_settings->get_image_parameters()); $fpd_designs->output(); } ?> </div> <p class="fpd-not-supported-device-info"> <strong><?php echo fpd_get_option('fpd_label_not_supported_device_info'); ?> </strong> </p> <script type="text/javascript"> var fancyProductDesigner, $selector, $productWrapper, $cartForm, productCreated = false, fpdPrice = 0, isReady = false, $modalWrapper = null; <?php echo fpd_get_option('fpd_jquery_no_conflict') === 'on' ? 'jQuery.noConflict();' : ''; ?> jQuery(document).ready(function() { //return; $selector = jQuery('#<?php echo $selector; ?> '); $productWrapper = jQuery('.post-<?php echo $post->ID; ?> '); $cartForm = jQuery('[name="fpd_product"]:first').parents('form:first'); var buttonClass = "<?php echo esc_attr(fpd_get_option('fpd_start_customizing_css_class')) == '' ? 'fpd-modal-button' : trim(fpd_get_option('fpd_start_customizing_css_class')); ?> ", productDesignerWidth = <?php echo $product_settings->get_option('stage_width'); ?> , customizeBtn = jQuery('#fpd-start-customizing-button'); if(jQuery('.fpd-lightbox-enabled').size() > 0) { $modalWrapper = jQuery('body').append('<div class="fpd-product-lightbox fpd-modal-overlay"><div class="fpd-modal-wrapper"><div class="fpd-modal-buttons"><a href="#" id="fpd-modal-done" class="'+buttonClass+'"><?php echo fpd_get_option('fpd_label_lightbox_submit_button'); ?> </a><a href="#" id="fpd-modal-cancel" class="'+buttonClass+'"><?php echo fpd_get_option('fpd_label_lightbox_cancel_button'); ?> </a></div></div></div>').find('.fpd-modal-wrapper'); $selector.clone().prependTo($modalWrapper); $selector.remove(); $selector = jQuery('#<?php echo $selector; ?> '); jQuery(window).resize(function() { $modalWrapper.css('margin-left', -($modalWrapper.outerWidth() / 2)+'px'); }); customizeBtn.click(function(evt) { if(!isReady) { return false; } jQuery('html,body').addClass('fpd-modal-open'); $modalWrapper.parent('.fpd-modal-overlay').fadeIn(300, function() { jQuery('.fpd-context-dialog').removeClass('fpd-modal-hidden'); }); jQuery(window).resize(); evt.preventDefault(); }); $modalWrapper.on('click', '#fpd-modal-done', function(evt) { jQuery('#fpd-modal-cancel').click(); if(<?php echo intval(fpd_get_option('fpd_lightbox_add_to_cart')); ?> ) { $cartForm.find(':submit').click(); } evt.preventDefault(); }) .on('click', '#fpd-modal-cancel', function(evt) { fancyProductDesigner.closeDialog(); jQuery('html,body').removeClass('fpd-modal-open'); $modalWrapper.parent('.fpd-modal-overlay').fadeOut(200); evt.preventDefault(); }); } if(jQuery('.fpd-share-design').size() > 0) { jQuery('#fpd-share-button').click(function(evt) { evt.preventDefault(); var scale = $selector.width() > 800 ? Number(800 / $selector.width()).toFixed(2) : 1; var data = { action: 'fpd_createshareurl', image: fancyProductDesigner.getProductDataURL('png', 'transparent', scale), product: JSON.stringify(fancyProductDesigner.getProduct()), }; jQuery(".fpd-share-widget, .fpd-share-url").addClass('fpd-hidden'); jQuery('.fpd-share-process').removeClass('fpd-hidden'); jQuery.post("<?php echo admin_url('admin-ajax.php'); ?> ", data, function(response) { if(response.share_id !== undefined) { var pattern = new RegExp('(share_id=).*?(&|$)'), shareUrl = window.location.href; if(shareUrl.search(pattern) >= 0){ shareUrl = shareUrl.replace(pattern,'$1' + response.share_id + '$2'); } else{ shareUrl = shareUrl + (shareUrl.indexOf('?')>0 ? '&' : '?') + 'share_id=' + response.share_id; } <?php $shares = fpd_get_option('fpd_sharing_social_networks'); ?> jQuery(".fpd-share-widget").empty().jsSocials({ url: shareUrl, shares: <?php echo is_array($shares) ? json_encode($shares) : '[' . $shares . ']'; ?> , showLabel: false, text: "<?php echo fpd_get_option('fpd_label_sharing_default_text'); ?> " }).removeClass('fpd-hidden'); } jQuery('.fpd-share-process').addClass('fpd-hidden'); jQuery('.fpd-share-url').attr('href', shareUrl).text(shareUrl).removeClass('fpd-hidden'); }, 'json'); }); } var customImagesParams = jQuery.extend(<?php echo $product_settings->get_image_parameters_string(); ?> , <?php echo $product_settings->get_custom_image_parameters_string(); ?> ); var socialPhotoAjaxSettingsOpt = { url: "<?php echo plugins_url('/inc/get_image_data_url.php', FPD_PLUGIN_ROOT_PHP); ?> " }; if("<?php echo fpd_get_option('fpd_type_of_uploader'); ?> " == 'php') { socialPhotoAjaxSettingsOpt = { url: "<?php echo admin_url('admin-ajax.php'); ?> ", data: { action: 'fpd_uploadsocialphoto' } }; } //call fancy product designer plugin fancyProductDesigner = $selector.fancyProductDesigner({ width: productDesignerWidth, stageHeight: <?php echo $product_settings->get_option('stage_height'); ?> , imageDownloadable: <?php echo $this->disable_export_btns ? 0 : fpd_get_option('fpd_download_product_image'); ?> , saveAsPdf: <?php echo $this->disable_export_btns ? 0 : fpd_get_option('fpd_pdf_button'); ?> , printable: <?php echo $this->disable_export_btns ? 0 : fpd_get_option('fpd_print'); ?> , allowProductSaving: <?php echo fpd_get_option('fpd_allow_product_saving'); ?> , fonts: [<?php echo '"' . implode('", "', $available_fonts) . '"'; ?> ], templatesDirectory: "<?php echo plugins_url('/templates/', FPD_PLUGIN_ROOT_PHP); ?> ", phpDirectory: "<?php echo plugins_url('/inc/', FPD_PLUGIN_ROOT_PHP); ?> ", facebookAppId: "<?php echo fpd_get_option('fpd_facebook_app_id'); ?> ", instagramClientId: "<?php echo fpd_get_option('fpd_instagram_client_id'); ?> ", instagramRedirectUri: "<?php echo fpd_get_option('fpd_instagram_redirect_uri'); ?> ", patterns: [<?php echo implode(',', $this->get_pattern_urls()); ?> ], viewSelectionPosition: "<?php echo $product_settings->get_option('view_selection_position'); ?> ", viewSelectionFloated: <?php echo $product_settings->get_option('view_selection_floated'); ?> , zoomStep: <?php echo fpd_get_option('fpd_zoom_step'); ?> , maxZoom: <?php echo fpd_get_option('fpd_max_zoom'); ?> , tooltips: <?php echo intval(fpd_get_option('fpd_tooltips')); ?> , hexNames: <?php echo FPD_Settings_Advanced_Colors::get_hex_names_object_string(); ?> , selectedColor: "<?php echo fpd_get_option('fpd_selected_color'); ?> ", boundingBoxColor: "<?php echo fpd_get_option('fpd_bounding_box_color'); ?> ", outOfBoundaryColor: "<?php echo fpd_get_option('fpd_out_of_boundary_color'); ?> ", paddingControl: <?php echo fpd_get_option('fpd_padding_controls'); ?> , replaceInitialElements: <?php echo $product_settings->get_option('replace_initial_elements'); ?> , lazyLoad: <?php echo fpd_get_option('fpd_lazy_load'); ?> , dialogBoxPositioning: "<?php echo $product_settings->get_option('dialog_box_positioning'); ?> ", socialPhotoAjaxSettings: socialPhotoAjaxSettingsOpt, elementParameters: { originX: "<?php echo fpd_get_option('fpd_common_parameter_originX'); ?> ", originY: "<?php echo fpd_get_option('fpd_common_parameter_originY'); ?> " }, imageParameters: { colorPrices: <?php echo $product_settings->get_option('enable_image_color_prices') ? FPD_Settings_Advanced_Colors::get_color_prices() : '{}'; ?> }, textParameters: { font: "<?php echo fpd_get_option('fpd_font'); ?> ", colorPrices: <?php echo $product_settings->get_option('enable_text_color_prices') ? FPD_Settings_Advanced_Colors::get_color_prices() : '{}'; ?> }, customImageParameters: customImagesParams, customTextParameters: <?php echo $product_settings->get_custom_text_parameters_string(); ?> , labels: <?php echo FPD_Settings_Labels::get_labels_object_string(array('fpd_label_uploadedDesignSizeAlert' => array('minW' => $product_settings->get_option('uploaded_designs_parameter_minW'), 'minH' => $product_settings->get_option('uploaded_designs_parameter_minH'), 'maxW' => $product_settings->get_option('uploaded_designs_parameter_maxW'), 'maxH' => $product_settings->get_option('uploaded_designs_parameter_maxH')))); ?> , customAdds: { uploads: <?php echo $product_settings->get_option('hide_custom_image_upload') ? 0 : intval(fpd_get_option('fpd_upload_designs')); ?> , texts: <?php echo $product_settings->get_option('hide_custom_text') ? 0 : intval(fpd_get_option('fpd_custom_texts')); ?> , facebook: <?php echo $product_settings->get_option('hide_facebook_tab') ? 0 : 1; ?> , instagram: <?php echo $product_settings->get_option('hide_instagram_tab') ? 0 : 1; ?> } }).data('fancy-product-designer'); //when load from cart or order, use loadProduct $selector.on('ready', function() { if(jQuery('.fpd-lightbox-enabled').size() > 0) { jQuery('.fpd-context-dialog').addClass('fpd-modal-hidden'); } if(<?php echo $this->form_views === null ? 0 : 1; ?> ) { var views = <?php echo $this->form_views === null ? 0 : $this->form_views; ?> ; fancyProductDesigner.loadProduct(views); } //replace filereader uploader with php uploader if("<?php echo fpd_get_option('fpd_type_of_uploader'); ?> " == 'php') { var $imageInput = jQuery('body').find('.fpd-input-image'); jQuery('body').find('.fpd-upload-form').off('change').change(function() { <?php $login_required = fpd_get_option('fpd_upload_designs_php_logged_in') !== 0 && !is_user_logged_in() ? 1 : 0; ?> if ( <?php echo $login_required; ?> ) { fancyProductDesigner.showModal("<?php _e('You need to be logged in to upload images!', 'radykal'); ?> "); $imageInput.val(''); return; } jQuery('body').find('.fpd-upload-form').ajaxSubmit({ url: "<?php echo admin_url('admin-ajax.php'); ?> ", dataType: 'json', data: { action: 'fpduploadimage', product_id: <?php echo $post->ID; ?> }, type: 'post', beforeSubmit: function(arr, $form, options) { $phpUploaderInfo.addClass('fpd-show-up') .children('p:first').text('<?php _e('Uploading', 'radykal'); ?> '+': '+arr[0].value.name); $progressBar.children('.fpd-progress-bar-move').css('width', 0); }, success: function(responseText, statusText) { if(responseText.code == 200) { //successfully uploaded fancyProductDesigner.addCustomImage(responseText.url, responseText.filename); } else { //failed fancyProductDesigner.showModal(responseText.message); } $imageInput.val(''); $phpUploaderInfo.removeClass('fpd-show-up'); }, error: function() { $imageInput.val(''); $phpUploaderInfo.removeClass('fpd-show-up'); fancyProductDesigner.showModal("<?php _e('Server error: Image could not be uploaded, please try again!', 'radykal'); ?> "); }, uploadProgress: function(evt, pos, total, percentComplete) { $progressBar.children('.fpd-progress-bar-move').css('width', percentComplete+'%'); } }); }) jQuery('body').append('<div class="fpd-php-uploader-info fpd-snackbar fpd-shadow-1"><p></p><div class="fpd-upload-progess-bar"><div class="fpd-progress-bar-bg"></div><div class="fpd-progress-bar-move"></div></div></div>'); $phpUploaderInfo = jQuery('body').children('.fpd-php-uploader-info'); $progressBar = $phpUploaderInfo.children('.fpd-upload-progess-bar'); } //hide loading icon in customize btn customizeBtn.removeClass('fpd-disabled') .text(customizeBtn.attr('title')).removeAttr('title'); isReady = true; }); }); </script> <?php //woocommerce if (get_post_type($post) === 'product') { $this->output_wc_js(); } else { $this->output_shortcode_js(); } } }
var $fancyProductDesigner = jQuery('#fpd-order-designer'), $customElementsList = jQuery('#fpd-custom-elements-list'), customElements = null; $orderImageList = jQuery('#fpd-order-image-list'); jQuery(document).ajaxError( function(e, xhr, settings, exception) { //console.log(e, xhr, settings, exception); }); fancyProductDesigner = $fancyProductDesigner.fancyProductDesigner({ width: stageWidth, stageHeight: stageHeight, editorMode: '#fpd-editor-box-wrapper', fonts: [<?php echo '"' . implode('", "', FPD_Fonts::get_enabled_fonts()) . '"'; ?> ], templatesDirectory: "<?php echo plugins_url('/templates/', dirname(dirname(__FILE__))); ?> ", tooltips: true }).data('fancy-product-designer'); //api buttons first available when $fancyProductDesigner.on('ready', function() { isReady = true; }) .on('productCreate', function() {
<!-- Text Options --> <table class="form-table" id="text-options"> <tbody> <tr> <th><?php _e('Font', 'radykal'); ?> </th> <td> <select name="font" data-placeholder="<?php _e('Select a font', 'radykal'); ?> " class="fpd-font-changer radykal-select2" style="width: 100%"> <?php foreach (FPD_Fonts::get_enabled_fonts() as $font) { echo "<option value='{$font}' style='font-family: {$font};'>{$font}</option>"; } ?> </select> </td> </tr> <tr> <th><?php _e('Styling', 'radykal'); ?> </th> <td> <span class="fpd-text-styling" style="margin-right: 20px;"> <a href="#" class="fpd-bold button"><i class="fpd-admin-icon-format-bold"></i></a> <a href="#" class="fpd-italic button"><i class="fpd-admin-icon-format-italic"></i></a>
public function enqueue_styles() { global $post; if (fpd_get_option('fpd_sharing')) { wp_enqueue_style('fpd-jssocials'); } wp_enqueue_style('jquery-fpd'); wp_enqueue_style('fpd-single-product', plugins_url('/css/fancy-product.css', FPD_PLUGIN_ROOT_PHP), false, Fancy_Product_Designer::VERSION); //only enqueue css and js files when necessary $product_settings = new FPD_Product_Settings($post->ID); if (is_fancy_product($post->ID)) { ?> <style type="text/css"> /* Styling */ .fancy-product .fpd-primary-bg-color { background-color: <?php echo fpd_get_option('fpd_designer_primary_color'); ?> ; } .fancy-product .fpd-primary-text-color, .fancy-product .fpd-primary-text-color:hover { color: <?php echo fpd_get_option('fpd_designer_primary_text_color'); ?> ; } .fancy-product .fpd-secondary-bg-color { background-color: <?php echo fpd_get_option('fpd_designer_secondary_color'); ?> !important; } .fancy-product .fpd-secondary-text-color, .fancy-product .fpd-secondary-text-color:hover { color: <?php echo fpd_get_option('fpd_designer_secondary_text_color'); ?> !important; } .fancy-product .fpd-tabs > .fpd-btn.fpd-checked { border-color: <?php echo fpd_get_option('fpd_designer_secondary_color'); ?> ; } .fancy-product .fpd-checked i { color: <?php echo fpd_get_option('fpd_designer_secondary_color'); ?> !important; } <?php if ($product_settings->get_option('background_type')) { ?> .fpd-product-stage { background: <?php echo $product_settings->get_option('background_type') == 'color' ? $product_settings->get_option('background_color') : 'url(' . $product_settings->get_option('background_image') . ')'; ?> !important; } <?php } ?> <?php echo stripslashes(get_option('fpd_custom_css')); ?> </style> <?php FPD_Fonts::output_webfont_links(); } }
public function enqueue_styles_scripts($hook) { if (function_exists('get_woocommerce_currency') && version_compare(WC_VERSION, '2.3.0', '<')) { wp_register_style('select2', '//cdnjs.cloudflare.com/ajax/libs/select2/3.5.2/select2.min.css', false, '3.5.2'); wp_register_script('select2', '//cdnjs.cloudflare.com/ajax/libs/select2/3.5.2/select2.min.js', array('jquery'), '3.5.2'); } wp_register_style('fpd-admin-icon-font', plugins_url('/css/icon-font.css', __FILE__), false, Fancy_Product_Designer::VERSION); wp_register_style('fpd-admin', plugins_url('/css/admin.css', __FILE__), array('radykal-tooltipster'), Fancy_Product_Designer::VERSION); wp_register_script('fpd-admin', plugins_url('/js/admin.js', __FILE__), array('jquery', 'radykal-tooltipster'), Fancy_Product_Designer::VERSION); wp_localize_script('fpd-admin', 'fpd_admin_opts', array('adminAjaxUrl' => admin_url('admin-ajax.php'), 'ajaxNonce' => FPD_Admin::$ajax_nonce, 'enterTitlePrompt' => __('Please enter a title', 'radykal'), 'tryAgain' => __('Something went wrong. Please try again!', 'radykal'), 'addToLibrary' => __('Add imported image source to media library?', 'radykal'), 'remove' => __('Are you sure you want to delete it?.', 'radykal'))); global $post; //woocommerce post types if ($hook == 'post-new.php' || $hook == 'post.php') { if ('shop_order' === $post->post_type) { FPD_Fonts::output_webfont_links(); wp_enqueue_style('jquery-fpd'); wp_enqueue_style('fpd-admin-icon-font'); wp_enqueue_style('fpd-admin'); wp_enqueue_script('jquery-fpd'); wp_enqueue_script('fpd-admin'); } else { wp_enqueue_style('wp-color-picker'); wp_enqueue_style('radykal-admin'); wp_enqueue_style('fpd-admin'); wp_enqueue_script('wp-color-picker'); wp_enqueue_script('radykal-admin'); wp_enqueue_script('fpd-admin'); if ('product' === $post->post_type) { wp_enqueue_style('select2'); wp_enqueue_script('select2'); } else { wp_enqueue_style('radykal-select2'); wp_enqueue_script('radykal-select2'); } } } //manage fancy products if ($hook == 'toplevel_page_fancy_product_designer') { wp_enqueue_media(); wp_enqueue_style('fpd-admin-icon-font'); wp_enqueue_style('radykal-admin'); wp_enqueue_style('fpd-admin'); wp_enqueue_script('fpd-admin'); wp_enqueue_script('fpd-manage-fancy-products', plugins_url('/js/manage-fancy-products.js', __FILE__), array('jquery-ui-core', 'jquery-ui-mouse', 'jquery-ui-sortable'), Fancy_Product_Designer::VERSION); wp_localize_script('fpd-manage-fancy-products', 'fpd_fancy_products_opts', array('adminAjaxUrl' => admin_url('admin-ajax.php'), 'ajaxNonce' => FPD_Admin::$ajax_nonce, 'enterTitlePrompt' => __('Please enter a title', 'radykal'), 'remove' => __('Are you sure you want to delete it?.', 'radykal'), 'tryAgain' => __('Something went wrong. Please try again!', 'radykal'), 'selectProduct' => __('Please select a Fancy Product first to assign the category!', 'radykal'), 'nothingToExport' => __('This product does not contain any views!', 'radykal'), 'addToLibrary' => __('Add imported image source to media library?', 'radykal'), 'noJSON' => __('Sorry, but the selected file is not a valid JSON object. Are you sure you have selected the correct file to import?', 'radykal'), 'chooseThumbnail' => __('Choose a thumbnail', 'radykal'))); } //product builder if ($hook == 'fancy-product-designer_page_fpd_product_builder') { wp_enqueue_media(); wp_enqueue_style('radykal-select2'); wp_enqueue_style('radykal-tagsmanager'); wp_enqueue_style('fpd-admin-icon-font'); wp_enqueue_style('radykal-admin'); wp_enqueue_style('fpd-admin'); wp_enqueue_style('fpd-fonts'); FPD_Fonts::output_webfont_links(); wp_register_script('fpd-product-builder', plugins_url('/js/product-builder.js', __FILE__), array('jquery-ui-core', 'jquery-ui-mouse', 'jquery-ui-sortable', 'jquery-ui-spinner', 'jquery-ui-widget', 'radykal-tagsmanager', 'radykal-select2', 'radykal-admin', 'fpd-admin'), Fancy_Product_Designer::VERSION); wp_localize_script('fpd-product-builder', 'fpd_product_builder_opts', array('adminUrl' => admin_url(), 'originX' => fpd_get_option('fpd_common_parameter_originx'), 'originY' => fpd_get_option('fpd_common_parameter_originy'), 'paddingControl' => fpd_get_option('fpd_padding_controls'), 'defaultFont' => get_option('fpd_default_font') ? get_option('fpd_default_font') : 'Arial', 'enterTitlePrompt' => __('Enter a title for the element', 'radykal'), 'chooseElementImageTitle' => __('Choose an element image', 'radykal'), 'set' => __('Set', 'radykal'), 'enterYourText' => __('Enter your text.', 'radykal'), 'removeElement' => __('Remove element?', 'radykal'), 'notChanged' => __('You have not saved your changes!', 'radykal'), 'changeImageSource' => __('Change Image Source', 'radykal'))); wp_enqueue_script('fpd-curved-text', plugins_url('/js/fabric.curvedText.js', __FILE__), array('fabric')); wp_enqueue_script('fpd-webfont', plugins_url('/js/webfont.js', __FILE__)); wp_enqueue_script('fpd-product-builder'); } //manage designs if ($hook == 'fancy-product-designer_page_fpd_manage_designs') { wp_enqueue_media(); wp_enqueue_style('radykal-select2'); wp_enqueue_style('fpd-admin-icon-font'); wp_enqueue_style('radykal-admin'); wp_enqueue_style('fpd-admin'); wp_enqueue_script('radykal-select2'); wp_enqueue_script('radykal-admin'); wp_enqueue_script('fpd-admin'); wp_enqueue_script('fpd-manage-fancy-designs', plugins_url('/js/manage-fancy-designs.js', __FILE__), Fancy_Product_Designer::VERSION); wp_localize_script('fpd-manage-fancy-designs', 'fpd_fancy_designs_opts', array('chooseDesign' => __('Choose a Design Image', 'radykal'))); } //shortcode orders if ($hook == 'fancy-product-designer_page_fpd_orders') { FPD_Fonts::output_webfont_links(); wp_enqueue_style('jquery-fpd'); wp_enqueue_style('fpd-admin-icon-font'); wp_enqueue_style('fpd-admin'); wp_enqueue_script('jquery-fpd'); wp_enqueue_script('fpd-admin'); } //settings if ($hook == 'fancy-product-designer_page_fpd_settings') { wp_enqueue_style('radykal-select2'); wp_enqueue_style('radykal-admin'); wp_enqueue_style('fpd-admin'); wp_enqueue_style('wp-color-picker'); wp_enqueue_script('radykal-ace-editor'); wp_enqueue_script('radykal-select2'); wp_enqueue_script('radykal-admin'); wp_enqueue_script('wp-color-picker'); wp_enqueue_script('fpd-admin'); } }
</select> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('Available Fonts', 'radykal'); ?> </label></th> <td> <select class="radykal-select2" name="font_families[]" multiple data-placeholder="<?php _e('All Fonts', 'radykal'); ?> " style="width: 100%;"> <?php //get all created categories $fonts = FPD_Fonts::get_enabled_fonts(); foreach ($fonts as $font) { echo '<option value="' . $font . '">' . $font . '</option>'; } ?> </select> </td> </tr> <tr valign="top"> <th scope="row"><label><?php _e('"Start Customizing" Button', 'radykal'); ?> </label></th> <td><input type="text" name="start_customizing_button" value="<?php echo fpd_get_option('fpd_start_customizing_button'); ?>