Skip to content

Commit 079ceb3

Browse files
authored
Merge pull request #12 from arunbasillal/branch-4.2
Branch 4.2
2 parents 67b49e2 + 1ade8af commit 079ceb3

9 files changed

+245
-211
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@ With the Image Attributes Pro bulk updater you can:
7676
* Update image titles / alt text in media library and existing posts.
7777
* Update image titles / alt text in media library and existing posts only if no title / alt text is set. Existing image titles / alt text will not be changed.
7878
* Update image caption and description in the media library. Existing image captions and descriptions can be preserved.
79-
* Build your own attributes using custom tags like `%filename%`, `%posttitle%`, `%sitetitle%`, `%category%`, `%tag%`, `%yoastfocuskw%`, `%rankmathfocuskw%`, `%seopresstargetkw%`. Each custom tag will be replaced with it's value. You can combine them as you please!
79+
* Build your own attributes using custom tags like `%filename%`, `%posttitle%`, `%sitetitle%`, `%category%`, `%tag%`, `%yoastfocuskw%`, `%yoastseotitle%`, `%rankmathfocuskw%`, `%seopresstargetkw%`. Each custom tag will be replaced with it's value. You can combine them as you please!
8080
* Choose to turn off any of the above mentioned features.
81+
* Bulk update image attributes in [ACF's WYSIWYG Editor](https://imageattributespro.com/acf-compatibility/?utm_source=wordpress.org&utm_medium=readme.md) and [Divi theme](https://imageattributespro.com/divi-compatibility/?utm_source=wordpress.org&utm_medium=readme.md).
8182
* Modify auto generated image attributes using the [iaffpro_image_attributes filter](https://imageattributespro.com/codex/iaffpro_image_attributes/?utm_source=github&utm_medium=readme.md).
8283
* Choose specific post types to bulk update using the [iaffpro_included_post_types filter](https://imageattributespro.com/codex/iaffpro_included_post_types/?utm_source=github&utm_medium=readme.md).
8384
* Disable updating of attributes in media library completely using the [iaffpro_update_media_library filter](https://imageattributespro.com/codex/iaffpro_update_media_library/?utm_source=github&utm_medium=readme.md).

admin/iaff_image-attributes-from-filename-admin-ui-render.php renamed to admin/admin-ui-render.php

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,11 +1041,29 @@ function iaff_admin_interface_render () {
10411041
<?php } ?>
10421042

10431043
</div>
1044+
1045+
<?php
1046+
$disabled_attribute = '';
1047+
1048+
if ( function_exists( 'iaffpro_get_settings' ) ) {
1049+
$settings = iaffpro_get_settings();
1050+
1051+
if ( empty( $settings['registered_email'] ) || empty( $settings['license_key'] ) ) {
1052+
$disabled_attribute = 'disabled';
1053+
}
1054+
}
1055+
?>
1056+
1057+
<?php if ( $disabled_attribute === 'disabled' ) { ?>
1058+
<div class="error inline">
1059+
<p><strong><?php printf( __( '<a href="%s">Please enter license info</a> to activate the plugin and run the bulk updater.' ), admin_url( 'options-general.php?page=image-attributes-pro-activation' ) ); ?></strong></p>
1060+
</div>
1061+
<?php } ?>
10441062

10451063
<p class="submit">
1046-
<input class="button-primary iaff-bulk-updater-buttons iaff_run_bulk_updater_button" type="submit" name="Run Bulk Updater" value="<?php _e( 'Run Bulk Updater', 'auto-image-attributes-from-filename-with-bulk-updater' ) ?>" />
1064+
<input class="button-primary iaff-bulk-updater-buttons iaff_run_bulk_updater_button" type="submit" name="Run Bulk Updater" value="<?php _e( 'Run Bulk Updater', 'auto-image-attributes-from-filename-with-bulk-updater' ) ?>" <?php echo $disabled_attribute; ?>/>
10471065

1048-
<input class="button-secondary iaff-bulk-updater-buttons iaff_test_bulk_updater_button" type="submit" name="Test Bulk Updater" value="<?php _e( 'Test Bulk Updater', 'auto-image-attributes-from-filename-with-bulk-updater' ) ?>" />
1066+
<input class="button-secondary iaff-bulk-updater-buttons iaff_test_bulk_updater_button" type="submit" name="Test Bulk Updater" value="<?php _e( 'Test Bulk Updater', 'auto-image-attributes-from-filename-with-bulk-updater' ) ?>" <?php echo $disabled_attribute; ?>/>
10491067

10501068
<input class="button-secondary iaff-bulk-updater-buttons iaff_stop_bulk_updater_button" type="submit" name="Stop Bulk Updater" value="<?php _e( 'Stop Bulk Updater', 'auto-image-attributes-from-filename-with-bulk-updater' ) ?>" disabled />
10511069
</p>
File renamed without changes.

iaff_image-attributes-from-filename.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Description: Automatically Add Image Title, Image Caption, Description And Alt Text From Image Filename. Since this plugin includes a bulk updater this can update both existing images in the Media Library and new images.
66
* Author: Arun Basil Lal
77
* Author URI: https://imageattributespro.com/?utm_source=plugin-header&utm_medium=author-uri
8-
* Version: 4.1
8+
* Version: 4.2
99
* Text Domain: auto-image-attributes-from-filename-with-bulk-updater
1010
* Domain Path: /languages
1111
* License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
@@ -65,7 +65,7 @@
6565
* @since 1.3
6666
*/
6767
if ( ! defined( 'IAFF_VERSION_NUM' ) ) {
68-
define( 'IAFF_VERSION_NUM', '4.1' );
68+
define( 'IAFF_VERSION_NUM', '4.2' );
6969
}
7070

7171
/**
@@ -122,7 +122,7 @@ function iaff_upgrader() {
122122
add_action( 'admin_init', 'iaff_upgrader' );
123123

124124
// Load everything
125-
require_once( IAFF_IMAGE_ATTRIBUTES_FROM_FILENAME_DIR . '/admin/iaff_image-attributes-from-filename-loader.php');
125+
require_once( IAFF_IMAGE_ATTRIBUTES_FROM_FILENAME_DIR . '/loader.php');
126126

127127
// Register activation hook
128128
register_activation_hook( __FILE__ , 'iaff_activate_plugin' );

0 commit comments

Comments
 (0)