Skip to content

Commit

Permalink
Merge pull request #1 from arunbasillal/branch-1.5
Browse files Browse the repository at this point in the history
Branch 1.5
  • Loading branch information
arunbasillal authored May 6, 2018
2 parents b471aba + ca7cfa2 commit dbb17b6
Show file tree
Hide file tree
Showing 7 changed files with 374 additions and 202 deletions.
88 changes: 86 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,86 @@
# Auto-Image-Attributes-From-Filename-With-Bulk-Updater
Automatically add WordPress image attributes such as image title, image caption, description and alt txt from image filename. This WordPress plugin can update image attributes for both new images and existing images in the media library.
# Auto Image Attributes From Filename With Bulk Updater

Automatically Add Image Title, Caption, Description And Alt Text From Filename. Includes a bulk updater to update existing images in the Media Library

The plugin can update image attributes for both new images and existing images in the media library.

With this plugin you can:

* Set the image filename as the image Title.
* Set the image filename as the image Caption.
* Set the image filename as the image Description.
* Set the image filename as the image Alt Text. This was a default feature in WordPress before 4.7. The plugin restores this essential feature which is great for SEO.
* Insert Image Title into post HTML. WordPress stopped adding Image Titles to images since WordPress 3.5. The plugin restores it.
* Remove hyphens from the image filename.
* Remove underscores from the image filename.
* Remove full stops from filename.
* Remove commas from filename.
* Remove all numbers from filename.
* Choose to turn off any of the above mentioned features.

With the bulk updater you can:

* Set the image filename as image Title, Caption, Description and Alt Text after removing hyphens and underscores from the filename.
* Update any number of images in your Media Library in one click.

If your image filename is *My_image-name.jpg*, your Image Title, Caption, Description And Alt Text will be *My image name*.

The plugin settings and bulk updater are in WordPress Admin > Settings > Image Attributes. Here you can choose which attributes to update for NEW uploads.

Please remember to take a database backup before running the bulk updater. The bulk updater updates ALL attributes for existing images in the Media Library and ignores the settings set for NEW uploads.

**Image Attributes Pro**

A pro add-on is now available for the plugin. Check out [Image Attributes Pro](https://imageattributespro.com/?utm_source=github&utm_medium=readme.md).

What the pro add-on you get these additional features:

* Remove apostrophe ( ' ) from filename
* Remove tilde ( ~ ) from filename
* Remove plus ( + ) from filename
* Remove pound ( # ) from filename
* Remove ampersand ( & ) from filename
* Remove round brackets ( ( ) ) from filename
* Remove square brackets ( [ ] ) from filename
* Remove curly brackets ( { } ) from filename
* Filter words or characters from filename
* Filter filename with regex
* convert image attributes to lowercase
* CONVERT IMAGE ATTRIBUTES TO UPPERCASE
* Use title casing for image attributes. First Letter Of Each Word Will Be Capitalized.
* Use sentence casing for image attributes. First letter of a sentence will be capitalized.
* Clean the actual image filename after upload.
* Use post title as title text. If image is not attached to a post, image filename will be used instead.
* Use post title as alt text. If image is not attached to a post, image filename will be used instead.
* Use post title as caption. If image is not attached to a post, image filename will be used instead.
* Use post title as description. If image is not attached to a post, image filename will be used instead.
* Choose to turn off any of the above mentioned features.

With the pro bulk updater you can:

* Update image title and alt text for images inserted into posts and custom post types.
* Fine tune all settings. Choose what to update.
* Update image titles / alt text in media library only. Image titles / alt text in existing posts will be left unchanged.
* Update image titles / alt text in media library and existing posts.
* Update image titles / alt text in existing posts only if no title / alt text is set. All image titles/ alt text in media library will be updated.
* Choose to turn off any of the above mentioned features.

For screenshots, FAQ and further details, please see the [product website](https://imageattributespro.com/?utm_source=github&utm_medium=readme.md).

## Installation

To install this plugin:

1. Install the plugin through the WordPress admin interface, or upload the plugin folder to /wp-content/plugins/ using ftp.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Go to WordPress Admin > Settings > Image Attributes.

## Frequently Asked Questions

### Will this plugin update existing images in the media library?

Yes, the plugin will update image Title, Caption, Description And Alt Text from the image filename for both existing images in the media library and new uploads.

### I need more features. Can I hire you?

Please checkout the [Image Attributes Pro add-on](https://imageattributespro.com/?utm_source=github&utm_medium=readme.md) to see if it suits your requirement.
48 changes: 24 additions & 24 deletions admin/iaff_image-attributes-from-filename-admin-setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ function iaff_register_settings() {
// Register Basic Settings Section
add_settings_section(
'iaff_basic_settings_section_id', // ID
__('Basic Settings','abl_iaff_td'), // Title
__('Basic Settings','auto-image-attributes-from-filename-with-bulk-updater'), // Title
'__return_false', // Callback Function
'iaff_basic_settings_section' // Page slug
);

// Global Switch
add_settings_field(
'iaff_global_switch', // ID
__('Global Switch', 'abl_iaff_td'), // Title
__('Global Switch', 'auto-image-attributes-from-filename-with-bulk-updater'), // Title
'iaff_global_switch_callback', // Callback function
'iaff_basic_settings_section', // Page slug
'iaff_basic_settings_section_id' // Settings Section ID
Expand All @@ -69,7 +69,7 @@ function iaff_register_settings() {
// General Settings
add_settings_field(
'iaff_general_settings', // ID
__('General Settings', 'abl_iaff_td'), // Title
__('General Settings', 'auto-image-attributes-from-filename-with-bulk-updater'), // Title
'iaff_general_settings_callback', // Callback function
'iaff_basic_settings_section', // Page slug
'iaff_basic_settings_section_id' // Settings Section ID
Expand All @@ -78,7 +78,7 @@ function iaff_register_settings() {
// Filter Settings
add_settings_field(
'iaff_filter_settings', // ID
__('Filter Settings', 'abl_iaff_td'), // Title
__('Filter Settings', 'auto-image-attributes-from-filename-with-bulk-updater'), // Title
'iaff_filter_settings_callback', // Callback function
'iaff_basic_settings_section', // Page slug
'iaff_basic_settings_section_id' // Settings Section ID
Expand All @@ -87,7 +87,7 @@ function iaff_register_settings() {
// Basic SEO Settings
add_settings_field(
'iaff_basic_seo_settings', // ID
__('Basic SEO Settings', 'abl_iaff_td'), // Title
__('Basic SEO Settings', 'auto-image-attributes-from-filename-with-bulk-updater'), // Title
'iaff_basic_seo_settings_callback', // Callback function
'iaff_basic_settings_section', // Page slug
'iaff_basic_settings_section_id' // Settings Section ID
Expand All @@ -98,7 +98,7 @@ function iaff_register_settings() {

add_settings_field(
'iaff_preview_pro_settings', // ID
__('Preview Pro Features', 'abl_iaff_td'), // Title
__('Preview Pro Features', 'auto-image-attributes-from-filename-with-bulk-updater'), // Title
'iaff_preview_pro_settings_callback', // Callback function
'iaff_basic_settings_section', // Page slug
'iaff_basic_settings_section_id' // Settings Section ID
Expand All @@ -108,15 +108,15 @@ function iaff_register_settings() {
// Register Advanced Settings Section
add_settings_section(
'iaff_advanced_settings_section_id', // ID
__('Advanced Settings','abl_iaff_td'), // Title
__('Advanced Settings','auto-image-attributes-from-filename-with-bulk-updater'), // Title
'__return_false', // Callback Function
'iaff_advanced_settings_section' // Page slug
);

// Advanced Filter
add_settings_field(
'iaff_advanced_filter_settings', // ID
__('Advanced Filter', 'abl_iaff_td'), // Title
__('Advanced Filter', 'auto-image-attributes-from-filename-with-bulk-updater'), // Title
'iaff_advanced_filter_callback', // Callback function
'iaff_advanced_settings_section', // Page slug
'iaff_advanced_settings_section_id' // Settings Section ID
Expand All @@ -125,7 +125,7 @@ function iaff_register_settings() {
// Custom Filter
add_settings_field(
'iaff_custom_filter_settings', // ID
__('Custom Filter', 'abl_iaff_td'), // Title
__('Custom Filter', 'auto-image-attributes-from-filename-with-bulk-updater'), // Title
'iaff_custom_filter_callback', // Callback function
'iaff_advanced_settings_section', // Page slug
'iaff_advanced_settings_section_id' // Settings Section ID
Expand All @@ -134,7 +134,7 @@ function iaff_register_settings() {
// Capitalization Settings
add_settings_field(
'iaff_capitalization_settings', // ID
__('Capitalization Settings', 'abl_iaff_td'),// Title
__('Capitalization Settings', 'auto-image-attributes-from-filename-with-bulk-updater'),// Title
'iaff_capitalization_callback', // Callback function
'iaff_advanced_settings_section', // Page slug
'iaff_advanced_settings_section_id' // Settings Section ID
Expand All @@ -143,7 +143,7 @@ function iaff_register_settings() {
// Image Title Settings
add_settings_field(
'iaff_image_title_settings', // ID
__('Image Title Settings', 'abl_iaff_td'), // Title
__('Image Title Settings', 'auto-image-attributes-from-filename-with-bulk-updater'), // Title
'iaff_advanced_image_title_callback', // Callback function
'iaff_advanced_settings_section', // Page slug
'iaff_advanced_settings_section_id' // Settings Section ID
Expand All @@ -152,7 +152,7 @@ function iaff_register_settings() {
// Image Alt Text Settings
add_settings_field(
'iaff_image_alt_text_settings', // ID
__('Image Alt Text Settings', 'abl_iaff_td'),// Title
__('Image Alt Text Settings', 'auto-image-attributes-from-filename-with-bulk-updater'),// Title
'iaff_advanced_image_alt_text_callback', // Callback function
'iaff_advanced_settings_section', // Page slug
'iaff_advanced_settings_section_id' // Settings Section ID
Expand All @@ -161,7 +161,7 @@ function iaff_register_settings() {
// Image Caption Settings
add_settings_field(
'iaff_image_caption_settings', // ID
__('Image Caption Settings', 'abl_iaff_td'),// Title
__('Image Caption Settings', 'auto-image-attributes-from-filename-with-bulk-updater'),// Title
'iaff_advanced_image_caption_callback', // Callback function
'iaff_advanced_settings_section', // Page slug
'iaff_advanced_settings_section_id' // Settings Section ID
Expand All @@ -170,7 +170,7 @@ function iaff_register_settings() {
// Image Description Settings
add_settings_field(
'iaff_image_description_settings', // ID
__('Image Description Settings', 'abl_iaff_td'),// Title
__('Image Description Settings', 'auto-image-attributes-from-filename-with-bulk-updater'),// Title
'iaff_advanced_image_description_callback', // Callback function
'iaff_advanced_settings_section', // Page slug
'iaff_advanced_settings_section_id' // Settings Section ID
Expand All @@ -179,7 +179,7 @@ function iaff_register_settings() {
// Miscellaneous Settings
add_settings_field(
'iaff_miscellaneous_settings', // ID
__('Miscellaneous Settings', 'abl_iaff_td'),// Title
__('Miscellaneous Settings', 'auto-image-attributes-from-filename-with-bulk-updater'),// Title
'iaff_miscellaneous_callback', // Callback function
'iaff_advanced_settings_section', // Page slug
'iaff_advanced_settings_section_id' // Settings Section ID
Expand All @@ -188,15 +188,15 @@ function iaff_register_settings() {
// Register Bulk Updater Settings Section
add_settings_section(
'iaff_bu_settings_section_id', // ID
__('Bulk Updater Settings','abl_iaff_td'), // Title
__('Bulk Updater Settings','auto-image-attributes-from-filename-with-bulk-updater'), // Title
'__return_false', // Callback Function
'iaff_bu_settings_section' // Page slug
);

// General Settings
add_settings_field(
'iaff_bu_general_settings', // ID
__('General Settings', 'abl_iaff_td'), // Title
__('General Settings', 'auto-image-attributes-from-filename-with-bulk-updater'), // Title
'iaff_bu_general_settings_callback', // Callback function
'iaff_bu_settings_section', // Page slug
'iaff_bu_settings_section_id' // Settings Section ID
Expand All @@ -205,7 +205,7 @@ function iaff_register_settings() {
// Filter Settings
add_settings_field(
'iaff_bu_filter_settings', // ID
__('Filter Settings', 'abl_iaff_td'), // Title
__('Filter Settings', 'auto-image-attributes-from-filename-with-bulk-updater'), // Title
'iaff_bu_filter_settings_callback', // Callback function
'iaff_bu_settings_section', // Page slug
'iaff_bu_settings_section_id' // Settings Section ID
Expand All @@ -214,7 +214,7 @@ function iaff_register_settings() {
// Custom Filter
add_settings_field(
'iaff_bu_custom_filter_settings', // ID
__('Custom Filter', 'abl_iaff_td'), // Title
__('Custom Filter', 'auto-image-attributes-from-filename-with-bulk-updater'), // Title
'iaff_bu_custom_filter_callback', // Callback function
'iaff_bu_settings_section', // Page slug
'iaff_bu_settings_section_id' // Settings Section ID
Expand All @@ -223,7 +223,7 @@ function iaff_register_settings() {
// Capitalization Settings
add_settings_field(
'iaff_bu_capitalization_settings', // ID
__('Capitalization Settings', 'abl_iaff_td'), // Title
__('Capitalization Settings', 'auto-image-attributes-from-filename-with-bulk-updater'), // Title
'iaff_bu_capitalization_settings_callback', // Callback function
'iaff_bu_settings_section', // Page slug
'iaff_bu_settings_section_id' // Settings Section ID
Expand All @@ -232,7 +232,7 @@ function iaff_register_settings() {
// Image Title Settings
add_settings_field(
'iaff_bu_image_title_settings', // ID
__('Image Title Settings', 'abl_iaff_td'), // Title
__('Image Title Settings', 'auto-image-attributes-from-filename-with-bulk-updater'), // Title
'iaff_bu_image_title_settings_callback', // Callback function
'iaff_bu_settings_section', // Page slug
'iaff_bu_settings_section_id' // Settings Section ID
Expand All @@ -241,7 +241,7 @@ function iaff_register_settings() {
// Image Alt Text Settings
add_settings_field(
'iaff_bu_alt_text_settings', // ID
__('Image Alt Text Settings', 'abl_iaff_td'), // Title
__('Image Alt Text Settings', 'auto-image-attributes-from-filename-with-bulk-updater'), // Title
'iaff_bu_alt_text_settings_callback', // Callback function
'iaff_bu_settings_section', // Page slug
'iaff_bu_settings_section_id' // Settings Section ID
Expand All @@ -250,7 +250,7 @@ function iaff_register_settings() {
// Image Caption Settings
add_settings_field(
'iaff_bu_image_caption_settings', // ID
__('Image Caption Settings', 'abl_iaff_td'), // Title
__('Image Caption Settings', 'auto-image-attributes-from-filename-with-bulk-updater'), // Title
'iaff_bu_image_caption_settings_callback', // Callback function
'iaff_bu_settings_section', // Page slug
'iaff_bu_settings_section_id' // Settings Section ID
Expand All @@ -259,7 +259,7 @@ function iaff_register_settings() {
// Image Description Settings
add_settings_field(
'iaff_bu_image_description_settings', // ID
__('Image Description Settings', 'abl_iaff_td'),// Title
__('Image Description Settings', 'auto-image-attributes-from-filename-with-bulk-updater'),// Title
'iaff_bu_image_description_settings_callback', // Callback function
'iaff_bu_settings_section', // Page slug
'iaff_bu_settings_section_id' // Settings Section ID
Expand Down
Loading

0 comments on commit dbb17b6

Please sign in to comment.