Changeset 14927
- Timestamp:
- 06/02/2026 02:49:33 AM (3 months ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
- Files:
-
- 4 added
- 1 deleted
- 2 edited
- 8 moved
-
class-plugin-geopattern.php (modified) (1 diff)
-
libs/geopattern-1.1.0/GeoPattern/SVGElements/Polyline.php (deleted)
-
libs/geopattern-1.1.2 (added)
-
libs/geopattern-1.1.2/GeoPattern (added)
-
libs/geopattern-1.1.2/GeoPattern/GeoPattern.php (moved) (moved from sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/libs/geopattern-1.1.0/GeoPattern/GeoPattern.php ) (1 diff)
-
libs/geopattern-1.1.2/GeoPattern/SVG.php (moved) (moved from sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/libs/geopattern-1.1.0/GeoPattern/SVG.php )
-
libs/geopattern-1.1.2/GeoPattern/SVGElements (added)
-
libs/geopattern-1.1.2/GeoPattern/SVGElements/Base.php (moved) (moved from sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/libs/geopattern-1.1.0/GeoPattern/SVGElements/Base.php ) (4 diffs)
-
libs/geopattern-1.1.2/GeoPattern/SVGElements/Circle.php (moved) (moved from sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/libs/geopattern-1.1.0/GeoPattern/SVGElements/Circle.php )
-
libs/geopattern-1.1.2/GeoPattern/SVGElements/Group.php (moved) (moved from sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/libs/geopattern-1.1.0/GeoPattern/SVGElements/Group.php )
-
libs/geopattern-1.1.2/GeoPattern/SVGElements/Path.php (moved) (moved from sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/libs/geopattern-1.1.0/GeoPattern/SVGElements/Path.php )
-
libs/geopattern-1.1.2/GeoPattern/SVGElements/Polyline.php (added)
-
libs/geopattern-1.1.2/GeoPattern/SVGElements/Rectangle.php (moved) (moved from sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/libs/geopattern-1.1.0/GeoPattern/SVGElements/Rectangle.php )
-
libs/geopattern-1.1.2/geopattern_loader.php (moved) (moved from sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/libs/geopattern-1.1.0/geopattern_loader.php )
-
phpcs.xml.dist (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-geopattern.php
r6287 r14927 4 4 use RedeyeVentures\GeoPattern\GeoPattern; 5 5 6 require __DIR__ . '/libs/geopattern-1.1. 0/geopattern_loader.php';6 require __DIR__ . '/libs/geopattern-1.1.2/geopattern_loader.php'; 7 7 8 8 /** -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/libs/geopattern-1.1.2/GeoPattern/GeoPattern.php
r14926 r14927 434 434 $xyT1 = 6 * $xSize / 2 - $xSize / 2; 435 435 $xyT2 = $dy - 6 * $xSize / 2; 436 $this->svg->addGroup($group, array_merge($styles, ['transform' => "translate($xyT1, $xyT2) rotate(45, $halfXSize, $halfXSize "]));436 $this->svg->addGroup($group, array_merge($styles, ['transform' => "translate($xyT1, $xyT2) rotate(45, $halfXSize, $halfXSize)"])); 437 437 } 438 438 -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/libs/geopattern-1.1.2/GeoPattern/SVGElements/Base.php
r14926 r14927 12 12 } 13 13 14 // WordPress.org: round generated floats (opacity, coordinates, transforms) to 3 decimal 15 // places. The upstream generator emits full PHP precision, e.g. fill-opacity="0.080666666666667", 16 // which is invisible once rendered but inflates every icon. See https://meta.trac.wordpress.org/ticket/8270. 17 protected function trimPrecision($value) 18 { 19 return preg_replace_callback( 20 '/-?\d*\.\d+/', 21 function ($matches) { 22 return rtrim(rtrim(number_format((float) $matches[0], 3, '.', ''), '0'), '.'); 23 }, 24 (string) $value 25 ); 26 } 27 14 28 public function elementsToString() 15 29 { … … 17 31 foreach ($this->elements as $key => $value) 18 32 { 19 $string .= "$key=\" $value\" ";33 $string .= "$key=\"".$this->trimPrecision($value)."\" "; 20 34 } 21 35 return $string; … … 32 46 foreach ($value as $k => $v) 33 47 { 34 $string .= "$k: $v;";48 $string .= "$k:".$this->trimPrecision($v).";"; 35 49 } 36 50 $string .= '" '; … … 38 52 else 39 53 { 40 $string .= "$key=\" $value\" ";54 $string .= "$key=\"".$this->trimPrecision($value)."\" "; 41 55 } 42 56 } -
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/phpcs.xml.dist
r8336 r14927 4 4 5 5 <!-- Exclude external libraries --> 6 <exclude-pattern>/libs/geopattern-1.1. 0/*</exclude-pattern>6 <exclude-pattern>/libs/geopattern-1.1.2/*</exclude-pattern> 7 7 <exclude-pattern>/libs/michelf-php-markdown-1.6.0/*</exclude-pattern> 8 8
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)