This page is created for WordPress Extend Download Stat plugin.
There are 2 functions available :
Please read ” Using shortcode ” first to understand this page better.
Allows you to output download stat in template files instead of using shortcode in post. It can accept argument in string or array and works exactly like the shortcode . Introduced in version 1.1
url
(string) URL to the statistics page. Must be set.
format
(string) Format id. Default format will be used if you give an invalid format id.
get
(string) Get single info instead of using format.
Valid values : All available tags
autop
(string) Auto wrap the content with HTML paragraph <p> tag
echo
(string) Show the result or keep it in a variable. Default is true.
Display download stats using format id of 1
Display number of download today (inline)
Wordpress Theme Demo Bar got downloads today !!
Assign to variable
Argument in array form
'http://wordpress.org/extend/plugins/wordpress-theme-demo-bar/stats/',
'get' => 'today',
'echo' => '0',
) );
echo $stored;
}
?>
Allows you to get an array of saved data and assign it to a variable. It can accept argument in string or array. You can use this function to make a “download” page. Introduced in version 1.2.1
url
(string) URL to the statistics page. If set, it returns an array of data of the selected item only. Use var_dump() to see what it has :)
gettype
(string) If set, it returns all datas of a type in array. Use var_dump() to see what it has :)
Valid values:
autoformat
(string) By default, all time and number related data will be formatted based on plugin settings. Once disabled, timestamp will be returned for time-related data and unformatted numbers will be returned for number-related data.
Valid values:
Assign all plugins data into a variable
$stored = wpeds_return_data_as_array('gettype=plugin');
var_dump($stored); //to see what's inside
Assign all themes data into a variable
$stored = wpeds_return_data_as_array('gettype=theme');
var_dump($stored); //to see what's inside
Assign a single plugin’s data into a variable
$stored = wpeds_return_data_as_array('url=http://wordpress.org/extend/plugins/wordpress-extend-download-stat/stats/');
var_dump($stored); //to see what's inside
Disable auto-formatting all date and number
$stored = wpeds_return_data_as_array('gettype=theme&autoformat=0');
var_dump($stored); //to see what's inside
Argument in array form
$stored = wpeds_return_data_as_array( array(
'gettype' => 'theme',
'autoformat' => '0',
));
var_dump($stored); //to see what's inside
Cool code :)