Plugin Directory

Changeset 3236654


Ignore:
Timestamp:
02/07/2025 02:24:56 PM (14 months ago)
Author:
wpcompany
Message:

Adding function for background-postion version 1.3

Location:
media-focus-point
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • media-focus-point/tags/1.3/readme.txt

    r3236642 r3236654  
    55Tested up to: 6.7.1
    66Requires PHP: 7.4
    7 Stable tag: 1.2.1
     7Stable tag: 1.3
    88License: GPLv3 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    3232    ?>
    3333
    34 **For background images:**
     34**For background images including the background-image:url():**
     35
     36    <div class="myelement" style="<?= MFP_Background($image_id); ?>"></div>
     37
     38    <!-- Result -->
     39    <div class="myelement" style="background-image:url('example.jpg');background-position: 45% 34%;background-size: cover;"></div>
     40
     41**To omit inline background-image, set second parameter to false:**
    3542
    3643    <div class="myelement" style="<?= MFP_Background($image_id, false); ?>"></div>
    3744
     45    <!-- Result -->
     46    <div class="myelement" style="background-position: 45% 34%;background-size: cover;"></div>
    3847
    3948**For images from Advanced Custom Fields (ACF):**
  • media-focus-point/trunk/readme.txt

    r3236642 r3236654  
    55Tested up to: 6.7.1
    66Requires PHP: 7.4
    7 Stable tag: 1.2.1
     7Stable tag: 1.3
    88License: GPLv3 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    3232    ?>
    3333
    34 **For background images:**
     34**For background images including the background-image:url():**
     35
     36    <div class="myelement" style="<?= MFP_Background($image_id); ?>"></div>
     37
     38    <!-- Result -->
     39    <div class="myelement" style="background-image:url('example.jpg');background-position: 45% 34%;background-size: cover;"></div>
     40
     41**To omit inline background-image, set second parameter to false:**
    3542
    3643    <div class="myelement" style="<?= MFP_Background($image_id, false); ?>"></div>
    3744
     45    <!-- Result -->
     46    <div class="myelement" style="background-position: 45% 34%;background-size: cover;"></div>
    3847
    3948**For images from Advanced Custom Fields (ACF):**
Note: See TracChangeset for help on using the changeset viewer.