Functions

Global functions included in the framework. These can be used anywhere.

resize_image()

Resizes image and returns URL path.

Use example:

$url = resize_image( $original_url, $width, $height, $crop );
  • crop parameter is option. Default: true.

This function will create a re-sized version of the image and store it on WordPress’ uploads folder.

asset_url()

Return the URL of an asset (image, style or script) independently if its located inside the plugins or the themes folder..

Use example:

$url = asset_url( $relative_path, $this_file_path );
  • relative_path where called file is located.
  • this_file_path caller file path.

Another example:

wp_register( 'my-style', asset_url( '../css/my-style.css', __FILE__ ) );