Changeset 3390059
- Timestamp:
- 11/04/2025 11:08:22 PM (5 months ago)
- Location:
- image-credit-companion
- Files:
-
- 45 added
- 1 edited
-
assets/banner-1544x500.png (added)
-
assets/banner-772x250.png (added)
-
assets/icon-256x256.png (added)
-
assets/screenshot-1.png (added)
-
assets/screenshot-2.png (added)
-
assets/screenshot-3.png (added)
-
assets/screenshot-4.png (added)
-
assets/screenshot-5.png (added)
-
assets/screenshot-6.png (added)
-
tags/1.0.0 (added)
-
tags/1.0.0/admin (added)
-
tags/1.0.0/admin/class-eiam-admin.php (added)
-
tags/1.0.0/assets (added)
-
tags/1.0.0/assets/admin.css (added)
-
tags/1.0.0/assets/admin.js (added)
-
tags/1.0.0/assets/block.js (added)
-
tags/1.0.0/assets/block.json (added)
-
tags/1.0.0/assets/editor.css (added)
-
tags/1.0.0/assets/editor.js (added)
-
tags/1.0.0/assets/media-attribution.js (added)
-
tags/1.0.0/assets/public.css (added)
-
tags/1.0.0/image-credit-companion.php (added)
-
tags/1.0.0/includes (added)
-
tags/1.0.0/includes/autoloader.php (added)
-
tags/1.0.0/includes/class-eiam-activator.php (added)
-
tags/1.0.0/includes/class-eiam-admin-list-table.php (added)
-
tags/1.0.0/includes/class-eiam-deactivator.php (added)
-
tags/1.0.0/includes/class-eiam-plugin.php (added)
-
tags/1.0.0/includes/class-eiam-renderer.php (added)
-
tags/1.0.0/includes/class-eiam-repository.php (added)
-
tags/1.0.0/includes/class-eiam-rest.php (added)
-
tags/1.0.0/includes/class-eiam-settings.php (added)
-
tags/1.0.0/includes/class-eiam-usage-scanner.php (added)
-
tags/1.0.0/includes/functions-template.php (added)
-
tags/1.0.0/languages (added)
-
tags/1.0.0/languages/image-credit-companion.pot (added)
-
tags/1.0.0/public (added)
-
tags/1.0.0/public/class-eiam-frontend.php (added)
-
tags/1.0.0/public/templates (added)
-
tags/1.0.0/public/templates/list-inline.php (added)
-
tags/1.0.0/public/templates/list-ol.php (added)
-
tags/1.0.0/public/templates/list-table.php (added)
-
tags/1.0.0/public/templates/list-ul.php (added)
-
tags/1.0.0/readme.txt (added)
-
tags/1.0.0/uninstall.php (added)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
image-credit-companion/trunk/readme.txt
r3390056 r3390059 22 22 * **Comprehensive Admin Interface**: Site-wide overview with filtering, bulk editing, and usage statistics 23 23 * **Template System**: Customizable output templates with theme override support 24 * **REST API**: Full API support for custom integrations and third-party tools25 24 * **Performance Optimized**: Efficient database design with caching and indexed queries 26 25 * **Security First**: Proper sanitization, validation, and capability-based access control … … 157 156 4. The block will automatically display the appropriate image sources 158 157 159 = Template Customization =160 161 Create custom templates in your theme's `image-credit-companion/` directory:162 163 ```php164 // yourtheme/image-credit-companion/list-ul.php165 <div class="my-custom-image-sources">166 <h3>Image Credits</h3>167 <ul>168 <?php foreach ($images as $image): ?>169 <li>170 <?php echo esc_html($image['author']); ?> —171 <em><?php echo esc_html($image['attachment_title']); ?></em>172 <?php if ($image['license_name']): ?>173 (<?php echo esc_html($image['license_name']); ?>)174 <?php endif; ?>175 </li>176 <?php endforeach; ?>177 </ul>178 </div>179 ```180 181 = REST API Usage =182 183 The plugin provides a REST API for programmatic access to image metadata.184 185 **REST API Endpoint Base:** `/wp-json/imagcrco/v1/`186 187 Get images for a specific post:188 ```189 GET /wp-json/imagcrco/v1/post/123/images190 ```191 192 Update attachment metadata:193 ```194 POST /wp-json/imagcrco/v1/attachment/456/meta195 {196 "author": "John Doe",197 "source_url": "https://example.com",198 "license_name": "CC BY 4.0",199 "license_url": "https://creativecommons.org/licenses/by/4.0/"200 }201 ```202 203 == Developer Notes ==204 205 = Hooks and Filters =206 207 * `imagcrco_supported_post_types`: Modify which post types are scanned for images208 * `imagcrco_image_sources_output`: Filter the final output HTML209 * `imagcrco_attachment_metadata`: Filter attachment metadata before saving210 211 = Database Schema =212 213 The plugin creates a custom database table to efficiently track which images are used in which posts:214 * `id`: Primary key215 * `post_id`: Post ID where image is used216 * `attachment_id`: WordPress attachment ID217 * `context`: Usage context (e.g., "core/image", "html")218 * `first_seen`: When image was first used219 * `last_seen`: When image was last used220 221 = Capabilities =222 223 * `manage_image_sources`: Full administrative access224 * `edit_image_sources`: Edit image metadata225 * `view_image_sources`: View image sources (default for all users)226 158 227 159 == Support ==
Note: See TracChangeset
for help on using the changeset viewer.