ap_get_addon_image( string $file )
Description #
Get addon image.
Parameters #
- $filestring (Required) Addon main file name. Example:
avatar.phporcategory.php.
Source #
File: includes/functions.php
function ap_get_addon_image( $file ) {
$addon = ap_get_addon( $file );
if ( isset( $addon['path'] ) ) {
$path_parts = pathinfo( $addon['path'] );
if ( isset( $path_parts['dirname'] ) && file_exists( $path_parts['dirname'] . '/image.png' ) ) {
return plugin_dir_url( $addon['path'] ) . 'image.png';
}
}
}
Expand full source code Collapse full source code View on GitHub: includes/functions.php:1853
Add your comment