PHP code example of hirasso / focal-point-picker

1. Go to this page and download the library: Download hirasso/focal-point-picker library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

hirasso / focal-point-picker example snippets


$focalPoint = fcp_get_focalpoint($imageID);
var_dump($focalPoint);



$imageID = 1234;
$imageSRC = wp_get_attachment_image_src($imageID)['large'];
$focus = fcp_get_focalpoint($imageID);




$imageID = 1234;
$imageSRC = wp_get_attachment_image_src($imageID)['large'];
$focus = fcp_get_focalpoint($imageID);