Changeset 3216376
- Timestamp:
- 01/03/2025 10:07:30 AM (15 months ago)
- Location:
- media-focus-point/trunk
- Files:
-
- 3 edited
-
languages/media-focus-point.pot (modified) (2 diffs)
-
media-focus-point.php (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
media-focus-point/trunk/languages/media-focus-point.pot
r3216042 r3216376 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Media focus point 1.0\n"5 "Project-Id-Version: Media Focus Point 1.0\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/media-focus-point\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 17 17 #. Plugin Name of the plugin 18 18 #: media-focus-point.php 19 msgid "Media focus point"19 msgid "Media Focus Point" 20 20 msgstr "" 21 21 22 22 #. Description of the plugin 23 23 #: media-focus-point.php 24 msgid "Ensures that your selected focus area of an image or videoremains centered and visible, even when resized."24 msgid "Ensures that your selected focus area of an image remains centered and visible, even when resized." 25 25 msgstr "" 26 26 -
media-focus-point/trunk/media-focus-point.php
r3216042 r3216376 1 1 <?php 2 2 /** 3 * Plugin Name: Media focus point4 * Description: Ensures that your selected focus area of an image or videoremains centered and visible, even when resized.3 * Plugin Name: Media Focus Point 4 * Description: Ensures that your selected focus area of an image remains centered and visible, even when resized. 5 5 * Version: 1.2 6 6 * Author: WP Company -
media-focus-point/trunk/readme.txt
r3216042 r3216376 1 === Media focus point ===1 === Media Focus Point === 2 2 Contributors: wpcompany 3 Tags: image, video, focus point, focal point, focus, focal3 Tags: focus, focal, center, image, background 4 4 Requires at least: 6.0 5 5 Tested up to: 6.7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1.2 7 Stable tag: 1.2.1 8 8 License: GPLv3 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 10 11 Media focus point Plugin allows you to set a focus point on an image or video background, ensuring that when the image is resized or its background changes, the selected focus area remains centered and visible. It provides a seamless way to keep important parts of an image or video in view, regardless of screen size or layout adjustments. 12 See the plugin in action on [WP Company](https://www.wpcompany.nl/ "The WordPress specialist") 11 The Media Focus Point Plugin ensures the key area of an image stays visible, regardless of resizing or layout changes. 13 12 14 13 == Description == 15 14 16 This plugin helps you manage image and video backgrounds by enabling you to set a specific focus point. When the image or video is resized or its background changes, the focus point ensures that the selected arearemains visible and centered.15 This plugin makes managing background images effortless by allowing you to set a focus point that stays consistent. Regardless of how the image is resized or the background changes, the focus point ensures that the most important part of the image remains visible and centered. 17 16 18 Whether you're working with responsive layouts or dynamic backgrounds, this plugin helps maintain visual consistency, making sure important parts of your media are always in view, no matter the screen size or resolution. 17 Ideal for responsive designs and dynamic backgrounds, this tool ensures your media always looks polished and professional on any screen size or resolution. 18 19 🚀 See the plugin in action on [WP Company](https://www.wpcompany.nl/ "The WordPress specialist") 20 21 == Installation == 22 23 To display an image in your custom template with the focus point applied, you can use the following code snippet: 24 Most WordPress themes already use this standard WordPress method to render featured images. 25 26 **For featured images (post thumbnails):** 27 28 <?php 29 echo get_the_post_thumbnail('', 'full'); 30 ?> 31 32 33 **For images from Advanced Custom Fields (ACF):** 34 35 <?php 36 echo wp_get_attachment_image( get_field('MY-CUSTOM-IMAGE'), 'full' ); 37 ?> 38 39 40 **To ensure the image fills its element while maintaining the focus point, use the object-fit property in your CSS. For example:** 41 42 img { 43 height: 300px; 44 width: 100%; 45 object-fit: cover; 46 } 47 48 *💡 The plugin automatically adds an inline style attribute to the image element, such as:* 49 50 51 style="object-position: 50% 38%;" 52 19 53 20 54 == Frequently Asked Questions == … … 22 56 = How do I set a focus point? = 23 57 24 When you upload an image or video, the default focus point is centered. To change this, follow these steps: 25 1. Upload your image or video: After uploading, you’ll see the standard focus point set to the center of the media. 26 2. Edit the focus point: Below the alt text and description fields, you’ll find an option labeled Focus Point. Click on this the 'Change' button. 27 3. Select the focus area: A preview of your image or video will appear. Simply click on the part of the image or video you want to focus on. The plugin will visually mark the selected focus area. 28 4. Save your selection: After selecting the focus point, click Save. The plugin will record your choice. 29 5. Adjust percentage: Once saved, you will see two percentage fields: one for the horizontal and one for the vertical focus point. These percentages represent the exact position of your selected focus area relative to the image’s dimensions. 30 6. No additional save required: Once the percentages are set, the focus point is automatically applied, and there’s no need to save the image itself again. 58 When you upload an image, the default focus point is centered. To change this, follow these steps: 31 59 32 The focus point will now remain centered on the selected area as the image or video resizes, ensuring the most important parts are always visible, no matter the screen size or layout changes. 60 1. Upload your image: After uploading, you’ll see the standard focus point set to the center of the media. 61 2. Edit the focus point: Below the alt text and description fields, you’ll find an option labeled Focus Point. Click on this the 'Change' button. 62 3. Select the focus area: A preview of your image will appear. Simply click on the part of the image you want to focus on. The plugin will visually mark the selected focus area. 63 4. Save your selection: After selecting the focus point, click Save. The plugin will record your choice. 64 5. Adjust percentage: Once saved, you will see two percentage fields: one for the horizontal and one for the vertical focus point. These percentages represent the exact position of your selected focus area relative to the image’s dimensions. 65 6. No additional save required: Once the percentages are set, the focus point is automatically applied, and there’s no need to save the image itself again. 66 67 The focus point will now remain centered on the selected area as the image resizes, ensuring the most important parts are always visible, no matter the screen size or layout changes. 33 68 34 69 = Is this plugin compatible with all themes? = 35 70 36 Yes, the plugin is designed to be compatible with most WordPress themes that use image or video backgrounds. If you encounter issues, please reach out to our support team. 37 38 = How to use the image in my custom template? = 39 40 To display an image in your custom template with the focus point applied, you can use the following code snippet: 41 Most WordPress themes already use this standard WordPress method to render featured images. 42 43 For featured images (post thumbnails): 44 `<?php 45 $image = get_the_post_thumbnail('', 'full'); 46 echo $thumb; 47 ?>` 48 49 For images from Advanced Custom Fields (ACF): 50 `<?php 51 $image = get_field('MY-CUSTOM-IMAGE'); 52 echo wp_get_attachment_image( $image, 'full'); 53 ?>` 54 55 The plugin automatically adds an inline style attribute to the image element, such as: 56 `style="object-position: 50% 38%;"` 57 58 To ensure the image fills its <img> element while maintaining the focus point, use the object-fit property in your CSS. For example: 59 `img { 60 height: 300px; 61 width: 100%; 62 object-fit: cover; 63 }` 71 Yes, the plugin is designed to be compatible with most WordPress themes that use image backgrounds. If you encounter issues, please reach out to our support team. 64 72 65 73 == Screenshots == 66 74 67 1. This screenshot shows how to set the focus point for an image or video. 68 2. This screenshot demonstrates the image resizing while keeping the focus point centered. 75 1. This screenshot displays the Media Focus Point options available for an uploaded image. 76 2. This screenshot showcases how to set the focus point on an image. 77 3. This screenshot illustrates how the image resizes while ensuring the focus point remains visible. 69 78 70 79 == Changelog == 80 81 = 1.2.1 = 82 * Added banner, icon and screenshot to plugin 71 83 72 84 = 1.2 = … … 75 87 = 1.1 = 76 88 * Replaced jQuery with vanilla JavaScript for improved performance and compatibility. 77 * Added the ability to set a focus point on video backgrounds.78 89 79 90 = 1.0 =
Note: See TracChangeset
for help on using the changeset viewer.