Tuesday, September 20, 2016

How to Change the Login Logo in WordPress

function custom_loginlogo() {
echo '<style type="text/css">
h1 a {background-image: url('.get_bloginfo('template_directory').'/assets/images/logo.png) !important; }
</style>';
}
add_action('login_head', 'custom_loginlogo');

How to Change the Login Logo URL in WordPress

add_filter( 'login_headerurl', 'custom_loginlogo_url' );
function custom_loginlogo_url($url) {
    return 'http://www.your-site-url.com';
}

Tuesday, September 6, 2016

Javascript: Download PDF using javascript

Javascript: Download PFD using javascript



              var x= 'http://your-site/pdf-report/purchasing-report.pdf'; //PDF URL
              myTempWindow = window.open(x,'','left=10000,screenX=10000');
              myTempWindow.document.execCommand('SaveAs','null','download.pdf');

Javascript: Download PDF using javascript

Javascript: Download PFD using javascript



              var x= 'http://your-site/pdf-report/purchasing-report.pdf'; //PDF URL
              myTempWindow = window.open(x,'','left=10000,screenX=10000');
              myTempWindow.document.execCommand('SaveAs','null','download.pdf');

Javascript: Download PDF using javascript

Javascript: Download PFD using javascript



              var x= 'http://your-site/pdf-report/purchasing-report.pdf'; //PDF URL
              myTempWindow = window.open(x,'','left=10000,screenX=10000');
              myTempWindow.document.execCommand('SaveAs','null','download.pdf');