Changeset 3461346
- Timestamp:
- 02/14/2026 01:09:56 PM (7 weeks ago)
- Location:
- image-copyright-manager
- Files:
-
- 18 edited
- 1 copied
-
tags/1.3.0 (copied) (copied from image-copyright-manager/trunk)
-
tags/1.3.0/CHANGELOG.txt (modified) (1 diff)
-
tags/1.3.0/image-copyright-manager.php (modified) (3 diffs)
-
tags/1.3.0/includes/class-imagcoma-core.php (modified) (3 diffs)
-
tags/1.3.0/includes/class-imagcoma-display.php (modified) (4 diffs)
-
tags/1.3.0/includes/class-imagcoma-meta-boxes.php (modified) (3 diffs)
-
tags/1.3.0/includes/class-imagcoma-shortcodes.php (modified) (1 diff)
-
tags/1.3.0/includes/class-imagcoma-utils.php (modified) (3 diffs)
-
tags/1.3.0/languages/image-copyright-manager.pot (modified) (4 diffs)
-
tags/1.3.0/readme.txt (modified) (2 diffs)
-
trunk/CHANGELOG.txt (modified) (1 diff)
-
trunk/image-copyright-manager.php (modified) (3 diffs)
-
trunk/includes/class-imagcoma-core.php (modified) (3 diffs)
-
trunk/includes/class-imagcoma-display.php (modified) (4 diffs)
-
trunk/includes/class-imagcoma-meta-boxes.php (modified) (3 diffs)
-
trunk/includes/class-imagcoma-shortcodes.php (modified) (1 diff)
-
trunk/includes/class-imagcoma-utils.php (modified) (3 diffs)
-
trunk/languages/image-copyright-manager.pot (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
image-copyright-manager/tags/1.3.0/CHANGELOG.txt
r3400998 r3461346 5 5 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 6 6 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 7 19 ## [1.2.2] - 2025-11-22 8 20 ### Added 9 21 - Added sortable Copyright column to Media Library list view 10 22 - Improved admin interface for managing copyright information 11 12 23 13 24 ## [1.2.1] - 2025-11-22 -
image-copyright-manager/tags/1.3.0/image-copyright-manager.php
r3400998 r3461346 4 4 * Plugin URI: https://mahelwebdesign.com/image-copyright-manager/ 5 5 * Description: Adds a custom field for copyright information to WordPress media. 6 * Version: 1. 2.26 * Version: 1.3.0 7 7 * Requires at least: 6.4 8 8 * Requires PHP: 7.4 … … 12 12 * License: GPL2 13 13 * License URI: https://www.gnu.org/licenses/gpl-2.0.html 14 * Text Domain: image-copyright-manager15 14 * Domain Path: /languages 16 15 */ … … 20 19 } 21 20 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(); 21 if ( ! defined( 'IMAGCOMA_PLUGIN_FILE' ) ) { 22 define( 'IMAGCOMA_PLUGIN_FILE', __FILE__ ); 23 } 24 if ( ! defined( 'IMAGCOMA_PLUGIN_DIR' ) ) { 25 define( 'IMAGCOMA_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 26 } 27 if ( ! defined( 'IMAGCOMA_PLUGIN_URL' ) ) { 28 define( 'IMAGCOMA_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); 31 29 } 32 30 33 add_action( 'plugins_loaded', 'imagcoma_init' ); 31 // Load dependencies with safety checks 32 require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-utils.php'; 33 require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-core.php'; 34 require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-meta-boxes.php'; 35 require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-shortcodes.php'; 36 require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-settings.php'; 37 require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-display.php'; 38 require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-admin-columns.php'; 34 39 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 ); 40 if ( ! 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' ); 41 48 } 42 register_activation_hook( __FILE__, 'imagcoma_activate' );43 49 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(); 50 if ( ! 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 ); 49 59 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 70 if ( ! 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) 56 87 ) $charset_collate;"; 57 88 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 } 60 92 } 61 93 62 function imagcoma_deactivate() { 63 } 64 65 register_deactivation_hook( __FILE__, 'imagcoma_deactivate' ); 94 if ( ! 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 12 12 class IMAGCOMA_Core { 13 13 14 const VERSION = '1. 2.2';14 const VERSION = '1.3.0'; 15 15 16 16 const TEXT_DOMAIN = 'image-copyright-manager'; … … 22 22 private function init_hooks() { 23 23 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 } 24 33 } 25 34 26 35 public function init() { 27 $this->load_dependencies();28 29 36 new IMAGCOMA_Meta_Boxes(); 30 37 new IMAGCOMA_Shortcodes(); … … 35 42 36 43 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';43 44 } 44 45 -
image-copyright-manager/tags/1.3.0/includes/class-imagcoma-display.php
r3400521 r3461346 13 13 class IMAGCOMA_Display { 14 14 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 15 23 public function __construct() { 16 24 add_filter( 'the_content', array( $this, 'auto_display_copyright' ) ); 17 25 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; 18 36 } 19 37 … … 53 71 } 54 72 73 // Collect for JSON-LD 74 self::add_to_json_ld( $attachment_id ); 75 55 76 $copyright_data = IMAGCOMA_Utils::get_copyright_info( $attachment_id ); 56 77 $display_copyright = $copyright_data['display_copyright'] ?? false; … … 73 94 74 95 // 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 } 78 106 79 107 // Insert after image … … 103 131 } 104 132 } 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 } 105 218 } -
image-copyright-manager/tags/1.3.0/includes/class-imagcoma-meta-boxes.php
r3400521 r3461346 20 20 $copyright_data = IMAGCOMA_Utils::get_copyright_info( $post->ID ); 21 21 $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'] ?? ''; 22 27 $display_copyright = $copyright_data['display_copyright'] ?? false; 23 28 … … 26 31 'input' => 'textarea', 27 32 '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' ), 29 79 'show_in_edit' => true, 30 80 'show_in_modal' => true, … … 60 110 61 111 $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 ); 63 119 } 64 120 -
image-copyright-manager/tags/1.3.0/includes/class-imagcoma-shortcodes.php
r3327101 r3461346 38 38 foreach ( $attachments as $row ) { 39 39 $attachment_id = $row->attachment_id; 40 IMAGCOMA_Display::add_to_json_ld( $attachment_id ); 40 41 $copyright = $row->copyright_text; 41 42 $attachment_url = wp_get_attachment_url( $attachment_id ); -
image-copyright-manager/tags/1.3.0/includes/class-imagcoma-utils.php
r3400521 r3461346 42 42 global $wpdb; 43 43 $table_name = $wpdb->prefix . 'imagcoma_copyright'; 44 $ copyright = $wpdb->get_var( $wpdb->prepare( "SELECT copyright_textFROM $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 ) ); 45 45 $display_copyright = get_post_meta( $attachment_id, '_imagcoma_display_copyright', true ); 46 46 47 47 $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' 50 55 ); 51 56 … … 94 99 } 95 100 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 = '' ) { 97 102 global $wpdb; 98 103 $table_name = $wpdb->prefix . 'imagcoma_copyright'; … … 101 106 $table_name, 102 107 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, 105 115 ), 106 116 array( 107 117 '%d', 118 '%s', 119 '%s', 120 '%s', 121 '%s', 122 '%s', 108 123 '%s', 109 124 ) -
image-copyright-manager/tags/1.3.0/languages/image-copyright-manager.pot
r3400998 r3461346 1 # Copyright (C) 202 5Image Copyright Manager1 # Copyright (C) 2026 Image Copyright Manager 2 2 # This file is distributed under the same license as the Image Copyright Manager package. 3 3 msgid "" … … 7 7 "Content-Type: text/plain; charset=UTF-8\n" 8 8 "Content-Transfer-Encoding: 8bit\n" 9 "POT-Creation-Date: 202 5-11-22 15:11+0000\n"9 "POT-Creation-Date: 2026-02-14 13:03+0000\n" 10 10 "X-Poedit-Basepath: ..\n" 11 11 "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" … … 15 15 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 16 16 17 #: ../image-copyright-manager.php: 37, ../includes/class-imagcoma-core.php:4917 #: ../image-copyright-manager.php:55, ../includes/class-imagcoma-core.php:50 18 18 msgid "Copyright: {copyright}" 19 19 msgstr "" … … 23 23 msgstr "" 24 24 25 #: ../includes/class-imagcoma-meta-boxes.php: 2525 #: ../includes/class-imagcoma-meta-boxes.php:30 26 26 msgid "Copyright Info" 27 27 msgstr "" 28 28 29 #: ../includes/class-imagcoma-meta-boxes.php: 2830 msgid "Enter copyright information . HTML links are allowed."29 #: ../includes/class-imagcoma-meta-boxes.php:33 30 msgid "Enter copyright information for display on the website. HTML links are allowed." 31 31 msgstr "" 32 32 33 #: ../includes/class-imagcoma-meta-boxes.php:34 33 #: ../includes/class-imagcoma-meta-boxes.php:39 34 msgid "Creator (SEO)" 35 msgstr "" 36 37 #: ../includes/class-imagcoma-meta-boxes.php:42 38 msgid "The person or entity that created the image." 39 msgstr "" 40 41 #: ../includes/class-imagcoma-meta-boxes.php:48 42 msgid "Copyright Notice (SEO)" 43 msgstr "" 44 45 #: ../includes/class-imagcoma-meta-boxes.php:51 46 msgid "The copyright notice for Google SEO." 47 msgstr "" 48 49 #: ../includes/class-imagcoma-meta-boxes.php:57 50 msgid "Credit Text (SEO)" 51 msgstr "" 52 53 #: ../includes/class-imagcoma-meta-boxes.php:60 54 msgid "The credit text for the image (e.g., photographer name)." 55 msgstr "" 56 57 #: ../includes/class-imagcoma-meta-boxes.php:66 58 msgid "License URL (SEO)" 59 msgstr "" 60 61 #: ../includes/class-imagcoma-meta-boxes.php:69 62 msgid "URL to the license of the image." 63 msgstr "" 64 65 #: ../includes/class-imagcoma-meta-boxes.php:75 66 msgid "Acquire License URL (SEO)" 67 msgstr "" 68 69 #: ../includes/class-imagcoma-meta-boxes.php:78 70 msgid "URL where a user can acquire a license for the image." 71 msgstr "" 72 73 #: ../includes/class-imagcoma-meta-boxes.php:84 34 74 msgid "Display Copyright" 35 75 msgstr "" 36 76 37 #: ../includes/class-imagcoma-meta-boxes.php: 3677 #: ../includes/class-imagcoma-meta-boxes.php:86 38 78 msgid "Display copyright text under this image" 39 79 msgstr "" -
image-copyright-manager/tags/1.3.0/readme.txt
r3400998 r3461346 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 1. 2.27 Stable tag: 1.3.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 10 11 Add copyright information to WordPress media files with a custom field and display them using shortcodes. 11 Add copyright information to WordPress media files with a custom field and display them using shortcodes. Now includes JSON-LD for Image SEO. 12 12 13 13 == Description == 14 14 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. 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. Version 1.3.0 introduces advanced SEO fields for "Creator" and "Copyright Notice" which are automatically output as JSON-LD for Google Image SEO. 16 16 17 17 = Features = 18 18 19 19 * 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 20 22 * Support for HTML links in copyright information 21 23 * Integrated into Media Modal and Edit Media screen … … 87 89 == Changelog == 88 90 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 89 98 = 1.2.2 = 90 99 - Added sortable Copyright column to Media Library list view -
image-copyright-manager/trunk/CHANGELOG.txt
r3400998 r3461346 5 5 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 6 6 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 7 19 ## [1.2.2] - 2025-11-22 8 20 ### Added 9 21 - Added sortable Copyright column to Media Library list view 10 22 - Improved admin interface for managing copyright information 11 12 23 13 24 ## [1.2.1] - 2025-11-22 -
image-copyright-manager/trunk/image-copyright-manager.php
r3400998 r3461346 4 4 * Plugin URI: https://mahelwebdesign.com/image-copyright-manager/ 5 5 * Description: Adds a custom field for copyright information to WordPress media. 6 * Version: 1. 2.26 * Version: 1.3.0 7 7 * Requires at least: 6.4 8 8 * Requires PHP: 7.4 … … 12 12 * License: GPL2 13 13 * License URI: https://www.gnu.org/licenses/gpl-2.0.html 14 * Text Domain: image-copyright-manager15 14 * Domain Path: /languages 16 15 */ … … 20 19 } 21 20 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(); 21 if ( ! defined( 'IMAGCOMA_PLUGIN_FILE' ) ) { 22 define( 'IMAGCOMA_PLUGIN_FILE', __FILE__ ); 23 } 24 if ( ! defined( 'IMAGCOMA_PLUGIN_DIR' ) ) { 25 define( 'IMAGCOMA_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 26 } 27 if ( ! defined( 'IMAGCOMA_PLUGIN_URL' ) ) { 28 define( 'IMAGCOMA_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); 31 29 } 32 30 33 add_action( 'plugins_loaded', 'imagcoma_init' ); 31 // Load dependencies with safety checks 32 require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-utils.php'; 33 require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-core.php'; 34 require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-meta-boxes.php'; 35 require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-shortcodes.php'; 36 require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-settings.php'; 37 require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-display.php'; 38 require_once IMAGCOMA_PLUGIN_DIR . 'includes/class-imagcoma-admin-columns.php'; 34 39 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 ); 40 if ( ! 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' ); 41 48 } 42 register_activation_hook( __FILE__, 'imagcoma_activate' );43 49 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(); 50 if ( ! 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 ); 49 59 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 70 if ( ! 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) 56 87 ) $charset_collate;"; 57 88 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 } 60 92 } 61 93 62 function imagcoma_deactivate() { 63 } 64 65 register_deactivation_hook( __FILE__, 'imagcoma_deactivate' ); 94 if ( ! 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 12 12 class IMAGCOMA_Core { 13 13 14 const VERSION = '1. 2.2';14 const VERSION = '1.3.0'; 15 15 16 16 const TEXT_DOMAIN = 'image-copyright-manager'; … … 22 22 private function init_hooks() { 23 23 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 } 24 33 } 25 34 26 35 public function init() { 27 $this->load_dependencies();28 29 36 new IMAGCOMA_Meta_Boxes(); 30 37 new IMAGCOMA_Shortcodes(); … … 35 42 36 43 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';43 44 } 44 45 -
image-copyright-manager/trunk/includes/class-imagcoma-display.php
r3400521 r3461346 13 13 class IMAGCOMA_Display { 14 14 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 15 23 public function __construct() { 16 24 add_filter( 'the_content', array( $this, 'auto_display_copyright' ) ); 17 25 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; 18 36 } 19 37 … … 53 71 } 54 72 73 // Collect for JSON-LD 74 self::add_to_json_ld( $attachment_id ); 75 55 76 $copyright_data = IMAGCOMA_Utils::get_copyright_info( $attachment_id ); 56 77 $display_copyright = $copyright_data['display_copyright'] ?? false; … … 73 94 74 95 // 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 } 78 106 79 107 // Insert after image … … 103 131 } 104 132 } 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 } 105 218 } -
image-copyright-manager/trunk/includes/class-imagcoma-meta-boxes.php
r3400521 r3461346 20 20 $copyright_data = IMAGCOMA_Utils::get_copyright_info( $post->ID ); 21 21 $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'] ?? ''; 22 27 $display_copyright = $copyright_data['display_copyright'] ?? false; 23 28 … … 26 31 'input' => 'textarea', 27 32 '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' ), 29 79 'show_in_edit' => true, 30 80 'show_in_modal' => true, … … 60 110 61 111 $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 ); 63 119 } 64 120 -
image-copyright-manager/trunk/includes/class-imagcoma-shortcodes.php
r3327101 r3461346 38 38 foreach ( $attachments as $row ) { 39 39 $attachment_id = $row->attachment_id; 40 IMAGCOMA_Display::add_to_json_ld( $attachment_id ); 40 41 $copyright = $row->copyright_text; 41 42 $attachment_url = wp_get_attachment_url( $attachment_id ); -
image-copyright-manager/trunk/includes/class-imagcoma-utils.php
r3400521 r3461346 42 42 global $wpdb; 43 43 $table_name = $wpdb->prefix . 'imagcoma_copyright'; 44 $ copyright = $wpdb->get_var( $wpdb->prepare( "SELECT copyright_textFROM $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 ) ); 45 45 $display_copyright = get_post_meta( $attachment_id, '_imagcoma_display_copyright', true ); 46 46 47 47 $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' 50 55 ); 51 56 … … 94 99 } 95 100 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 = '' ) { 97 102 global $wpdb; 98 103 $table_name = $wpdb->prefix . 'imagcoma_copyright'; … … 101 106 $table_name, 102 107 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, 105 115 ), 106 116 array( 107 117 '%d', 118 '%s', 119 '%s', 120 '%s', 121 '%s', 122 '%s', 108 123 '%s', 109 124 ) -
image-copyright-manager/trunk/languages/image-copyright-manager.pot
r3400998 r3461346 1 # Copyright (C) 202 5Image Copyright Manager1 # Copyright (C) 2026 Image Copyright Manager 2 2 # This file is distributed under the same license as the Image Copyright Manager package. 3 3 msgid "" … … 7 7 "Content-Type: text/plain; charset=UTF-8\n" 8 8 "Content-Transfer-Encoding: 8bit\n" 9 "POT-Creation-Date: 202 5-11-22 15:11+0000\n"9 "POT-Creation-Date: 2026-02-14 13:03+0000\n" 10 10 "X-Poedit-Basepath: ..\n" 11 11 "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" … … 15 15 "Plural-Forms: nplurals=2; plural=(n != 1);\n" 16 16 17 #: ../image-copyright-manager.php: 37, ../includes/class-imagcoma-core.php:4917 #: ../image-copyright-manager.php:55, ../includes/class-imagcoma-core.php:50 18 18 msgid "Copyright: {copyright}" 19 19 msgstr "" … … 23 23 msgstr "" 24 24 25 #: ../includes/class-imagcoma-meta-boxes.php: 2525 #: ../includes/class-imagcoma-meta-boxes.php:30 26 26 msgid "Copyright Info" 27 27 msgstr "" 28 28 29 #: ../includes/class-imagcoma-meta-boxes.php: 2830 msgid "Enter copyright information . HTML links are allowed."29 #: ../includes/class-imagcoma-meta-boxes.php:33 30 msgid "Enter copyright information for display on the website. HTML links are allowed." 31 31 msgstr "" 32 32 33 #: ../includes/class-imagcoma-meta-boxes.php:34 33 #: ../includes/class-imagcoma-meta-boxes.php:39 34 msgid "Creator (SEO)" 35 msgstr "" 36 37 #: ../includes/class-imagcoma-meta-boxes.php:42 38 msgid "The person or entity that created the image." 39 msgstr "" 40 41 #: ../includes/class-imagcoma-meta-boxes.php:48 42 msgid "Copyright Notice (SEO)" 43 msgstr "" 44 45 #: ../includes/class-imagcoma-meta-boxes.php:51 46 msgid "The copyright notice for Google SEO." 47 msgstr "" 48 49 #: ../includes/class-imagcoma-meta-boxes.php:57 50 msgid "Credit Text (SEO)" 51 msgstr "" 52 53 #: ../includes/class-imagcoma-meta-boxes.php:60 54 msgid "The credit text for the image (e.g., photographer name)." 55 msgstr "" 56 57 #: ../includes/class-imagcoma-meta-boxes.php:66 58 msgid "License URL (SEO)" 59 msgstr "" 60 61 #: ../includes/class-imagcoma-meta-boxes.php:69 62 msgid "URL to the license of the image." 63 msgstr "" 64 65 #: ../includes/class-imagcoma-meta-boxes.php:75 66 msgid "Acquire License URL (SEO)" 67 msgstr "" 68 69 #: ../includes/class-imagcoma-meta-boxes.php:78 70 msgid "URL where a user can acquire a license for the image." 71 msgstr "" 72 73 #: ../includes/class-imagcoma-meta-boxes.php:84 34 74 msgid "Display Copyright" 35 75 msgstr "" 36 76 37 #: ../includes/class-imagcoma-meta-boxes.php: 3677 #: ../includes/class-imagcoma-meta-boxes.php:86 38 78 msgid "Display copyright text under this image" 39 79 msgstr "" -
image-copyright-manager/trunk/readme.txt
r3400998 r3461346 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 1. 2.27 Stable tag: 1.3.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 10 11 Add copyright information to WordPress media files with a custom field and display them using shortcodes. 11 Add copyright information to WordPress media files with a custom field and display them using shortcodes. Now includes JSON-LD for Image SEO. 12 12 13 13 == Description == 14 14 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. 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. Version 1.3.0 introduces advanced SEO fields for "Creator" and "Copyright Notice" which are automatically output as JSON-LD for Google Image SEO. 16 16 17 17 = Features = 18 18 19 19 * 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 20 22 * Support for HTML links in copyright information 21 23 * Integrated into Media Modal and Edit Media screen … … 87 89 == Changelog == 88 90 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 89 98 = 1.2.2 = 90 99 - Added sortable Copyright column to Media Library list view
Note: See TracChangeset
for help on using the changeset viewer.