Plugin Directory

Changeset 3461346


Ignore:
Timestamp:
02/14/2026 01:09:56 PM (7 weeks ago)
Author:
jespermhl
Message:

Update to version 1.3.0 from GitHub

Location:
image-copyright-manager
Files:
18 edited
1 copied

Legend:

Unmodified
Added
Removed
  • image-copyright-manager/tags/1.3.0/CHANGELOG.txt

    r3400998 r3461346  
    55and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
    66
     7## [1.3.0] - 2026-02-14
     8### Added
     9- Added "Creator", "Copyright Notice", "Credit Text", "License URL", and "Acquire License URL" fields for complete Image SEO.
     10- Complete support for Google Image SEO license badge.
     11- Automatic JSON-LD Schema.org ImageObject output for Google SEO.
     12- Support for JSON-LD on single attachment pages.
     13- Improved image collection logic to support featured images and various theme structures.
     14
     15### Changed
     16- Updated database schema to support additional SEO metadata.
     17- Improved version management to handle automatic database updates.
     18
    719## [1.2.2] - 2025-11-22
    820### Added
    921- Added sortable Copyright column to Media Library list view
    1022- Improved admin interface for managing copyright information
    11 
    1223
    1324## [1.2.1] - 2025-11-22
  • image-copyright-manager/tags/1.3.0/image-copyright-manager.php

    r3400998 r3461346  
    44 * Plugin URI:          https://mahelwebdesign.com/image-copyright-manager/
    55 * Description:         Adds a custom field for copyright information to WordPress media.
    6  * Version:             1.2.2
     6 * Version:             1.3.0
    77 * Requires at least:   6.4
    88 * Requires PHP:        7.4
     
    1212 * License:             GPL2
    1313 * License URI:         https://www.gnu.org/licenses/gpl-2.0.html
    14  * Text Domain:         image-copyright-manager
    1514 * Domain Path:         /languages
    1615 */
     
    2019}
    2120
    22 define( 'IMAGCOMA_PLUGIN_FILE', __FILE__ );
    23 define( 'IMAGCOMA_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
    24 define( 'IMAGCOMA_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    25 
    26 require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-core.php';
    27 
    28 function imagcoma_init() {
    29     global $imagcoma_core;
    30     $imagcoma_core = new IMAGCOMA_Core();
     21if ( ! defined( 'IMAGCOMA_PLUGIN_FILE' ) ) {
     22    define( 'IMAGCOMA_PLUGIN_FILE', __FILE__ );
     23}
     24if ( ! defined( 'IMAGCOMA_PLUGIN_DIR' ) ) {
     25    define( 'IMAGCOMA_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
     26}
     27if ( ! defined( 'IMAGCOMA_PLUGIN_URL' ) ) {
     28    define( 'IMAGCOMA_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    3129}
    3230
    33 add_action( 'plugins_loaded', 'imagcoma_init' );
     31// Load dependencies with safety checks
     32require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-utils.php';
     33require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-core.php';
     34require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-meta-boxes.php';
     35require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-shortcodes.php';
     36require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-settings.php';
     37require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-display.php';
     38require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-admin-columns.php';
    3439
    35 function imagcoma_activate() {
    36     $default_settings = array(
    37         'display_text' => __( 'Copyright: {copyright}', 'image-copyright-manager' )
    38     );
    39    
    40     add_option( 'imagcoma_settings', $default_settings );
     40if ( ! function_exists( 'imagcoma_init' ) ) {
     41    function imagcoma_init() {
     42        global $imagcoma_core;
     43        if ( ! isset( $imagcoma_core ) && class_exists( 'IMAGCOMA_Core' ) ) {
     44            $imagcoma_core = new IMAGCOMA_Core();
     45        }
     46    }
     47    add_action( 'plugins_loaded', 'imagcoma_init' );
    4148}
    42 register_activation_hook( __FILE__, 'imagcoma_activate' );
    4349
    44 register_activation_hook( __FILE__, 'imagcoma_create_copyright_table' );
    45 function imagcoma_create_copyright_table() {
    46     global $wpdb;
    47     $table_name = $wpdb->prefix . 'imagcoma_copyright';
    48     $charset_collate = $wpdb->get_charset_collate();
     50if ( ! function_exists( 'imagcoma_activate' ) ) {
     51    register_activation_hook( __FILE__, 'imagcoma_activate' );
     52    function imagcoma_activate() {
     53        // Set default settings
     54        $default_settings = array(
     55            'display_text' => __( 'Copyright: {copyright}', 'image-copyright-manager' ),
     56            'enable_css' => 1
     57        );
     58        add_option( 'imagcoma_settings', $default_settings );
    4959
    50     $sql = "CREATE TABLE $table_name (
    51         id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
    52         attachment_id BIGINT(20) UNSIGNED NOT NULL,
    53         copyright_text TEXT NOT NULL,
    54         PRIMARY KEY  (id),
    55         UNIQUE KEY attachment_id (attachment_id)
     60        // Initial table creation
     61        if ( function_exists( 'imagcoma_create_copyright_table' ) ) {
     62            imagcoma_create_copyright_table();
     63        }
     64       
     65        // Set version
     66        update_option( 'imagcoma_version', '1.3.0' );
     67    }
     68}
     69
     70if ( ! function_exists( 'imagcoma_create_copyright_table' ) ) {
     71    function imagcoma_create_copyright_table() {
     72        global $wpdb;
     73        $table_name = $wpdb->prefix . 'imagcoma_copyright';
     74        $charset_collate = $wpdb->get_charset_collate();
     75
     76        $sql = "CREATE TABLE $table_name (
     77      id bigint(20) unsigned NOT NULL auto_increment,
     78      attachment_id bigint(20) unsigned NOT NULL,
     79      copyright_text text DEFAULT '',
     80      creator text DEFAULT '',
     81      copyright_notice text DEFAULT '',
     82      credit_text text DEFAULT '',
     83      license_url text DEFAULT '',
     84      acquire_license_url text DEFAULT '',
     85      PRIMARY KEY  (id),
     86      UNIQUE KEY attachment_id (attachment_id)
    5687    ) $charset_collate;";
    5788
    58     require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
    59     dbDelta( $sql );
     89        require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
     90        dbDelta( $sql );
     91    }
    6092}
    6193
    62 function imagcoma_deactivate() {
    63 }
    64 
    65 register_deactivation_hook( __FILE__, 'imagcoma_deactivate' );
     94if ( ! function_exists( 'imagcoma_deactivate' ) ) {
     95    function imagcoma_deactivate() {
     96    }
     97    register_deactivation_hook( __FILE__, 'imagcoma_deactivate' );
     98}
  • image-copyright-manager/tags/1.3.0/includes/class-imagcoma-core.php

    r3400998 r3461346  
    1212class IMAGCOMA_Core {
    1313
    14     const VERSION = '1.2.2';
     14    const VERSION = '1.3.0';
    1515   
    1616    const TEXT_DOMAIN = 'image-copyright-manager';
     
    2222    private function init_hooks() {
    2323        add_action( 'init', array( $this, 'init' ) );
     24        add_action( 'admin_init', array( $this, 'check_version' ) );
     25    }
     26
     27    public function check_version() {
     28        $installed_version = get_option( 'imagcoma_version' );
     29        if ( self::VERSION !== $installed_version ) {
     30            imagcoma_create_copyright_table();
     31            update_option( 'imagcoma_version', self::VERSION );
     32        }
    2433    }
    2534   
    2635    public function init() {
    27         $this->load_dependencies();
    28        
    2936        new IMAGCOMA_Meta_Boxes();
    3037        new IMAGCOMA_Shortcodes();
     
    3542   
    3643    private function load_dependencies() {
    37         require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-meta-boxes.php';
    38         require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-shortcodes.php';
    39         require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-settings.php';
    40         require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-display.php';
    41         require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-utils.php';
    42         require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-admin-columns.php';
    4344    }
    4445   
  • image-copyright-manager/tags/1.3.0/includes/class-imagcoma-display.php

    r3400521 r3461346  
    1313class IMAGCOMA_Display {
    1414   
     15    public static $processed_attachments = array();
     16
     17    public static function add_to_json_ld( $attachment_id ) {
     18        if ( ! in_array( $attachment_id, self::$processed_attachments ) ) {
     19            self::$processed_attachments[] = $attachment_id;
     20        }
     21    }
     22   
    1523    public function __construct() {
    1624        add_filter( 'the_content', array( $this, 'auto_display_copyright' ) );
    1725        add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) );
     26        add_action( 'wp_footer', array( $this, 'output_json_ld' ) );
     27        add_action( 'wp_head', array( $this, 'output_single_attachment_json_ld' ) );
     28        add_filter( 'wp_get_attachment_image_attributes', array( $this, 'collect_rendered_image_id' ), 10, 2 );
     29    }
     30
     31    public function collect_rendered_image_id( $attr, $attachment ) {
     32        if ( isset( $attachment->ID ) ) {
     33            self::add_to_json_ld( $attachment->ID );
     34        }
     35        return $attr;
    1836    }
    1937   
     
    5371            }
    5472           
     73            // Collect for JSON-LD
     74            self::add_to_json_ld( $attachment_id );
     75           
    5576            $copyright_data = IMAGCOMA_Utils::get_copyright_info( $attachment_id );
    5677            $display_copyright = $copyright_data['display_copyright'] ?? false;
     
    7394           
    7495            // We need to handle HTML in copyright text safely
    75             $fragment = $dom->createDocumentFragment();
    76             $fragment->appendXML( wp_kses_post( $copyright_text ) );
    77             $copyright_div->appendChild( $fragment );
     96            $safe_html = wp_kses_post( $copyright_text );
     97            $temp_dom = new DOMDocument();
     98            @$temp_dom->loadHTML( mb_convert_encoding( '<div>' . $safe_html . '</div>', 'HTML-ENTITIES', 'UTF-8' ), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD );
     99            $container = $temp_dom->getElementsByTagName( 'div' )->item( 0 );
     100            if ( $container ) {
     101                foreach ( $container->childNodes as $node ) {
     102                    $imported_node = $dom->importNode( $node, true );
     103                    $copyright_div->appendChild( $imported_node );
     104                }
     105            }
    78106           
    79107            // Insert after image
     
    103131        }
    104132    }
     133
     134    public function output_json_ld() {
     135        if ( empty( self::$processed_attachments ) ) {
     136            return;
     137        }
     138
     139        $attachments = array_unique( self::$processed_attachments );
     140        $json_data = array();
     141
     142        foreach ( $attachments as $attachment_id ) {
     143            $data = $this->get_image_schema_data( $attachment_id );
     144            if ( $data ) {
     145                $json_data[] = $data;
     146            }
     147        }
     148
     149        if ( ! empty( $json_data ) ) {
     150            echo "\n<!-- Image Copyright Manager: JSON-LD start -->\n";
     151            echo '<script type="application/ld+json">' . "\n";
     152            echo json_encode( $json_data, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT );
     153            echo "\n" . '</script>' . "\n";
     154            echo "<!-- Image Copyright Manager: JSON-LD end -->\n";
     155        }
     156    }
     157
     158    public function output_single_attachment_json_ld() {
     159        if ( is_attachment() ) {
     160            $attachment_id = get_the_ID();
     161            $data = $this->get_image_schema_data( $attachment_id );
     162           
     163            if ( $data ) {
     164                echo "\n" . '<script type="application/ld+json">' . "\n";
     165                echo json_encode( $data, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT );
     166                echo "\n" . '</script>' . "\n";
     167            }
     168        }
     169    }
     170
     171    private function get_image_schema_data( $attachment_id ) {
     172        $copyright_data = IMAGCOMA_Utils::get_copyright_info( $attachment_id );
     173       
     174        $creator = $copyright_data['creator'] ?? '';
     175        $notice = ! empty( $copyright_data['copyright_notice'] ) ? $copyright_data['copyright_notice'] : wp_strip_all_tags( $copyright_data['copyright'] );
     176        $credit = $copyright_data['credit_text'] ?? '';
     177        $license = $copyright_data['license_url'] ?? '';
     178        $acquire = $copyright_data['acquire_license_url'] ?? '';
     179
     180        // Basic requirement for JSON-LD output
     181        if ( empty( $creator ) && empty( $notice ) && empty( $credit ) && empty( $license ) ) {
     182            return false;
     183        }
     184
     185        $img_url = wp_get_attachment_url( $attachment_id );
     186       
     187        $image_schema = array(
     188            '@context'   => 'https://schema.org',
     189            '@type'      => 'ImageObject',
     190            'contentUrl' => $img_url,
     191        );
     192
     193        if ( ! empty( $creator ) ) {
     194            $image_schema['creator'] = array(
     195                '@type' => 'Person',
     196                'name'  => $creator
     197            );
     198        }
     199
     200        if ( ! empty( $notice ) ) {
     201            $image_schema['copyrightNotice'] = $notice;
     202        }
     203
     204        if ( ! empty( $credit ) ) {
     205            $image_schema['creditText'] = $credit;
     206        }
     207
     208        if ( ! empty( $license ) ) {
     209            $image_schema['license'] = $license;
     210        }
     211
     212        if ( ! empty( $acquire ) ) {
     213            $image_schema['acquireLicensePage'] = $acquire;
     214        }
     215
     216        return $image_schema;
     217    }
    105218}
  • image-copyright-manager/tags/1.3.0/includes/class-imagcoma-meta-boxes.php

    r3400521 r3461346  
    2020        $copyright_data = IMAGCOMA_Utils::get_copyright_info( $post->ID );
    2121        $copyright = $copyright_data['copyright'] ?? '';
     22        $creator = $copyright_data['creator'] ?? '';
     23        $copyright_notice = $copyright_data['copyright_notice'] ?? '';
     24        $credit_text = $copyright_data['credit_text'] ?? '';
     25        $license_url = $copyright_data['license_url'] ?? '';
     26        $acquire_license_url = $copyright_data['acquire_license_url'] ?? '';
    2227        $display_copyright = $copyright_data['display_copyright'] ?? false;
    2328       
     
    2631            'input' => 'textarea',
    2732            'value' => $copyright,
    28             'helps' => __( 'Enter copyright information. HTML links are allowed.', 'image-copyright-manager' ),
     33            'helps' => __( 'Enter copyright information for display on the website. HTML links are allowed.', 'image-copyright-manager' ),
     34            'show_in_edit' => true,
     35            'show_in_modal' => true,
     36        );
     37
     38        $form_fields['imagcoma_creator'] = array(
     39            'label' => __( 'Creator (SEO)', 'image-copyright-manager' ),
     40            'input' => 'text',
     41            'value' => $creator,
     42            'helps' => __( 'The person or entity that created the image.', 'image-copyright-manager' ),
     43            'show_in_edit' => true,
     44            'show_in_modal' => true,
     45        );
     46
     47        $form_fields['imagcoma_copyright_notice'] = array(
     48            'label' => __( 'Copyright Notice (SEO)', 'image-copyright-manager' ),
     49            'input' => 'text',
     50            'value' => $copyright_notice,
     51            'helps' => __( 'The copyright notice for Google SEO.', 'image-copyright-manager' ),
     52            'show_in_edit' => true,
     53            'show_in_modal' => true,
     54        );
     55
     56        $form_fields['imagcoma_credit_text'] = array(
     57            'label' => __( 'Credit Text (SEO)', 'image-copyright-manager' ),
     58            'input' => 'text',
     59            'value' => $credit_text,
     60            'helps' => __( 'The credit text for the image (e.g., photographer name).', 'image-copyright-manager' ),
     61            'show_in_edit' => true,
     62            'show_in_modal' => true,
     63        );
     64
     65        $form_fields['imagcoma_license_url'] = array(
     66            'label' => __( 'License URL (SEO)', 'image-copyright-manager' ),
     67            'input' => 'text',
     68            'value' => $license_url,
     69            'helps' => __( 'URL to the license of the image.', 'image-copyright-manager' ),
     70            'show_in_edit' => true,
     71            'show_in_modal' => true,
     72        );
     73
     74        $form_fields['imagcoma_acquire_license_url'] = array(
     75            'label' => __( 'Acquire License URL (SEO)', 'image-copyright-manager' ),
     76            'input' => 'text',
     77            'value' => $acquire_license_url,
     78            'helps' => __( 'URL where a user can acquire a license for the image.', 'image-copyright-manager' ),
    2979            'show_in_edit' => true,
    3080            'show_in_modal' => true,
     
    60110           
    61111            $copyright_data = wp_kses( wp_unslash( $attachment['imagcoma_copyright'] ), $allowed_html );
    62             IMAGCOMA_Utils::save_copyright_info( $post['ID'], $copyright_data );
     112            $creator = isset( $attachment['imagcoma_creator'] ) ? sanitize_text_field( wp_unslash( $attachment['imagcoma_creator'] ) ) : '';
     113            $copyright_notice = isset( $attachment['imagcoma_copyright_notice'] ) ? sanitize_text_field( wp_unslash( $attachment['imagcoma_copyright_notice'] ) ) : '';
     114            $credit_text = isset( $attachment['imagcoma_credit_text'] ) ? sanitize_text_field( wp_unslash( $attachment['imagcoma_credit_text'] ) ) : '';
     115            $license_url = isset( $attachment['imagcoma_license_url'] ) ? esc_url_raw( wp_unslash( $attachment['imagcoma_license_url'] ) ) : '';
     116            $acquire_license_url = isset( $attachment['imagcoma_acquire_license_url'] ) ? esc_url_raw( wp_unslash( $attachment['imagcoma_acquire_license_url'] ) ) : '';
     117
     118            IMAGCOMA_Utils::save_copyright_info( $post['ID'], $copyright_data, $creator, $copyright_notice, $credit_text, $license_url, $acquire_license_url );
    63119        }
    64120       
  • image-copyright-manager/tags/1.3.0/includes/class-imagcoma-shortcodes.php

    r3327101 r3461346  
    3838        foreach ( $attachments as $row ) {
    3939            $attachment_id = $row->attachment_id;
     40            IMAGCOMA_Display::add_to_json_ld( $attachment_id );
    4041            $copyright = $row->copyright_text;
    4142            $attachment_url = wp_get_attachment_url( $attachment_id );
  • image-copyright-manager/tags/1.3.0/includes/class-imagcoma-utils.php

    r3400521 r3461346  
    4242        global $wpdb;
    4343        $table_name = $wpdb->prefix . 'imagcoma_copyright';
    44         $copyright = $wpdb->get_var( $wpdb->prepare( "SELECT copyright_text FROM $table_name WHERE attachment_id = %d", $attachment_id ) );
     44        $row = $wpdb->get_row( $wpdb->prepare( "SELECT copyright_text, creator, copyright_notice, credit_text, license_url, acquire_license_url FROM $table_name WHERE attachment_id = %d", $attachment_id ) );
    4545        $display_copyright = get_post_meta( $attachment_id, '_imagcoma_display_copyright', true );
    4646       
    4747        $data = array(
    48             'copyright' => $copyright,
    49             'display_copyright' => $display_copyright === '1'
     48            'copyright'           => $row ? ($row->copyright_text ?? '') : '',
     49            'creator'             => $row ? ($row->creator ?? '') : '',
     50            'copyright_notice'    => $row ? ($row->copyright_notice ?? '') : '',
     51            'credit_text'         => $row ? ($row->credit_text ?? '') : '',
     52            'license_url'         => $row ? ($row->license_url ?? '') : '',
     53            'acquire_license_url' => $row ? ($row->acquire_license_url ?? '') : '',
     54            'display_copyright'   => $display_copyright === '1'
    5055        );
    5156
     
    9499    }
    95100
    96     public static function save_copyright_info( $attachment_id, $copyright_text ) {
     101    public static function save_copyright_info( $attachment_id, $copyright_text, $creator = '', $copyright_notice = '', $credit_text = '', $license_url = '', $acquire_license_url = '' ) {
    97102        global $wpdb;
    98103        $table_name = $wpdb->prefix . 'imagcoma_copyright';
     
    101106            $table_name,
    102107            array(
    103                 'attachment_id'   => $attachment_id,
    104                 'copyright_text'  => $copyright_text,
     108                'attachment_id'       => $attachment_id,
     109                'copyright_text'      => $copyright_text,
     110                'creator'             => $creator,
     111                'copyright_notice'    => $copyright_notice,
     112                'credit_text'         => $credit_text,
     113                'license_url'         => $license_url,
     114                'acquire_license_url' => $acquire_license_url,
    105115            ),
    106116            array(
    107117                '%d',
     118                '%s',
     119                '%s',
     120                '%s',
     121                '%s',
     122                '%s',
    108123                '%s',
    109124            )
  • image-copyright-manager/tags/1.3.0/languages/image-copyright-manager.pot

    r3400998 r3461346  
    1 # Copyright (C) 2025 Image Copyright Manager
     1# Copyright (C) 2026 Image Copyright Manager
    22# This file is distributed under the same license as the Image Copyright Manager package.
    33msgid ""
     
    77"Content-Type: text/plain; charset=UTF-8\n"
    88"Content-Transfer-Encoding: 8bit\n"
    9 "POT-Creation-Date: 2025-11-22 15:11+0000\n"
     9"POT-Creation-Date: 2026-02-14 13:03+0000\n"
    1010"X-Poedit-Basepath: ..\n"
    1111"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
     
    1515"Plural-Forms: nplurals=2; plural=(n != 1);\n"
    1616
    17 #: ../image-copyright-manager.php:37, ../includes/class-imagcoma-core.php:49
     17#: ../image-copyright-manager.php:55, ../includes/class-imagcoma-core.php:50
    1818msgid "Copyright: {copyright}"
    1919msgstr ""
     
    2323msgstr ""
    2424
    25 #: ../includes/class-imagcoma-meta-boxes.php:25
     25#: ../includes/class-imagcoma-meta-boxes.php:30
    2626msgid "Copyright Info"
    2727msgstr ""
    2828
    29 #: ../includes/class-imagcoma-meta-boxes.php:28
    30 msgid "Enter copyright information. HTML links are allowed."
     29#: ../includes/class-imagcoma-meta-boxes.php:33
     30msgid "Enter copyright information for display on the website. HTML links are allowed."
    3131msgstr ""
    3232
    33 #: ../includes/class-imagcoma-meta-boxes.php:34
     33#: ../includes/class-imagcoma-meta-boxes.php:39
     34msgid "Creator (SEO)"
     35msgstr ""
     36
     37#: ../includes/class-imagcoma-meta-boxes.php:42
     38msgid "The person or entity that created the image."
     39msgstr ""
     40
     41#: ../includes/class-imagcoma-meta-boxes.php:48
     42msgid "Copyright Notice (SEO)"
     43msgstr ""
     44
     45#: ../includes/class-imagcoma-meta-boxes.php:51
     46msgid "The copyright notice for Google SEO."
     47msgstr ""
     48
     49#: ../includes/class-imagcoma-meta-boxes.php:57
     50msgid "Credit Text (SEO)"
     51msgstr ""
     52
     53#: ../includes/class-imagcoma-meta-boxes.php:60
     54msgid "The credit text for the image (e.g., photographer name)."
     55msgstr ""
     56
     57#: ../includes/class-imagcoma-meta-boxes.php:66
     58msgid "License URL (SEO)"
     59msgstr ""
     60
     61#: ../includes/class-imagcoma-meta-boxes.php:69
     62msgid "URL to the license of the image."
     63msgstr ""
     64
     65#: ../includes/class-imagcoma-meta-boxes.php:75
     66msgid "Acquire License URL (SEO)"
     67msgstr ""
     68
     69#: ../includes/class-imagcoma-meta-boxes.php:78
     70msgid "URL where a user can acquire a license for the image."
     71msgstr ""
     72
     73#: ../includes/class-imagcoma-meta-boxes.php:84
    3474msgid "Display Copyright"
    3575msgstr ""
    3676
    37 #: ../includes/class-imagcoma-meta-boxes.php:36
     77#: ../includes/class-imagcoma-meta-boxes.php:86
    3878msgid "Display copyright text under this image"
    3979msgstr ""
  • image-copyright-manager/tags/1.3.0/readme.txt

    r3400998 r3461346  
    55Tested up to: 6.8
    66Requires PHP: 7.4
    7 Stable tag: 1.2.2
     7Stable tag: 1.3.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 Add copyright information to WordPress media files with a custom field and display them using shortcodes.
     11Add copyright information to WordPress media files with a custom field and display them using shortcodes. Now includes JSON-LD for Image SEO.
    1212
    1313== Description ==
    1414
    15 Image Copyright Manager adds a custom field for copyright information to WordPress media attachments. This allows you to store copyright details for your images and other media files, and display them on your website using shortcodes.
     15Image Copyright Manager adds a custom field for copyright information to WordPress media attachments. This allows you to store copyright details for your images and other media files, and display them on your website using shortcodes. Version 1.3.0 introduces advanced SEO fields for "Creator" and "Copyright Notice" which are automatically output as JSON-LD for Google Image SEO.
    1616
    1717= Features =
    1818
    1919* Add copyright information to any media file in WordPress
     20* Complete Google Image SEO support (Creator, Copyright Notice, Credit Text, License URL, Acquire License URL)
     21* Automatic JSON-LD Schema.org output for Google Image SEO license badge
    2022* Support for HTML links in copyright information
    2123* Integrated into Media Modal and Edit Media screen
     
    8789== Changelog ==
    8890
     91= 1.3.0 =
     92- Added complete Google Image SEO support (Creator, Copyright Notice, Credit Text, License URL, Acquire License URL)
     93- Added automatic JSON-LD Schema.org output for Google Image SEO license badge
     94- Improved image collection logic to support featured images and more theme structures
     95- Updated database schema for SEO metadata
     96- Added JSON-LD support for single attachment pages
     97
    8998= 1.2.2 =
    9099- Added sortable Copyright column to Media Library list view
  • image-copyright-manager/trunk/CHANGELOG.txt

    r3400998 r3461346  
    55and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
    66
     7## [1.3.0] - 2026-02-14
     8### Added
     9- Added "Creator", "Copyright Notice", "Credit Text", "License URL", and "Acquire License URL" fields for complete Image SEO.
     10- Complete support for Google Image SEO license badge.
     11- Automatic JSON-LD Schema.org ImageObject output for Google SEO.
     12- Support for JSON-LD on single attachment pages.
     13- Improved image collection logic to support featured images and various theme structures.
     14
     15### Changed
     16- Updated database schema to support additional SEO metadata.
     17- Improved version management to handle automatic database updates.
     18
    719## [1.2.2] - 2025-11-22
    820### Added
    921- Added sortable Copyright column to Media Library list view
    1022- Improved admin interface for managing copyright information
    11 
    1223
    1324## [1.2.1] - 2025-11-22
  • image-copyright-manager/trunk/image-copyright-manager.php

    r3400998 r3461346  
    44 * Plugin URI:          https://mahelwebdesign.com/image-copyright-manager/
    55 * Description:         Adds a custom field for copyright information to WordPress media.
    6  * Version:             1.2.2
     6 * Version:             1.3.0
    77 * Requires at least:   6.4
    88 * Requires PHP:        7.4
     
    1212 * License:             GPL2
    1313 * License URI:         https://www.gnu.org/licenses/gpl-2.0.html
    14  * Text Domain:         image-copyright-manager
    1514 * Domain Path:         /languages
    1615 */
     
    2019}
    2120
    22 define( 'IMAGCOMA_PLUGIN_FILE', __FILE__ );
    23 define( 'IMAGCOMA_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
    24 define( 'IMAGCOMA_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    25 
    26 require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-core.php';
    27 
    28 function imagcoma_init() {
    29     global $imagcoma_core;
    30     $imagcoma_core = new IMAGCOMA_Core();
     21if ( ! defined( 'IMAGCOMA_PLUGIN_FILE' ) ) {
     22    define( 'IMAGCOMA_PLUGIN_FILE', __FILE__ );
     23}
     24if ( ! defined( 'IMAGCOMA_PLUGIN_DIR' ) ) {
     25    define( 'IMAGCOMA_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
     26}
     27if ( ! defined( 'IMAGCOMA_PLUGIN_URL' ) ) {
     28    define( 'IMAGCOMA_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    3129}
    3230
    33 add_action( 'plugins_loaded', 'imagcoma_init' );
     31// Load dependencies with safety checks
     32require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-utils.php';
     33require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-core.php';
     34require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-meta-boxes.php';
     35require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-shortcodes.php';
     36require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-settings.php';
     37require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-display.php';
     38require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-admin-columns.php';
    3439
    35 function imagcoma_activate() {
    36     $default_settings = array(
    37         'display_text' => __( 'Copyright: {copyright}', 'image-copyright-manager' )
    38     );
    39    
    40     add_option( 'imagcoma_settings', $default_settings );
     40if ( ! function_exists( 'imagcoma_init' ) ) {
     41    function imagcoma_init() {
     42        global $imagcoma_core;
     43        if ( ! isset( $imagcoma_core ) && class_exists( 'IMAGCOMA_Core' ) ) {
     44            $imagcoma_core = new IMAGCOMA_Core();
     45        }
     46    }
     47    add_action( 'plugins_loaded', 'imagcoma_init' );
    4148}
    42 register_activation_hook( __FILE__, 'imagcoma_activate' );
    4349
    44 register_activation_hook( __FILE__, 'imagcoma_create_copyright_table' );
    45 function imagcoma_create_copyright_table() {
    46     global $wpdb;
    47     $table_name = $wpdb->prefix . 'imagcoma_copyright';
    48     $charset_collate = $wpdb->get_charset_collate();
     50if ( ! function_exists( 'imagcoma_activate' ) ) {
     51    register_activation_hook( __FILE__, 'imagcoma_activate' );
     52    function imagcoma_activate() {
     53        // Set default settings
     54        $default_settings = array(
     55            'display_text' => __( 'Copyright: {copyright}', 'image-copyright-manager' ),
     56            'enable_css' => 1
     57        );
     58        add_option( 'imagcoma_settings', $default_settings );
    4959
    50     $sql = "CREATE TABLE $table_name (
    51         id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
    52         attachment_id BIGINT(20) UNSIGNED NOT NULL,
    53         copyright_text TEXT NOT NULL,
    54         PRIMARY KEY  (id),
    55         UNIQUE KEY attachment_id (attachment_id)
     60        // Initial table creation
     61        if ( function_exists( 'imagcoma_create_copyright_table' ) ) {
     62            imagcoma_create_copyright_table();
     63        }
     64       
     65        // Set version
     66        update_option( 'imagcoma_version', '1.3.0' );
     67    }
     68}
     69
     70if ( ! function_exists( 'imagcoma_create_copyright_table' ) ) {
     71    function imagcoma_create_copyright_table() {
     72        global $wpdb;
     73        $table_name = $wpdb->prefix . 'imagcoma_copyright';
     74        $charset_collate = $wpdb->get_charset_collate();
     75
     76        $sql = "CREATE TABLE $table_name (
     77      id bigint(20) unsigned NOT NULL auto_increment,
     78      attachment_id bigint(20) unsigned NOT NULL,
     79      copyright_text text DEFAULT '',
     80      creator text DEFAULT '',
     81      copyright_notice text DEFAULT '',
     82      credit_text text DEFAULT '',
     83      license_url text DEFAULT '',
     84      acquire_license_url text DEFAULT '',
     85      PRIMARY KEY  (id),
     86      UNIQUE KEY attachment_id (attachment_id)
    5687    ) $charset_collate;";
    5788
    58     require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
    59     dbDelta( $sql );
     89        require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
     90        dbDelta( $sql );
     91    }
    6092}
    6193
    62 function imagcoma_deactivate() {
    63 }
    64 
    65 register_deactivation_hook( __FILE__, 'imagcoma_deactivate' );
     94if ( ! function_exists( 'imagcoma_deactivate' ) ) {
     95    function imagcoma_deactivate() {
     96    }
     97    register_deactivation_hook( __FILE__, 'imagcoma_deactivate' );
     98}
  • image-copyright-manager/trunk/includes/class-imagcoma-core.php

    r3400998 r3461346  
    1212class IMAGCOMA_Core {
    1313
    14     const VERSION = '1.2.2';
     14    const VERSION = '1.3.0';
    1515   
    1616    const TEXT_DOMAIN = 'image-copyright-manager';
     
    2222    private function init_hooks() {
    2323        add_action( 'init', array( $this, 'init' ) );
     24        add_action( 'admin_init', array( $this, 'check_version' ) );
     25    }
     26
     27    public function check_version() {
     28        $installed_version = get_option( 'imagcoma_version' );
     29        if ( self::VERSION !== $installed_version ) {
     30            imagcoma_create_copyright_table();
     31            update_option( 'imagcoma_version', self::VERSION );
     32        }
    2433    }
    2534   
    2635    public function init() {
    27         $this->load_dependencies();
    28        
    2936        new IMAGCOMA_Meta_Boxes();
    3037        new IMAGCOMA_Shortcodes();
     
    3542   
    3643    private function load_dependencies() {
    37         require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-meta-boxes.php';
    38         require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-shortcodes.php';
    39         require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-settings.php';
    40         require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-display.php';
    41         require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-utils.php';
    42         require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-admin-columns.php';
    4344    }
    4445   
  • image-copyright-manager/trunk/includes/class-imagcoma-display.php

    r3400521 r3461346  
    1313class IMAGCOMA_Display {
    1414   
     15    public static $processed_attachments = array();
     16
     17    public static function add_to_json_ld( $attachment_id ) {
     18        if ( ! in_array( $attachment_id, self::$processed_attachments ) ) {
     19            self::$processed_attachments[] = $attachment_id;
     20        }
     21    }
     22   
    1523    public function __construct() {
    1624        add_filter( 'the_content', array( $this, 'auto_display_copyright' ) );
    1725        add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) );
     26        add_action( 'wp_footer', array( $this, 'output_json_ld' ) );
     27        add_action( 'wp_head', array( $this, 'output_single_attachment_json_ld' ) );
     28        add_filter( 'wp_get_attachment_image_attributes', array( $this, 'collect_rendered_image_id' ), 10, 2 );
     29    }
     30
     31    public function collect_rendered_image_id( $attr, $attachment ) {
     32        if ( isset( $attachment->ID ) ) {
     33            self::add_to_json_ld( $attachment->ID );
     34        }
     35        return $attr;
    1836    }
    1937   
     
    5371            }
    5472           
     73            // Collect for JSON-LD
     74            self::add_to_json_ld( $attachment_id );
     75           
    5576            $copyright_data = IMAGCOMA_Utils::get_copyright_info( $attachment_id );
    5677            $display_copyright = $copyright_data['display_copyright'] ?? false;
     
    7394           
    7495            // We need to handle HTML in copyright text safely
    75             $fragment = $dom->createDocumentFragment();
    76             $fragment->appendXML( wp_kses_post( $copyright_text ) );
    77             $copyright_div->appendChild( $fragment );
     96            $safe_html = wp_kses_post( $copyright_text );
     97            $temp_dom = new DOMDocument();
     98            @$temp_dom->loadHTML( mb_convert_encoding( '<div>' . $safe_html . '</div>', 'HTML-ENTITIES', 'UTF-8' ), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD );
     99            $container = $temp_dom->getElementsByTagName( 'div' )->item( 0 );
     100            if ( $container ) {
     101                foreach ( $container->childNodes as $node ) {
     102                    $imported_node = $dom->importNode( $node, true );
     103                    $copyright_div->appendChild( $imported_node );
     104                }
     105            }
    78106           
    79107            // Insert after image
     
    103131        }
    104132    }
     133
     134    public function output_json_ld() {
     135        if ( empty( self::$processed_attachments ) ) {
     136            return;
     137        }
     138
     139        $attachments = array_unique( self::$processed_attachments );
     140        $json_data = array();
     141
     142        foreach ( $attachments as $attachment_id ) {
     143            $data = $this->get_image_schema_data( $attachment_id );
     144            if ( $data ) {
     145                $json_data[] = $data;
     146            }
     147        }
     148
     149        if ( ! empty( $json_data ) ) {
     150            echo "\n<!-- Image Copyright Manager: JSON-LD start -->\n";
     151            echo '<script type="application/ld+json">' . "\n";
     152            echo json_encode( $json_data, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT );
     153            echo "\n" . '</script>' . "\n";
     154            echo "<!-- Image Copyright Manager: JSON-LD end -->\n";
     155        }
     156    }
     157
     158    public function output_single_attachment_json_ld() {
     159        if ( is_attachment() ) {
     160            $attachment_id = get_the_ID();
     161            $data = $this->get_image_schema_data( $attachment_id );
     162           
     163            if ( $data ) {
     164                echo "\n" . '<script type="application/ld+json">' . "\n";
     165                echo json_encode( $data, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT );
     166                echo "\n" . '</script>' . "\n";
     167            }
     168        }
     169    }
     170
     171    private function get_image_schema_data( $attachment_id ) {
     172        $copyright_data = IMAGCOMA_Utils::get_copyright_info( $attachment_id );
     173       
     174        $creator = $copyright_data['creator'] ?? '';
     175        $notice = ! empty( $copyright_data['copyright_notice'] ) ? $copyright_data['copyright_notice'] : wp_strip_all_tags( $copyright_data['copyright'] );
     176        $credit = $copyright_data['credit_text'] ?? '';
     177        $license = $copyright_data['license_url'] ?? '';
     178        $acquire = $copyright_data['acquire_license_url'] ?? '';
     179
     180        // Basic requirement for JSON-LD output
     181        if ( empty( $creator ) && empty( $notice ) && empty( $credit ) && empty( $license ) ) {
     182            return false;
     183        }
     184
     185        $img_url = wp_get_attachment_url( $attachment_id );
     186       
     187        $image_schema = array(
     188            '@context'   => 'https://schema.org',
     189            '@type'      => 'ImageObject',
     190            'contentUrl' => $img_url,
     191        );
     192
     193        if ( ! empty( $creator ) ) {
     194            $image_schema['creator'] = array(
     195                '@type' => 'Person',
     196                'name'  => $creator
     197            );
     198        }
     199
     200        if ( ! empty( $notice ) ) {
     201            $image_schema['copyrightNotice'] = $notice;
     202        }
     203
     204        if ( ! empty( $credit ) ) {
     205            $image_schema['creditText'] = $credit;
     206        }
     207
     208        if ( ! empty( $license ) ) {
     209            $image_schema['license'] = $license;
     210        }
     211
     212        if ( ! empty( $acquire ) ) {
     213            $image_schema['acquireLicensePage'] = $acquire;
     214        }
     215
     216        return $image_schema;
     217    }
    105218}
  • image-copyright-manager/trunk/includes/class-imagcoma-meta-boxes.php

    r3400521 r3461346  
    2020        $copyright_data = IMAGCOMA_Utils::get_copyright_info( $post->ID );
    2121        $copyright = $copyright_data['copyright'] ?? '';
     22        $creator = $copyright_data['creator'] ?? '';
     23        $copyright_notice = $copyright_data['copyright_notice'] ?? '';
     24        $credit_text = $copyright_data['credit_text'] ?? '';
     25        $license_url = $copyright_data['license_url'] ?? '';
     26        $acquire_license_url = $copyright_data['acquire_license_url'] ?? '';
    2227        $display_copyright = $copyright_data['display_copyright'] ?? false;
    2328       
     
    2631            'input' => 'textarea',
    2732            'value' => $copyright,
    28             'helps' => __( 'Enter copyright information. HTML links are allowed.', 'image-copyright-manager' ),
     33            'helps' => __( 'Enter copyright information for display on the website. HTML links are allowed.', 'image-copyright-manager' ),
     34            'show_in_edit' => true,
     35            'show_in_modal' => true,
     36        );
     37
     38        $form_fields['imagcoma_creator'] = array(
     39            'label' => __( 'Creator (SEO)', 'image-copyright-manager' ),
     40            'input' => 'text',
     41            'value' => $creator,
     42            'helps' => __( 'The person or entity that created the image.', 'image-copyright-manager' ),
     43            'show_in_edit' => true,
     44            'show_in_modal' => true,
     45        );
     46
     47        $form_fields['imagcoma_copyright_notice'] = array(
     48            'label' => __( 'Copyright Notice (SEO)', 'image-copyright-manager' ),
     49            'input' => 'text',
     50            'value' => $copyright_notice,
     51            'helps' => __( 'The copyright notice for Google SEO.', 'image-copyright-manager' ),
     52            'show_in_edit' => true,
     53            'show_in_modal' => true,
     54        );
     55
     56        $form_fields['imagcoma_credit_text'] = array(
     57            'label' => __( 'Credit Text (SEO)', 'image-copyright-manager' ),
     58            'input' => 'text',
     59            'value' => $credit_text,
     60            'helps' => __( 'The credit text for the image (e.g., photographer name).', 'image-copyright-manager' ),
     61            'show_in_edit' => true,
     62            'show_in_modal' => true,
     63        );
     64
     65        $form_fields['imagcoma_license_url'] = array(
     66            'label' => __( 'License URL (SEO)', 'image-copyright-manager' ),
     67            'input' => 'text',
     68            'value' => $license_url,
     69            'helps' => __( 'URL to the license of the image.', 'image-copyright-manager' ),
     70            'show_in_edit' => true,
     71            'show_in_modal' => true,
     72        );
     73
     74        $form_fields['imagcoma_acquire_license_url'] = array(
     75            'label' => __( 'Acquire License URL (SEO)', 'image-copyright-manager' ),
     76            'input' => 'text',
     77            'value' => $acquire_license_url,
     78            'helps' => __( 'URL where a user can acquire a license for the image.', 'image-copyright-manager' ),
    2979            'show_in_edit' => true,
    3080            'show_in_modal' => true,
     
    60110           
    61111            $copyright_data = wp_kses( wp_unslash( $attachment['imagcoma_copyright'] ), $allowed_html );
    62             IMAGCOMA_Utils::save_copyright_info( $post['ID'], $copyright_data );
     112            $creator = isset( $attachment['imagcoma_creator'] ) ? sanitize_text_field( wp_unslash( $attachment['imagcoma_creator'] ) ) : '';
     113            $copyright_notice = isset( $attachment['imagcoma_copyright_notice'] ) ? sanitize_text_field( wp_unslash( $attachment['imagcoma_copyright_notice'] ) ) : '';
     114            $credit_text = isset( $attachment['imagcoma_credit_text'] ) ? sanitize_text_field( wp_unslash( $attachment['imagcoma_credit_text'] ) ) : '';
     115            $license_url = isset( $attachment['imagcoma_license_url'] ) ? esc_url_raw( wp_unslash( $attachment['imagcoma_license_url'] ) ) : '';
     116            $acquire_license_url = isset( $attachment['imagcoma_acquire_license_url'] ) ? esc_url_raw( wp_unslash( $attachment['imagcoma_acquire_license_url'] ) ) : '';
     117
     118            IMAGCOMA_Utils::save_copyright_info( $post['ID'], $copyright_data, $creator, $copyright_notice, $credit_text, $license_url, $acquire_license_url );
    63119        }
    64120       
  • image-copyright-manager/trunk/includes/class-imagcoma-shortcodes.php

    r3327101 r3461346  
    3838        foreach ( $attachments as $row ) {
    3939            $attachment_id = $row->attachment_id;
     40            IMAGCOMA_Display::add_to_json_ld( $attachment_id );
    4041            $copyright = $row->copyright_text;
    4142            $attachment_url = wp_get_attachment_url( $attachment_id );
  • image-copyright-manager/trunk/includes/class-imagcoma-utils.php

    r3400521 r3461346  
    4242        global $wpdb;
    4343        $table_name = $wpdb->prefix . 'imagcoma_copyright';
    44         $copyright = $wpdb->get_var( $wpdb->prepare( "SELECT copyright_text FROM $table_name WHERE attachment_id = %d", $attachment_id ) );
     44        $row = $wpdb->get_row( $wpdb->prepare( "SELECT copyright_text, creator, copyright_notice, credit_text, license_url, acquire_license_url FROM $table_name WHERE attachment_id = %d", $attachment_id ) );
    4545        $display_copyright = get_post_meta( $attachment_id, '_imagcoma_display_copyright', true );
    4646       
    4747        $data = array(
    48             'copyright' => $copyright,
    49             'display_copyright' => $display_copyright === '1'
     48            'copyright'           => $row ? ($row->copyright_text ?? '') : '',
     49            'creator'             => $row ? ($row->creator ?? '') : '',
     50            'copyright_notice'    => $row ? ($row->copyright_notice ?? '') : '',
     51            'credit_text'         => $row ? ($row->credit_text ?? '') : '',
     52            'license_url'         => $row ? ($row->license_url ?? '') : '',
     53            'acquire_license_url' => $row ? ($row->acquire_license_url ?? '') : '',
     54            'display_copyright'   => $display_copyright === '1'
    5055        );
    5156
     
    9499    }
    95100
    96     public static function save_copyright_info( $attachment_id, $copyright_text ) {
     101    public static function save_copyright_info( $attachment_id, $copyright_text, $creator = '', $copyright_notice = '', $credit_text = '', $license_url = '', $acquire_license_url = '' ) {
    97102        global $wpdb;
    98103        $table_name = $wpdb->prefix . 'imagcoma_copyright';
     
    101106            $table_name,
    102107            array(
    103                 'attachment_id'   => $attachment_id,
    104                 'copyright_text'  => $copyright_text,
     108                'attachment_id'       => $attachment_id,
     109                'copyright_text'      => $copyright_text,
     110                'creator'             => $creator,
     111                'copyright_notice'    => $copyright_notice,
     112                'credit_text'         => $credit_text,
     113                'license_url'         => $license_url,
     114                'acquire_license_url' => $acquire_license_url,
    105115            ),
    106116            array(
    107117                '%d',
     118                '%s',
     119                '%s',
     120                '%s',
     121                '%s',
     122                '%s',
    108123                '%s',
    109124            )
  • image-copyright-manager/trunk/languages/image-copyright-manager.pot

    r3400998 r3461346  
    1 # Copyright (C) 2025 Image Copyright Manager
     1# Copyright (C) 2026 Image Copyright Manager
    22# This file is distributed under the same license as the Image Copyright Manager package.
    33msgid ""
     
    77"Content-Type: text/plain; charset=UTF-8\n"
    88"Content-Transfer-Encoding: 8bit\n"
    9 "POT-Creation-Date: 2025-11-22 15:11+0000\n"
     9"POT-Creation-Date: 2026-02-14 13:03+0000\n"
    1010"X-Poedit-Basepath: ..\n"
    1111"X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
     
    1515"Plural-Forms: nplurals=2; plural=(n != 1);\n"
    1616
    17 #: ../image-copyright-manager.php:37, ../includes/class-imagcoma-core.php:49
     17#: ../image-copyright-manager.php:55, ../includes/class-imagcoma-core.php:50
    1818msgid "Copyright: {copyright}"
    1919msgstr ""
     
    2323msgstr ""
    2424
    25 #: ../includes/class-imagcoma-meta-boxes.php:25
     25#: ../includes/class-imagcoma-meta-boxes.php:30
    2626msgid "Copyright Info"
    2727msgstr ""
    2828
    29 #: ../includes/class-imagcoma-meta-boxes.php:28
    30 msgid "Enter copyright information. HTML links are allowed."
     29#: ../includes/class-imagcoma-meta-boxes.php:33
     30msgid "Enter copyright information for display on the website. HTML links are allowed."
    3131msgstr ""
    3232
    33 #: ../includes/class-imagcoma-meta-boxes.php:34
     33#: ../includes/class-imagcoma-meta-boxes.php:39
     34msgid "Creator (SEO)"
     35msgstr ""
     36
     37#: ../includes/class-imagcoma-meta-boxes.php:42
     38msgid "The person or entity that created the image."
     39msgstr ""
     40
     41#: ../includes/class-imagcoma-meta-boxes.php:48
     42msgid "Copyright Notice (SEO)"
     43msgstr ""
     44
     45#: ../includes/class-imagcoma-meta-boxes.php:51
     46msgid "The copyright notice for Google SEO."
     47msgstr ""
     48
     49#: ../includes/class-imagcoma-meta-boxes.php:57
     50msgid "Credit Text (SEO)"
     51msgstr ""
     52
     53#: ../includes/class-imagcoma-meta-boxes.php:60
     54msgid "The credit text for the image (e.g., photographer name)."
     55msgstr ""
     56
     57#: ../includes/class-imagcoma-meta-boxes.php:66
     58msgid "License URL (SEO)"
     59msgstr ""
     60
     61#: ../includes/class-imagcoma-meta-boxes.php:69
     62msgid "URL to the license of the image."
     63msgstr ""
     64
     65#: ../includes/class-imagcoma-meta-boxes.php:75
     66msgid "Acquire License URL (SEO)"
     67msgstr ""
     68
     69#: ../includes/class-imagcoma-meta-boxes.php:78
     70msgid "URL where a user can acquire a license for the image."
     71msgstr ""
     72
     73#: ../includes/class-imagcoma-meta-boxes.php:84
    3474msgid "Display Copyright"
    3575msgstr ""
    3676
    37 #: ../includes/class-imagcoma-meta-boxes.php:36
     77#: ../includes/class-imagcoma-meta-boxes.php:86
    3878msgid "Display copyright text under this image"
    3979msgstr ""
  • image-copyright-manager/trunk/readme.txt

    r3400998 r3461346  
    55Tested up to: 6.8
    66Requires PHP: 7.4
    7 Stable tag: 1.2.2
     7Stable tag: 1.3.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 Add copyright information to WordPress media files with a custom field and display them using shortcodes.
     11Add copyright information to WordPress media files with a custom field and display them using shortcodes. Now includes JSON-LD for Image SEO.
    1212
    1313== Description ==
    1414
    15 Image Copyright Manager adds a custom field for copyright information to WordPress media attachments. This allows you to store copyright details for your images and other media files, and display them on your website using shortcodes.
     15Image Copyright Manager adds a custom field for copyright information to WordPress media attachments. This allows you to store copyright details for your images and other media files, and display them on your website using shortcodes. Version 1.3.0 introduces advanced SEO fields for "Creator" and "Copyright Notice" which are automatically output as JSON-LD for Google Image SEO.
    1616
    1717= Features =
    1818
    1919* Add copyright information to any media file in WordPress
     20* Complete Google Image SEO support (Creator, Copyright Notice, Credit Text, License URL, Acquire License URL)
     21* Automatic JSON-LD Schema.org output for Google Image SEO license badge
    2022* Support for HTML links in copyright information
    2123* Integrated into Media Modal and Edit Media screen
     
    8789== Changelog ==
    8890
     91= 1.3.0 =
     92- Added complete Google Image SEO support (Creator, Copyright Notice, Credit Text, License URL, Acquire License URL)
     93- Added automatic JSON-LD Schema.org output for Google Image SEO license badge
     94- Improved image collection logic to support featured images and more theme structures
     95- Updated database schema for SEO metadata
     96- Added JSON-LD support for single attachment pages
     97
    8998= 1.2.2 =
    9099- Added sortable Copyright column to Media Library list view
Note: See TracChangeset for help on using the changeset viewer.