| Server IP : 104.26.4.103 / Your IP : 216.73.216.4 Web Server : nginx/1.27.1 System : Linux in-5 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64 User : arabianexpress ( 1872) PHP Version : 8.0.30 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /storage/v9321/leapdubai/public_html/wp-content/themes/printx/inc/js/ |
Upload File : |
(function($) {
"use strict";
$(document).ready(function(){
/** white logo **/
$('button#primary_logo_info').on('click', (function( e ){
e.preventDefault();
var imageUploader = wp.media({
'title' : 'Upload White Logo',
'button' : {
'text' : 'Set White Logo'
},
'multiple' : false
});
imageUploader.open();
imageUploader.on('select', function(){
var image = imageUploader.state().get("selection").first().toJSON();
var link = image.url;
$('input.primary_logo_link').val( link );
$('.primary-logo-show img').attr( 'src', link );
});
}));
/** dark logo **/
$('button#dark_logo_info').on('click', (function( e ){
e.preventDefault();
var imageUploader = wp.media({
'title' : 'Upload Dark Logo',
'button' : {
'text' : 'Set Dark Logo'
},
'multiple' : false
});
imageUploader.open();
imageUploader.on('select', function(){
var image = imageUploader.state().get("selection").first().toJSON();
var link = image.url;
$('input.dark_logo_link').val( link );
$('.dark-logo-show img').attr( 'src', link );
});
}));
/** others info **/
$('button#author_info_image').on('click', (function( e ){
e.preventDefault();
var imageUploader = wp.media({
'title' : 'Upload Image',
'button' : {
'text' : 'Set Image'
},
'multiple' : false
});
imageUploader.open();
var button = $(this);
imageUploader.on('select', function(){
var image = imageUploader.state().get("selection").first().toJSON();
var link = image.url;
button.next('input.image_er_link').val( link );
button.parent('.widget_field').find('img').attr( 'src', link );
});
}));
});
})(jQuery);