프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$_metabox_title | * Title for dfi metabox | ||
$_textDomain | * Plugin text domain | ||
$_userFilter | * Users post type filter for dfi metabox |
메소드 | 설명 | |
---|---|---|
__construct ( ) | Constructor. Hooks all interactions to initialize the class. | |
add_metabox_classes ( $classes ) : string | Add custom class 'featured-meta-box' to meta box | |
ajax_callback ( ) : Void | Load new featured meta box via ajax | |
dfi_action_links ( array $links ) : array | Add upgrade link | |
enqueue_admin_scripts ( ) : Void | Add required admin scripts | |
featured_meta_box ( Object $post, Array $featured ) : Void | Featured meta box as seen in the admin | |
get_all_featured_images ( integer $post_id = null ) : Array | Retrieve featured images for specific post(s) including the default Featured Image | |
get_featured_images ( integer $post_id = null ) : Array | Retrieve featured images for specific post(s) | |
get_image_alt ( String $image_url ) : String | Get image alternate text | |
get_image_alt_by_id ( integer $attachment_id ) : String | Get image alternate text by attachment id | |
get_image_caption ( String $image_url ) : String | Get image caption | |
get_image_caption_by_id ( integer $attachment_id ) : String | Get image caption by id | |
get_image_description ( String $image_url ) : String | Get image description | |
get_image_description_by_id ( integer $attachment_id ) : String | Get image description by id | |
get_image_id ( String $image_url ) : integer | Null | Gets attachment id from given image url | |
get_image_thumb ( String $image_url, String $size = 'thumbnail' ) : String | Get image thumbnail url of specific size by image url | |
get_image_title ( String $image_url ) : String | Get image title | |
get_image_title_by_id ( integer $attachment_id ) : String | Get image title by id | |
get_image_url ( integer $attachment_id, String $size = 'full' ) : String | Get image url of the image by attachment id | |
get_link_to_image ( integer $attachment_id ) : string | null | Get link to image | |
get_nth_featured_image ( integer $position, integer $post_id = null ) : Array | Fetches featured image data of nth position | |
get_post_attachment_ids ( integer $post_id ) : Array | Get all attachment ids of the post | |
initialize_featured_box ( ) : Void | Add featured meta boxes dynamically | |
is_attached ( $attachment_id, $post_id ) : boolean | Check if the image is attached with the particular post | |
load_plugin_textdomain ( ) : void | Load the plugin's textdomain hooked to 'plugins_loaded'. | |
media_attachment_custom_fields ( $form_fields, $post ) : Array | Add custom fields in media uploader | |
media_attachment_custom_fields_save ( $post, $attachment ) : Array | Save values of media uploader custom fields | |
save_meta ( integer $post_id ) : Void | Update featured images in the database | |
update_notice ( ) : Void | Add update notice. Displayed in plugin update page. |
메소드 | 설명 | |
---|---|---|
_get_attachment_id ( String $image_url ) : string | Get attachment id of the image by image url | |
_get_number_translation ( integer $number ) : String | Translates more than one digit number digit by digit. | |
_get_real_upload_path ( string $img ) : string | Check to see if the upload url is already available in path. | |
_nonce_field ( string $key ) : string | Create a nonce field | |
_verify_nonces ( ) : boolean | Verify metabox nonces |
메소드 | 설명 | |
---|---|---|
__get_protocol ( ) : string | Return site protocol | |
_dfi_add_meta_box ( Array $postTypes, Object $featured = null, integer $i = null ) : Void | adds meta boxes | |
_get_featured_box ( String $featuredImgTrimmed, String $featuredImg, String $featuredId, String $thumbnail, $postId ) : String | Returns featured box html content | |
_separate ( string $urlString, string $state = 'thumb' ) : string | null | Separate thumb and full image url from given URL string | |
execute_query ( $query ) | Helper functions |
public __construct ( ) |
protected _get_attachment_id ( String $image_url ) : string | ||
$image_url | String | url of the image |
리턴 | string |
protected _get_number_translation ( integer $number ) : String | ||
$number | integer | Integer to be translated |
리턴 | String | Translated number |
protected _get_real_upload_path ( string $img ) : string | ||
$img | string | |
리턴 | string |
protected _nonce_field ( string $key ) : string | ||
$key | string | Nonce key |
리턴 | string |
public add_metabox_classes ( $classes ) : string | ||
$classes | classes to add in the meta box | |
리턴 | string |
public dfi_action_links ( array $links ) : array | ||
$links | array | Action links |
리턴 | array |
public enqueue_admin_scripts ( ) : Void | ||
리턴 | Void |
public featured_meta_box ( Object $post, Array $featured ) : Void | ||
$post | Object | global post object |
$featured | Array | array containing featured image count |
리턴 | Void |
public get_all_featured_images ( integer $post_id = null ) : Array | ||
$post_id | integer | id of the current post |
리턴 | Array | An array of images or an empty array on failure |
public get_featured_images ( integer $post_id = null ) : Array | ||
$post_id | integer | id of the current post |
리턴 | Array |
public get_image_alt ( String $image_url ) : String | ||
$image_url | String | url of an image |
리턴 | String |
public get_image_alt_by_id ( integer $attachment_id ) : String | ||
$attachment_id | integer | attachment id of an image |
리턴 | String |
public get_image_description ( String $image_url ) : String | ||
$image_url | String | url of an image |
리턴 | String |
public get_image_description_by_id ( integer $attachment_id ) : String | ||
$attachment_id | integer | attachment id of an image |
리턴 | String |
public get_image_id ( String $image_url ) : integer | Null | ||
$image_url | String | url of an image |
리턴 | integer | Null | attachment id of an image |
public get_image_thumb ( String $image_url, String $size = 'thumbnail' ) : String | ||
$image_url | String | url of an image |
$size | String | size of the image to fetch (thumbnail, medium, full) |
리턴 | String |
public get_image_title ( String $image_url ) : String | ||
$image_url | String | url of an image |
리턴 | String |
public get_image_title_by_id ( integer $attachment_id ) : String | ||
$attachment_id | integer | attachment id of an image |
리턴 | String |
public get_image_url ( integer $attachment_id, String $size = 'full' ) : String | ||
$attachment_id | integer | attachment id of an image |
$size | String | size of the image to fetch (thumbnail, medium, full) |
리턴 | String |
public get_nth_featured_image ( integer $position, integer $post_id = null ) : Array | ||
$position | integer | position of the featured image |
$post_id | integer | id of the current post |
리턴 | Array | if found, null otherwise |
public get_post_attachment_ids ( integer $post_id ) : Array | ||
$post_id | integer | id of the current post |
리턴 | Array |
public initialize_featured_box ( ) : Void | ||
리턴 | Void |
public is_attached ( $attachment_id, $post_id ) : boolean | ||
$attachment_id | attachment id of an image | |
$post_id | id of the current post | |
리턴 | boolean |
public load_plugin_textdomain ( ) : void | ||
리턴 | void |
public media_attachment_custom_fields ( $form_fields, $post ) : Array | ||
$form_fields | Array Fields to include in media attachment form | |
$post | Array Post data | |
리턴 | Array |
public media_attachment_custom_fields_save ( $post, $attachment ) : Array | ||
$post | Array The post data for database | |
$attachment | Array Attachment fields from $_POST form | |
리턴 | Array |
public update_notice ( ) : Void | ||
리턴 | Void |