Skip to content

Commit

Permalink
Merge pull request #12 from arunbasillal/branch-4.2
Browse files Browse the repository at this point in the history
Branch 4.2
  • Loading branch information
arunbasillal authored Mar 28, 2023
2 parents 67b49e2 + 1ade8af commit 079ceb3
Show file tree
Hide file tree
Showing 9 changed files with 245 additions and 211 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ With the Image Attributes Pro bulk updater you can:
* Update image titles / alt text in media library and existing posts.
* 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.
* Update image caption and description in the media library. Existing image captions and descriptions can be preserved.
* 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!
* 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!
* Choose to turn off any of the above mentioned features.
* 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).
* 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).
* 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).
* 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).
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -1041,11 +1041,29 @@ function iaff_admin_interface_render () {
<?php } ?>

</div>

<?php
$disabled_attribute = '';

if ( function_exists( 'iaffpro_get_settings' ) ) {
$settings = iaffpro_get_settings();

if ( empty( $settings['registered_email'] ) || empty( $settings['license_key'] ) ) {
$disabled_attribute = 'disabled';
}
}
?>

<?php if ( $disabled_attribute === 'disabled' ) { ?>
<div class="error inline">
<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>
</div>
<?php } ?>

<p class="submit">
<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' ) ?>" />
<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; ?>/>

<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' ) ?>" />
<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; ?>/>

<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 />
</p>
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions iaff_image-attributes-from-filename.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 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.
* Author: Arun Basil Lal
* Author URI: https://imageattributespro.com/?utm_source=plugin-header&utm_medium=author-uri
* Version: 4.1
* Version: 4.2
* Text Domain: auto-image-attributes-from-filename-with-bulk-updater
* Domain Path: /languages
* License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Expand Down Expand Up @@ -65,7 +65,7 @@
* @since 1.3
*/
if ( ! defined( 'IAFF_VERSION_NUM' ) ) {
define( 'IAFF_VERSION_NUM', '4.1' );
define( 'IAFF_VERSION_NUM', '4.2' );
}

/**
Expand Down Expand Up @@ -122,7 +122,7 @@ function iaff_upgrader() {
add_action( 'admin_init', 'iaff_upgrader' );

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

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

0 comments on commit 079ceb3

Please sign in to comment.