Plugin Directory

Changeset 3461034


Ignore:
Timestamp:
02/13/2026 08:09:42 PM (7 weeks ago)
Author:
drewser24
Message:

Update to version 1.0.10 from GitHub

Location:
altomatic
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • altomatic/tags/1.0.10/admin/partials/settings-page.php

    r3459436 r3461034  
    7070
    7171<div class="wrap altomatic">
     72    <h1 class="screen-reader-text"><?php esc_html_e('Altomatic Settings', 'altomatic'); ?></h1>
    7273
    7374    <!-- Info Tabs -->
  • altomatic/tags/1.0.10/altomatic.php

    r3459436 r3461034  
    44 * Plugin URI: https://altomatic.ai/wordpress
    55 * Description: Compress images to WebP/AVIF and auto-generate SEO alt text with AI. Boost Core Web Vitals and accessibility.
    6  * Version: 1.0.7
     6 * Version: 1.0.10
    77 * Author: Altomatic.ai
    88 * Author URI: https://altomatic.ai
     
    1818
    1919// Define plugin constants
    20 define('ALTOMATIC_VERSION', '1.0.7');
     20define('ALTOMATIC_VERSION', '1.0.10');
    2121define('ALTOMATIC_PATH', plugin_dir_path(__FILE__));
    2222define('ALTOMATIC_URL', plugin_dir_url(__FILE__));
  • altomatic/tags/1.0.10/includes/class-altomatic-api.php

    r3459436 r3461034  
    4848
    4949    /**
     50     * Get client identification headers for API requests
     51     */
     52    private function get_client_headers() {
     53        return array(
     54            'X-Altomatic-Client' => 'wordpress_plugin',
     55            'X-Altomatic-Client-Version' => defined('ALTOMATIC_VERSION') ? ALTOMATIC_VERSION : 'unknown',
     56        );
     57    }
     58
     59    /**
    5060     * Map file extension to API format
    5161     * @param mixed $format
     
    99109
    100110        $response = wp_remote_post($this->get_api_url('v1/image'), array(
    101             'headers' => array(
     111            'headers' => array_merge(array(
    102112                'Authorization' => 'Bearer ' . $this->api_key,
    103113                'Content-Type' => $mime_type
    104             ),
     114            ), $this->get_client_headers()),
    105115            'body' => file_get_contents($file_path),
    106116            'timeout' => 30,
     
    158168
    159169        $response = wp_remote_get($url, array(
    160             'headers' => array(
     170            'headers' => array_merge(array(
    161171                'Authorization' => 'Bearer ' . $key_to_validate,
    162172                'Accept' => 'application/json'
    163             ),
     173            ), $this->get_client_headers()),
    164174            'timeout' => 15,
    165175            'sslverify' => false,
     
    227237
    228238        $response = wp_remote_get($url, array(
    229             'headers' => array(
     239            'headers' => array_merge(array(
    230240                'Authorization' => 'Bearer ' . $this->api_key,
    231241                'Accept' => 'image/*'
    232             ),
     242            ), $this->get_client_headers()),
    233243            'timeout' => 30,
    234244            'sslverify' => false
     
    282292
    283293        $response = wp_remote_get($url, array(
    284             'headers' => array(
     294            'headers' => array_merge(array(
    285295                'Authorization' => 'Bearer ' . $this->api_key,
    286296                'Accept' => 'application/json'
    287             ),
     297            ), $this->get_client_headers()),
    288298            'timeout' => 30,
    289299            'sslverify' => false
  • altomatic/tags/1.0.10/includes/class-altomatic-image-optimizer.php

    r3448999 r3461034  
    4444        $selected_sizes = (array) get_option('altomatic_image_sizes', get_intermediate_image_sizes());
    4545        $selected_formats = (array) get_option('altomatic_format_conversion', array('jpeg', 'webp', 'avif'));
    46         $seo_keywords = get_option('altomatic_seo_keywords', '');
     46        $seo_keywords = $this->merge_seo_keywords(
     47            get_option('altomatic_seo_keywords', ''),
     48            $attachment_id
     49        );
    4750
    4851        $credits_needed = $this->determine_credits_needed($selected_formats, $selected_sizes, $generate_alt_text, $generate_optimized_images);
     
    281284
    282285    /**
     286     * Get focus keywords from active SEO plugin for the parent post of an attachment
     287     * Supports Yoast SEO, Rank Math, and AIOSEO
     288     *
     289     * @param int $attachment_id The attachment ID
     290     * @return string Comma-separated focus keywords, or empty string
     291     */
     292    private function get_seo_plugin_keywords($attachment_id): string {
     293        $post_id = (int) get_post_field('post_parent', $attachment_id);
     294        if ($post_id === 0) {
     295            return '';
     296        }
     297
     298        // Yoast SEO
     299        if (defined('WPSEO_VERSION')) {
     300            $focus_kw = get_post_meta($post_id, '_yoast_wpseo_focuskw', true);
     301            if (!empty($focus_kw)) {
     302                $this->log("Yoast focus keyword for post {$post_id}: {$focus_kw}");
     303                return $focus_kw;
     304            }
     305        }
     306
     307        // Rank Math
     308        if (class_exists('RankMath')) {
     309            $focus_kw = get_post_meta($post_id, 'rank_math_focus_keyword', true);
     310            if (!empty($focus_kw)) {
     311                $this->log("Rank Math focus keyword for post {$post_id}: {$focus_kw}");
     312                return $focus_kw;
     313            }
     314        }
     315
     316        // AIOSEO
     317        if (defined('AIOSEO_VERSION')) {
     318            $keyphrases_json = get_post_meta($post_id, '_aioseo_keyphrases', true);
     319            if (!empty($keyphrases_json)) {
     320                $keyphrases = json_decode($keyphrases_json, true);
     321                if (!empty($keyphrases['focus']['keyphrase'])) {
     322                    $focus_kw = $keyphrases['focus']['keyphrase'];
     323                    $this->log("AIOSEO focus keyphrase for post {$post_id}: {$focus_kw}");
     324                    return $focus_kw;
     325                }
     326            }
     327        }
     328
     329        return '';
     330    }
     331
     332    /**
     333     * Merge global SEO keywords with per-post SEO plugin keywords
     334     *
     335     * @param string $global_keywords Global keywords from plugin settings
     336     * @param int $attachment_id The attachment ID
     337     * @return string Combined comma-separated keywords
     338     */
     339    private function merge_seo_keywords($global_keywords, $attachment_id): string {
     340        $plugin_keywords = $this->get_seo_plugin_keywords($attachment_id);
     341
     342        if (empty($global_keywords)) {
     343            return $plugin_keywords;
     344        }
     345        if (empty($plugin_keywords)) {
     346            return $global_keywords;
     347        }
     348
     349        return $global_keywords . ', ' . $plugin_keywords;
     350    }
     351
     352    /**
    283353     * Handle alt text generation
    284354     * @return string|null
     
    333403        }
    334404
    335         $seo_keywords = get_option('altomatic_seo_keywords', '');
     405        $seo_keywords = $this->merge_seo_keywords(
     406            get_option('altomatic_seo_keywords', ''),
     407            $attachment_id
     408        );
    336409
    337410        $links = $upload_result['links'];
  • altomatic/tags/1.0.10/readme.txt

    r3459436 r3461034  
    1 === Altomatic - 2-in-1 AI Image Optimization & Alt Text for speed, SEO, and accessibility ===
     1=== Altomatic - 2-in-1 AI Image Optimization & Alt Text tool for speed, SEO, and accessibility ===
    22Contributors: drewser24
    33Donate link: https://altomatic.ai
     
    55Requires at least: 5.0
    66Tested up to: 6.9
    7 Stable tag: 1.0.7
     7Stable tag: 1.0.10
    88Requires PHP: 7.4
    99License: GPLv2 or later
     
    2323* **Improve Core Web Vitals** - Smaller images = faster LCP scores
    2424* **Better SEO** - AI-written alt text helps Google understand your images
     25* **SEO Plugin Integration** - Uses focus keyphrases from Yoast SEO, Rank Math, and AIOSEO for keyword-rich alt text
    2526* **Accessibility Compliance** - Auto-generated descriptions for screen readers (EAA/ADA/WCAG)
    2627* **WebP & AVIF Support** - Next-gen formats with automatic browser fallback
     
    4647
    4748**Automatic Alt Text Generation**
    48 - Uses AI to generate relevant, descriptive alt text on image upload
    49 - Helps improve accessibility and on-page SEO
    50 - Supports multiple languages
    51 
    52 **Advanced Image Optimization**
    53 - Compress images automatically with smart algorithms
    54 - Convert images to next-gen formats like WebP and AVIF
    55 - Optimize responsive image variants (srcset)
    56 
    57 **Built for Speed and Simplicity**
    58 - Automatically processes new uploads in the background
    59 - Bulk optimization tools for existing media
    60 - Maintains original image quality while boosting performance
    61 
    62 **Customizable Settings**
    63 - Choose which image sizes to optimize
    64 - Set preferred output formats
    65 - Enable or disable features per your workflow
    66 - Simple, intuitive settings panel in the WordPress admin
     49Every uploaded image is analyzed by AI and descriptive, SEO-friendly alt text is automatically added to the image properties. No manual work required — just upload and go.
     50
     51**Image Compression & Format Conversion**
     52Compress images and convert to modern WebP and AVIF formats for dramatically smaller file sizes. The only alt text plugin that also optimizes your images — no second plugin needed.
     53
     54**Keyword-Rich Alt Text with SEO Plugin Integration**
     55Seamlessly integrates focus keyphrases from popular SEO plugins, including Yoast SEO, Rank Math, and All in One SEO (AIOSEO), to generate keyword-rich alt text that aligns with your on-page SEO strategy.
     56
     57**Optimized for WooCommerce**
     58Automatically optimizes WooCommerce product images, thumbnails, and gallery images. AI-generated alt text helps your products appear in Google Image Search and improves product page SEO.
     59
     60**Supports Multiple Formats**
     61Handles JPG, PNG, WebP, and AVIF images. Convert to next-gen formats with automatic browser fallback for maximum compatibility across all devices.
     62
     63**Bulk Optimization**
     64Use the bulk optimization tool to process your entire existing media library. Optimize hundreds of images and generate alt text with one click.
     65
     66**Core Web Vitals Ready**
     67Smaller images directly improve your Largest Contentful Paint (LCP) score — one of Google's key ranking factors. Fix image-related performance issues automatically.
     68
     69**Accessibility Compliance**
     70Auto-generated alt text helps meet EAA, ADA, and WCAG 2.1 requirements for image descriptions. Support screen readers with accurate, meaningful image descriptions on every page.
     71
     72**Multiple Languages**
     73AI alt text generation supports multiple languages, so your image descriptions match your site's language.
     74
     75**Review and Edit**
     76See what was processed and manually edit or regenerate the AI-generated alt text at any time. Full control over your image descriptions.
     77
     78**Try for FREE**
     7950 free credits every month. No credit card needed to get started.
    6780
    6881== Installation ==
     
    116129= Will this help my Core Web Vitals score? =
    117130Yes! Image optimization directly improves Largest Contentful Paint (LCP), one of the three Core Web Vitals. Smaller images = faster page loads = better scores. Images cause 80% of LCP issues on most sites.
     131
     132= Does it work with Yoast SEO, Rank Math, or AIOSEO? =
     133Yes! Altomatic automatically detects focus keyphrases from Yoast SEO, Rank Math, and All in One SEO (AIOSEO). When generating alt text, the AI uses these keywords to create descriptions that align with your SEO strategy — no extra configuration needed.
    118134
    119135= Does it work with WooCommerce? =
  • altomatic/trunk/admin/partials/settings-page.php

    r3459436 r3461034  
    7070
    7171<div class="wrap altomatic">
     72    <h1 class="screen-reader-text"><?php esc_html_e('Altomatic Settings', 'altomatic'); ?></h1>
    7273
    7374    <!-- Info Tabs -->
  • altomatic/trunk/altomatic.php

    r3459436 r3461034  
    44 * Plugin URI: https://altomatic.ai/wordpress
    55 * Description: Compress images to WebP/AVIF and auto-generate SEO alt text with AI. Boost Core Web Vitals and accessibility.
    6  * Version: 1.0.7
     6 * Version: 1.0.10
    77 * Author: Altomatic.ai
    88 * Author URI: https://altomatic.ai
     
    1818
    1919// Define plugin constants
    20 define('ALTOMATIC_VERSION', '1.0.7');
     20define('ALTOMATIC_VERSION', '1.0.10');
    2121define('ALTOMATIC_PATH', plugin_dir_path(__FILE__));
    2222define('ALTOMATIC_URL', plugin_dir_url(__FILE__));
  • altomatic/trunk/includes/class-altomatic-api.php

    r3459436 r3461034  
    4848
    4949    /**
     50     * Get client identification headers for API requests
     51     */
     52    private function get_client_headers() {
     53        return array(
     54            'X-Altomatic-Client' => 'wordpress_plugin',
     55            'X-Altomatic-Client-Version' => defined('ALTOMATIC_VERSION') ? ALTOMATIC_VERSION : 'unknown',
     56        );
     57    }
     58
     59    /**
    5060     * Map file extension to API format
    5161     * @param mixed $format
     
    99109
    100110        $response = wp_remote_post($this->get_api_url('v1/image'), array(
    101             'headers' => array(
     111            'headers' => array_merge(array(
    102112                'Authorization' => 'Bearer ' . $this->api_key,
    103113                'Content-Type' => $mime_type
    104             ),
     114            ), $this->get_client_headers()),
    105115            'body' => file_get_contents($file_path),
    106116            'timeout' => 30,
     
    158168
    159169        $response = wp_remote_get($url, array(
    160             'headers' => array(
     170            'headers' => array_merge(array(
    161171                'Authorization' => 'Bearer ' . $key_to_validate,
    162172                'Accept' => 'application/json'
    163             ),
     173            ), $this->get_client_headers()),
    164174            'timeout' => 15,
    165175            'sslverify' => false,
     
    227237
    228238        $response = wp_remote_get($url, array(
    229             'headers' => array(
     239            'headers' => array_merge(array(
    230240                'Authorization' => 'Bearer ' . $this->api_key,
    231241                'Accept' => 'image/*'
    232             ),
     242            ), $this->get_client_headers()),
    233243            'timeout' => 30,
    234244            'sslverify' => false
     
    282292
    283293        $response = wp_remote_get($url, array(
    284             'headers' => array(
     294            'headers' => array_merge(array(
    285295                'Authorization' => 'Bearer ' . $this->api_key,
    286296                'Accept' => 'application/json'
    287             ),
     297            ), $this->get_client_headers()),
    288298            'timeout' => 30,
    289299            'sslverify' => false
  • altomatic/trunk/includes/class-altomatic-image-optimizer.php

    r3448999 r3461034  
    4444        $selected_sizes = (array) get_option('altomatic_image_sizes', get_intermediate_image_sizes());
    4545        $selected_formats = (array) get_option('altomatic_format_conversion', array('jpeg', 'webp', 'avif'));
    46         $seo_keywords = get_option('altomatic_seo_keywords', '');
     46        $seo_keywords = $this->merge_seo_keywords(
     47            get_option('altomatic_seo_keywords', ''),
     48            $attachment_id
     49        );
    4750
    4851        $credits_needed = $this->determine_credits_needed($selected_formats, $selected_sizes, $generate_alt_text, $generate_optimized_images);
     
    281284
    282285    /**
     286     * Get focus keywords from active SEO plugin for the parent post of an attachment
     287     * Supports Yoast SEO, Rank Math, and AIOSEO
     288     *
     289     * @param int $attachment_id The attachment ID
     290     * @return string Comma-separated focus keywords, or empty string
     291     */
     292    private function get_seo_plugin_keywords($attachment_id): string {
     293        $post_id = (int) get_post_field('post_parent', $attachment_id);
     294        if ($post_id === 0) {
     295            return '';
     296        }
     297
     298        // Yoast SEO
     299        if (defined('WPSEO_VERSION')) {
     300            $focus_kw = get_post_meta($post_id, '_yoast_wpseo_focuskw', true);
     301            if (!empty($focus_kw)) {
     302                $this->log("Yoast focus keyword for post {$post_id}: {$focus_kw}");
     303                return $focus_kw;
     304            }
     305        }
     306
     307        // Rank Math
     308        if (class_exists('RankMath')) {
     309            $focus_kw = get_post_meta($post_id, 'rank_math_focus_keyword', true);
     310            if (!empty($focus_kw)) {
     311                $this->log("Rank Math focus keyword for post {$post_id}: {$focus_kw}");
     312                return $focus_kw;
     313            }
     314        }
     315
     316        // AIOSEO
     317        if (defined('AIOSEO_VERSION')) {
     318            $keyphrases_json = get_post_meta($post_id, '_aioseo_keyphrases', true);
     319            if (!empty($keyphrases_json)) {
     320                $keyphrases = json_decode($keyphrases_json, true);
     321                if (!empty($keyphrases['focus']['keyphrase'])) {
     322                    $focus_kw = $keyphrases['focus']['keyphrase'];
     323                    $this->log("AIOSEO focus keyphrase for post {$post_id}: {$focus_kw}");
     324                    return $focus_kw;
     325                }
     326            }
     327        }
     328
     329        return '';
     330    }
     331
     332    /**
     333     * Merge global SEO keywords with per-post SEO plugin keywords
     334     *
     335     * @param string $global_keywords Global keywords from plugin settings
     336     * @param int $attachment_id The attachment ID
     337     * @return string Combined comma-separated keywords
     338     */
     339    private function merge_seo_keywords($global_keywords, $attachment_id): string {
     340        $plugin_keywords = $this->get_seo_plugin_keywords($attachment_id);
     341
     342        if (empty($global_keywords)) {
     343            return $plugin_keywords;
     344        }
     345        if (empty($plugin_keywords)) {
     346            return $global_keywords;
     347        }
     348
     349        return $global_keywords . ', ' . $plugin_keywords;
     350    }
     351
     352    /**
    283353     * Handle alt text generation
    284354     * @return string|null
     
    333403        }
    334404
    335         $seo_keywords = get_option('altomatic_seo_keywords', '');
     405        $seo_keywords = $this->merge_seo_keywords(
     406            get_option('altomatic_seo_keywords', ''),
     407            $attachment_id
     408        );
    336409
    337410        $links = $upload_result['links'];
  • altomatic/trunk/readme.txt

    r3459436 r3461034  
    1 === Altomatic - 2-in-1 AI Image Optimization & Alt Text for speed, SEO, and accessibility ===
     1=== Altomatic - 2-in-1 AI Image Optimization & Alt Text tool for speed, SEO, and accessibility ===
    22Contributors: drewser24
    33Donate link: https://altomatic.ai
     
    55Requires at least: 5.0
    66Tested up to: 6.9
    7 Stable tag: 1.0.7
     7Stable tag: 1.0.10
    88Requires PHP: 7.4
    99License: GPLv2 or later
     
    2323* **Improve Core Web Vitals** - Smaller images = faster LCP scores
    2424* **Better SEO** - AI-written alt text helps Google understand your images
     25* **SEO Plugin Integration** - Uses focus keyphrases from Yoast SEO, Rank Math, and AIOSEO for keyword-rich alt text
    2526* **Accessibility Compliance** - Auto-generated descriptions for screen readers (EAA/ADA/WCAG)
    2627* **WebP & AVIF Support** - Next-gen formats with automatic browser fallback
     
    4647
    4748**Automatic Alt Text Generation**
    48 - Uses AI to generate relevant, descriptive alt text on image upload
    49 - Helps improve accessibility and on-page SEO
    50 - Supports multiple languages
    51 
    52 **Advanced Image Optimization**
    53 - Compress images automatically with smart algorithms
    54 - Convert images to next-gen formats like WebP and AVIF
    55 - Optimize responsive image variants (srcset)
    56 
    57 **Built for Speed and Simplicity**
    58 - Automatically processes new uploads in the background
    59 - Bulk optimization tools for existing media
    60 - Maintains original image quality while boosting performance
    61 
    62 **Customizable Settings**
    63 - Choose which image sizes to optimize
    64 - Set preferred output formats
    65 - Enable or disable features per your workflow
    66 - Simple, intuitive settings panel in the WordPress admin
     49Every uploaded image is analyzed by AI and descriptive, SEO-friendly alt text is automatically added to the image properties. No manual work required — just upload and go.
     50
     51**Image Compression & Format Conversion**
     52Compress images and convert to modern WebP and AVIF formats for dramatically smaller file sizes. The only alt text plugin that also optimizes your images — no second plugin needed.
     53
     54**Keyword-Rich Alt Text with SEO Plugin Integration**
     55Seamlessly integrates focus keyphrases from popular SEO plugins, including Yoast SEO, Rank Math, and All in One SEO (AIOSEO), to generate keyword-rich alt text that aligns with your on-page SEO strategy.
     56
     57**Optimized for WooCommerce**
     58Automatically optimizes WooCommerce product images, thumbnails, and gallery images. AI-generated alt text helps your products appear in Google Image Search and improves product page SEO.
     59
     60**Supports Multiple Formats**
     61Handles JPG, PNG, WebP, and AVIF images. Convert to next-gen formats with automatic browser fallback for maximum compatibility across all devices.
     62
     63**Bulk Optimization**
     64Use the bulk optimization tool to process your entire existing media library. Optimize hundreds of images and generate alt text with one click.
     65
     66**Core Web Vitals Ready**
     67Smaller images directly improve your Largest Contentful Paint (LCP) score — one of Google's key ranking factors. Fix image-related performance issues automatically.
     68
     69**Accessibility Compliance**
     70Auto-generated alt text helps meet EAA, ADA, and WCAG 2.1 requirements for image descriptions. Support screen readers with accurate, meaningful image descriptions on every page.
     71
     72**Multiple Languages**
     73AI alt text generation supports multiple languages, so your image descriptions match your site's language.
     74
     75**Review and Edit**
     76See what was processed and manually edit or regenerate the AI-generated alt text at any time. Full control over your image descriptions.
     77
     78**Try for FREE**
     7950 free credits every month. No credit card needed to get started.
    6780
    6881== Installation ==
     
    116129= Will this help my Core Web Vitals score? =
    117130Yes! Image optimization directly improves Largest Contentful Paint (LCP), one of the three Core Web Vitals. Smaller images = faster page loads = better scores. Images cause 80% of LCP issues on most sites.
     131
     132= Does it work with Yoast SEO, Rank Math, or AIOSEO? =
     133Yes! Altomatic automatically detects focus keyphrases from Yoast SEO, Rank Math, and All in One SEO (AIOSEO). When generating alt text, the AI uses these keywords to create descriptions that align with your SEO strategy — no extra configuration needed.
    118134
    119135= Does it work with WooCommerce? =
Note: See TracChangeset for help on using the changeset viewer.