Changeset 2702672
- Timestamp:
- 03/31/2022 12:15:19 PM (4 years ago)
- Location:
- hatch
- Files:
-
- 2 edited
- 7 copied
-
tags/1.0.0/trunk (copied) (copied from hatch/trunk)
-
tags/1.0.0/trunk/LICENSE.md (copied) (copied from hatch/trunk/LICENSE.md)
-
tags/1.0.0/trunk/abe-hatch.php (copied) (copied from hatch/trunk/abe-hatch.php)
-
tags/1.0.0/trunk/inc (copied) (copied from hatch/trunk/inc)
-
tags/1.0.0/trunk/inc/image.php (copied) (copied from hatch/trunk/inc/image.php)
-
tags/1.0.0/trunk/readme.md (copied) (copied from hatch/trunk/readme.md)
-
tags/1.0.0/trunk/readme.txt (copied) (copied from hatch/trunk/readme.txt)
-
trunk/abe-hatch.php (modified) (2 diffs)
-
trunk/inc/image.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
hatch/trunk/abe-hatch.php
r2700848 r2702672 3 3 * Plugin name: Hatch 4 4 * Author: A Big Egg 5 * Version: 1. 0.05 * Version: 1.1.0 6 6 * Description: Provides helper functions for working with Timber and ACF. Requires Timber (timber-library) and works well with Advanced Custom Fields Pro and Gravity Forms. 7 7 */ … … 20 20 public function __construct() 21 21 { 22 register_activation_hook(__FILE__, [ $this, 'activate_plugin' ]);23 24 25 22 // ensure that post objects from ACF are passed through our transformation function 26 23 add_filter('acf/format_value/type=post_object', [ $this, 'construct_post' ], 50); -
hatch/trunk/inc/image.php
r2634970 r2702672 34 34 return $img[0]; 35 35 } 36 37 /** 38 * Get the image path on the disk 39 * @param mixed $size The size of the image 40 * @return string The path to the image 41 */ 42 public function path($size = 'thumbnail') 43 { 44 return get_attached_file($this->attachment_id, $size); 45 } 46 36 47 37 48 /**
Note: See TracChangeset
for help on using the changeset viewer.