web analytics

How to add comments in a batch file

The keyword REM (short for remarks) is used to add comments in batch file. Following are some examples of comments:

rem This batch file provides an example 

rem to add comments in batch file.

rem the keyword rem must be followed by a space to work correctly.

rem

rem Clear the screen in following statement.

cls

 

What does the “@” sign mean in “@echo off “?

By default, the echo feature is on in MS-DOS-based (and later, Windows) systems when executing a batch file. That means that every command issued in a batch file (and all of its output) would be echoed to the screen. By issuing, the ‘echo off’ command, this feature is turned off but as a result of issuing that command, the command itself will still show up on the screen. By including the ‘@’ symbol in ‘@echo off’, it will prevent the ‘echo off’ command from being seen on the screen.

How to disable / enable comments on WordPress

To enable / disable comments on wordpress posts login to admin panel, got to Settings -> Discussion. Here you will find a check box as follows:

Uncheck the highlighted check box to disable comments on all future posts.

 

How to Increase the Maximum File Upload Size in WordPress

WordPress provides a filter upload_size_limit  to  set the limit of  maximum upload size.

A simple way to set maximum upload size for frondend as well as admin dashbaord  just add following code to the end of file functions.php in active wordpress theme.

function filter_site_upload_size_limit( $size ) {

// Set the upload size limit to 20 MB for users lacking the ‘manage_options’ capability.

$size = 1024 *1024*20;

return $size;

}
add_filter( ‘upload_size_limit’, ‘filter_site_upload_size_limit’, 20 );

In case you need to increase file upload size for admin side only use following code:

function filter_site_upload_size_limit( $size ) {

// Set the upload size limit to 20 MB for users lacking the ‘manage_options’ capability.

$size = 1024 *1024*20;

return $size;

}

function set_max_file_upload_size_for_admin()

{

add_filter( ‘upload_size_limit’, ‘filter_site_upload_size_limit’, 20 );

}

add_action(“admin_init”, “set_max_file_upload_size_for_admin”);

 

Find the version of running instance of wordpress

Version of installed wordpress can be found by number of ways. We explain here one by one

WordPress files

Version.php

If you have cpanel of FTP access  then locate the file wp-includes/version.php and you will find following:

/**

* The WordPress version string

*

* @global string $wp_version

*/

$wp_version = ‘4.7.3’;  // current version of installed wordpress.

about.php

Login using username and password of administrator and type following in browser address bar:

https://<you-domain.com>/wp-admin/about.php

and it will display detail of currently installed wordpress including version.

Readme.html File

Generally readme.html file is publically accessible on websites and can be accessed by typing http://datumsol.com /readme.html.

By inspecting meta tag:

 

If admin of site has not edited a meta tag with version of wordpresss exists in source of page. You can view the meta tag by right clicking on page and view page source and search following meta tag:

<meta name=”generator” content=”WordPress 4.7.3″ />

Feed Link

Type  http://<youdomain.com>/feed/  and you will get an xml document which will include following tag:

<generator>https://wordpress.org/?v=4.7.3</generator>