| | |
| | | /** |
| | | * Generate the artist card |
| | | */ |
| | | /** |
| | | * @return array |
| | | */ |
| | | /** |
| | | * @return array |
| | | * @throws Exception |
| | | * @throws Exception |
| | | */ |
| | | public function generate():array |
| | | { |
| | | // Generate appropriate filename |
| | |
| | | ]; |
| | | } |
| | | |
| | | /** |
| | | * Create WordPress attachment from generated image |
| | | * @param string $file_path |
| | | * |
| | | * @return int|WP_Error |
| | | */ |
| | | /** |
| | | * Create WordPress attachment from generated image |
| | | * @param string $file_path |
| | | * |
| | | * @return int|WP_Error |
| | | * @throws Exception |
| | | * @throws Exception |
| | | */ |
| | | protected function createAttachment(string $file_path):int|WP_Error |
| | | { |
| | | // Get upload directory based on user/content structure |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * Create gradient background with Imagick |
| | | * @param Imagick $canvas |
| | | * @param string $color Center color |
| | | * @return void |
| | | */ |
| | | /** |
| | | * Create gradient background with Imagick |
| | | * @param Imagick $canvas |
| | | * @param string $color Center color |
| | | * @return void |
| | | * @throws ImagickException |
| | | * @throws ImagickException |
| | | */ |
| | | protected function createGradientBackgroundImagick(Imagick $canvas, string $color): void |
| | | { |
| | | $width = $canvas->getImageWidth(); |