JPKCom ACF Jobs

media.php

Media and image size registration functions

Registers custom image sizes for job posts, companies, and locations:

  • jpkcom-acf-job-16x9: 576x324px (16:9 aspect ratio) for job images
  • jpkcom-acf-job-logo: 512x512px (square) for company logos
  • jpkcom-acf-job-header: 992x558px (16:9 aspect ratio) for header images
Tags
since
1.0.0

Table of Contents

Functions

jpkcom_acf_jobs_media_size()  : void
Register custom image sizes for job posts
jpkcom_acf_jobs_image_sizes_to_selector()  : array<string|int, string>
Add custom image sizes to media library size selector

Functions

jpkcom_acf_jobs_media_size()

Register custom image sizes for job posts

jpkcom_acf_jobs_media_size() : void

Registers three image sizes:

  • jpkcom-acf-job-16x9: 576x324px (16:9, hard crop)
  • jpkcom-acf-job-logo: 512x512px (square, hard crop)
  • jpkcom-acf-job-header: 992x558px (16:9, hard crop)
Tags
since
1.0.0

jpkcom_acf_jobs_image_sizes_to_selector()

Add custom image sizes to media library size selector

jpkcom_acf_jobs_image_sizes_to_selector(array<string|int, string> $sizes) : array<string|int, string>

Makes custom image sizes available in the WordPress media library dropdown when inserting images into posts.

Parameters
$sizes : array<string|int, string>

Existing image size options.

Tags
since
1.0.0
Return values
array<string|int, string>

Modified array with custom sizes added.


        
On this page

Search results