Changeset 1995174
- Timestamp:
- 12/14/2018 09:31:52 PM (7 years ago)
- Location:
- waj-image
- Files:
-
- 218 added
- 12 edited
-
tags/1.3.0 (added)
-
tags/1.3.0/2018 (added)
-
tags/1.3.0/2018/12 (added)
-
tags/1.3.0/2018/12/demo.png (added)
-
tags/1.3.0/2018/12/photo-1024x1024.jpg (added)
-
tags/1.3.0/2018/12/photo-1200x800.jpg (added)
-
tags/1.3.0/2018/12/photo-150x150.jpg (added)
-
tags/1.3.0/2018/12/photo-300x300.jpg (added)
-
tags/1.3.0/2018/12/photo-320x240.jpg (added)
-
tags/1.3.0/2018/12/photo-768x768.jpg (added)
-
tags/1.3.0/2018/12/photo-800x400.jpg (added)
-
tags/1.3.0/2018/12/photo.jpg (added)
-
tags/1.3.0/LICENSE (added)
-
tags/1.3.0/README.md (added)
-
tags/1.3.0/composer.json (added)
-
tags/1.3.0/favicon.png (added)
-
tags/1.3.0/img (added)
-
tags/1.3.0/img/photo-1200x800.jpg (added)
-
tags/1.3.0/img/photo-2x.jpg (added)
-
tags/1.3.0/img/photo-320x240.jpg (added)
-
tags/1.3.0/img/photo-800x400.jpg (added)
-
tags/1.3.0/img/photo.jpg (added)
-
tags/1.3.0/phpunit.xml (added)
-
tags/1.3.0/readme.txt (added)
-
tags/1.3.0/src (added)
-
tags/1.3.0/src/WPThemeImage.php (added)
-
tags/1.3.0/src/WPThemePicture.php (added)
-
tags/1.3.0/src/WPUploadImage.php (added)
-
tags/1.3.0/src/WPUploadPicture.php (added)
-
tags/1.3.0/tests (added)
-
tags/1.3.0/tests/MockWordPress.php (added)
-
tags/1.3.0/tests/ShortcodeTest.php (added)
-
tags/1.3.0/tests/WPThemeImageTest.php (added)
-
tags/1.3.0/tests/WPThemePictureTest.php (added)
-
tags/1.3.0/tests/WPUploadImageTest.php (added)
-
tags/1.3.0/tests/WPUploadsPictureTest.php (added)
-
tags/1.3.0/vendor (added)
-
tags/1.3.0/vendor/autoload.php (added)
-
tags/1.3.0/vendor/composer (added)
-
tags/1.3.0/vendor/composer/ClassLoader.php (added)
-
tags/1.3.0/vendor/composer/LICENSE (added)
-
tags/1.3.0/vendor/composer/autoload_classmap.php (added)
-
tags/1.3.0/vendor/composer/autoload_files.php (added)
-
tags/1.3.0/vendor/composer/autoload_namespaces.php (added)
-
tags/1.3.0/vendor/composer/autoload_psr4.php (added)
-
tags/1.3.0/vendor/composer/autoload_real.php (added)
-
tags/1.3.0/vendor/composer/autoload_static.php (added)
-
tags/1.3.0/vendor/composer/installed.json (added)
-
tags/1.3.0/vendor/psr (added)
-
tags/1.3.0/vendor/psr/http-message (added)
-
tags/1.3.0/vendor/psr/http-message/CHANGELOG.md (added)
-
tags/1.3.0/vendor/psr/http-message/LICENSE (added)
-
tags/1.3.0/vendor/psr/http-message/README.md (added)
-
tags/1.3.0/vendor/psr/http-message/composer.json (added)
-
tags/1.3.0/vendor/psr/http-message/src (added)
-
tags/1.3.0/vendor/psr/http-message/src/MessageInterface.php (added)
-
tags/1.3.0/vendor/psr/http-message/src/RequestInterface.php (added)
-
tags/1.3.0/vendor/psr/http-message/src/ResponseInterface.php (added)
-
tags/1.3.0/vendor/psr/http-message/src/ServerRequestInterface.php (added)
-
tags/1.3.0/vendor/psr/http-message/src/StreamInterface.php (added)
-
tags/1.3.0/vendor/psr/http-message/src/UploadedFileInterface.php (added)
-
tags/1.3.0/vendor/psr/http-message/src/UriInterface.php (added)
-
tags/1.3.0/vendor/spatie (added)
-
tags/1.3.0/vendor/spatie/macroable (added)
-
tags/1.3.0/vendor/spatie/macroable/.styleci.yml (added)
-
tags/1.3.0/vendor/spatie/macroable/CHANGELOG.md (added)
-
tags/1.3.0/vendor/spatie/macroable/CONTRIBUTING.md (added)
-
tags/1.3.0/vendor/spatie/macroable/LICENSE.md (added)
-
tags/1.3.0/vendor/spatie/macroable/README.md (added)
-
tags/1.3.0/vendor/spatie/macroable/composer.json (added)
-
tags/1.3.0/vendor/spatie/macroable/config (added)
-
tags/1.3.0/vendor/spatie/macroable/config/.gitkeep (added)
-
tags/1.3.0/vendor/spatie/macroable/src (added)
-
tags/1.3.0/vendor/spatie/macroable/src/Macroable.php (added)
-
tags/1.3.0/vendor/spatie/url (added)
-
tags/1.3.0/vendor/spatie/url/.editorconfig (added)
-
tags/1.3.0/vendor/spatie/url/.styleci.yml (added)
-
tags/1.3.0/vendor/spatie/url/CHANGELOG.md (added)
-
tags/1.3.0/vendor/spatie/url/CONTRIBUTING.md (added)
-
tags/1.3.0/vendor/spatie/url/LICENSE.md (added)
-
tags/1.3.0/vendor/spatie/url/README.md (added)
-
tags/1.3.0/vendor/spatie/url/composer.json (added)
-
tags/1.3.0/vendor/spatie/url/src (added)
-
tags/1.3.0/vendor/spatie/url/src/Exceptions (added)
-
tags/1.3.0/vendor/spatie/url/src/Exceptions/InvalidArgument.php (added)
-
tags/1.3.0/vendor/spatie/url/src/Helpers (added)
-
tags/1.3.0/vendor/spatie/url/src/Helpers/Arr.php (added)
-
tags/1.3.0/vendor/spatie/url/src/QueryParameterBag.php (added)
-
tags/1.3.0/vendor/spatie/url/src/Url.php (added)
-
tags/1.3.0/vendor/waughj (added)
-
tags/1.3.0/vendor/waughj/directory (added)
-
tags/1.3.0/vendor/waughj/directory/.gitignore (added)
-
tags/1.3.0/vendor/waughj/directory/LICENSE (added)
-
tags/1.3.0/vendor/waughj/directory/README.md (added)
-
tags/1.3.0/vendor/waughj/directory/composer.json (added)
-
tags/1.3.0/vendor/waughj/directory/phpunit.xml (added)
-
tags/1.3.0/vendor/waughj/directory/src (added)
-
tags/1.3.0/vendor/waughj/directory/src/Directory.php (added)
-
tags/1.3.0/vendor/waughj/directory/tests (added)
-
tags/1.3.0/vendor/waughj/directory/tests/DirectoryTest.php (added)
-
tags/1.3.0/vendor/waughj/file-loader (added)
-
tags/1.3.0/vendor/waughj/file-loader/.gitignore (added)
-
tags/1.3.0/vendor/waughj/file-loader/LICENSE (added)
-
tags/1.3.0/vendor/waughj/file-loader/README.md (added)
-
tags/1.3.0/vendor/waughj/file-loader/composer.json (added)
-
tags/1.3.0/vendor/waughj/file-loader/phpunit.xml (added)
-
tags/1.3.0/vendor/waughj/file-loader/src (added)
-
tags/1.3.0/vendor/waughj/file-loader/src/FileLoader.php (added)
-
tags/1.3.0/vendor/waughj/file-loader/tests (added)
-
tags/1.3.0/vendor/waughj/file-loader/tests/FileLoaderTest.php (added)
-
tags/1.3.0/vendor/waughj/html-attribute (added)
-
tags/1.3.0/vendor/waughj/html-attribute-list (added)
-
tags/1.3.0/vendor/waughj/html-attribute-list/.gitignore (added)
-
tags/1.3.0/vendor/waughj/html-attribute-list/LICENSE (added)
-
tags/1.3.0/vendor/waughj/html-attribute-list/README.md (added)
-
tags/1.3.0/vendor/waughj/html-attribute-list/composer.json (added)
-
tags/1.3.0/vendor/waughj/html-attribute-list/phpunit.xml (added)
-
tags/1.3.0/vendor/waughj/html-attribute-list/src (added)
-
tags/1.3.0/vendor/waughj/html-attribute-list/src/HTMLAttributeList.php (added)
-
tags/1.3.0/vendor/waughj/html-attribute-list/tests (added)
-
tags/1.3.0/vendor/waughj/html-attribute-list/tests/HTMLAttributeListTest.php (added)
-
tags/1.3.0/vendor/waughj/html-attribute/.gitignore (added)
-
tags/1.3.0/vendor/waughj/html-attribute/LICENSE (added)
-
tags/1.3.0/vendor/waughj/html-attribute/README.md (added)
-
tags/1.3.0/vendor/waughj/html-attribute/composer.json (added)
-
tags/1.3.0/vendor/waughj/html-attribute/phpunit.xml (added)
-
tags/1.3.0/vendor/waughj/html-attribute/src (added)
-
tags/1.3.0/vendor/waughj/html-attribute/src/HTMLAttribute.php (added)
-
tags/1.3.0/vendor/waughj/html-attribute/tests (added)
-
tags/1.3.0/vendor/waughj/html-attribute/tests/HTMLAttributeTest.php (added)
-
tags/1.3.0/vendor/waughj/html-image (added)
-
tags/1.3.0/vendor/waughj/html-image/.gitignore (added)
-
tags/1.3.0/vendor/waughj/html-image/LICENSE (added)
-
tags/1.3.0/vendor/waughj/html-image/README.md (added)
-
tags/1.3.0/vendor/waughj/html-image/composer.json (added)
-
tags/1.3.0/vendor/waughj/html-image/phpunit.xml (added)
-
tags/1.3.0/vendor/waughj/html-image/src (added)
-
tags/1.3.0/vendor/waughj/html-image/src/HTMLImage.php (added)
-
tags/1.3.0/vendor/waughj/html-image/tests (added)
-
tags/1.3.0/vendor/waughj/html-image/tests/HTMLImageTest.php (added)
-
tags/1.3.0/vendor/waughj/html-image/tests/demo.png (added)
-
tags/1.3.0/vendor/waughj/html-picture (added)
-
tags/1.3.0/vendor/waughj/html-picture/.gitignore (added)
-
tags/1.3.0/vendor/waughj/html-picture/LICENSE (added)
-
tags/1.3.0/vendor/waughj/html-picture/README.md (added)
-
tags/1.3.0/vendor/waughj/html-picture/composer.json (added)
-
tags/1.3.0/vendor/waughj/html-picture/phpunit.xml (added)
-
tags/1.3.0/vendor/waughj/html-picture/src (added)
-
tags/1.3.0/vendor/waughj/html-picture/src/HTMLPicture.php (added)
-
tags/1.3.0/vendor/waughj/html-picture/src/PictureSize.php (added)
-
tags/1.3.0/vendor/waughj/html-picture/src/PictureSizeList.php (added)
-
tags/1.3.0/vendor/waughj/html-picture/tests (added)
-
tags/1.3.0/vendor/waughj/html-picture/tests/HTMLPictureTest.php (added)
-
tags/1.3.0/vendor/waughj/html-picture/tests/photo-1200x800.jpg (added)
-
tags/1.3.0/vendor/waughj/html-picture/tests/photo-480x320.jpg (added)
-
tags/1.3.0/vendor/waughj/html-picture/tests/photo-800x600.jpg (added)
-
tags/1.3.0/vendor/waughj/html-picture/tests/photo.jpg (added)
-
tags/1.3.0/vendor/waughj/test-hash-item (added)
-
tags/1.3.0/vendor/waughj/test-hash-item/.gitignore (added)
-
tags/1.3.0/vendor/waughj/test-hash-item/LICENSE (added)
-
tags/1.3.0/vendor/waughj/test-hash-item/README.md (added)
-
tags/1.3.0/vendor/waughj/test-hash-item/composer.json (added)
-
tags/1.3.0/vendor/waughj/test-hash-item/phpunit.xml (added)
-
tags/1.3.0/vendor/waughj/test-hash-item/src (added)
-
tags/1.3.0/vendor/waughj/test-hash-item/src/TestHashItem.php (added)
-
tags/1.3.0/vendor/waughj/test-hash-item/tests (added)
-
tags/1.3.0/vendor/waughj/test-hash-item/tests/TestHashItemTest.php (added)
-
tags/1.3.0/vendor/waughj/verified-arguments (added)
-
tags/1.3.0/vendor/waughj/verified-arguments-same-type (added)
-
tags/1.3.0/vendor/waughj/verified-arguments-same-type/.gitignore (added)
-
tags/1.3.0/vendor/waughj/verified-arguments-same-type/LICENSE (added)
-
tags/1.3.0/vendor/waughj/verified-arguments-same-type/README.md (added)
-
tags/1.3.0/vendor/waughj/verified-arguments-same-type/composer.json (added)
-
tags/1.3.0/vendor/waughj/verified-arguments-same-type/phpunit.xml (added)
-
tags/1.3.0/vendor/waughj/verified-arguments-same-type/src (added)
-
tags/1.3.0/vendor/waughj/verified-arguments-same-type/src/VerifiedArgumentsSameType.php (added)
-
tags/1.3.0/vendor/waughj/verified-arguments-same-type/tests (added)
-
tags/1.3.0/vendor/waughj/verified-arguments-same-type/tests/VerifiedArgumentsSameTypeTest.php (added)
-
tags/1.3.0/vendor/waughj/verified-arguments/.gitignore (added)
-
tags/1.3.0/vendor/waughj/verified-arguments/LICENSE (added)
-
tags/1.3.0/vendor/waughj/verified-arguments/README.md (added)
-
tags/1.3.0/vendor/waughj/verified-arguments/composer.json (added)
-
tags/1.3.0/vendor/waughj/verified-arguments/phpunit.xml (added)
-
tags/1.3.0/vendor/waughj/verified-arguments/src (added)
-
tags/1.3.0/vendor/waughj/verified-arguments/src/VerifiedArguments.php (added)
-
tags/1.3.0/vendor/waughj/verified-arguments/tests (added)
-
tags/1.3.0/vendor/waughj/verified-arguments/tests/VerifiedArgumentsTest.php (added)
-
tags/1.3.0/vendor/waughj/wp-get-image-sizes (added)
-
tags/1.3.0/vendor/waughj/wp-get-image-sizes/.gitignore (added)
-
tags/1.3.0/vendor/waughj/wp-get-image-sizes/LICENSE (added)
-
tags/1.3.0/vendor/waughj/wp-get-image-sizes/README.md (added)
-
tags/1.3.0/vendor/waughj/wp-get-image-sizes/composer.json (added)
-
tags/1.3.0/vendor/waughj/wp-get-image-sizes/phpunit.xml (added)
-
tags/1.3.0/vendor/waughj/wp-get-image-sizes/src (added)
-
tags/1.3.0/vendor/waughj/wp-get-image-sizes/src/WPGetImageSizes.php (added)
-
tags/1.3.0/vendor/waughj/wp-get-image-sizes/src/WPImageSize.php (added)
-
tags/1.3.0/vendor/waughj/wp-get-image-sizes/tests (added)
-
tags/1.3.0/vendor/waughj/wp-get-image-sizes/tests/MockWordPress.php (added)
-
tags/1.3.0/vendor/waughj/wp-get-image-sizes/tests/WPGetImageSizesTest.php (added)
-
tags/1.3.0/vendor/waughj/wp-theme-option (added)
-
tags/1.3.0/vendor/waughj/wp-theme-option/.gitignore (added)
-
tags/1.3.0/vendor/waughj/wp-theme-option/LICENSE (added)
-
tags/1.3.0/vendor/waughj/wp-theme-option/README.md (added)
-
tags/1.3.0/vendor/waughj/wp-theme-option/composer.json (added)
-
tags/1.3.0/vendor/waughj/wp-theme-option/phpunit.xml (added)
-
tags/1.3.0/vendor/waughj/wp-theme-option/src (added)
-
tags/1.3.0/vendor/waughj/wp-theme-option/src/ComposerTemplate.php (added)
-
tags/1.3.0/vendor/waughj/wp-theme-option/src/WPThemeOption.php (added)
-
tags/1.3.0/vendor/waughj/wp-theme-option/src/WPThemeOptionsPage.php (added)
-
tags/1.3.0/vendor/waughj/wp-theme-option/src/WPThemeOptionsPageManager.php (added)
-
tags/1.3.0/vendor/waughj/wp-theme-option/src/WPThemeOptionsSection.php (added)
-
tags/1.3.0/vendor/waughj/wp-theme-option/tests (added)
-
tags/1.3.0/vendor/waughj/wp-theme-option/tests/MockWordPress.php (added)
-
tags/1.3.0/vendor/waughj/wp-theme-option/tests/WPThemeOptionTest.php (added)
-
tags/1.3.0/vendor/waughj/wp-theme-option/tests/WPThemeOptionsPageManagerTest.php (added)
-
tags/1.3.0/vendor/waughj/wp-theme-option/tests/WPThemeOptionsPageTest.php (added)
-
tags/1.3.0/vendor/waughj/wp-theme-option/tests/WPThemeOptionsSectionTest.php (added)
-
tags/1.3.0/waj-image-loaders.php (added)
-
trunk/README.md (modified) (3 diffs)
-
trunk/composer.json (modified) (1 diff)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/tests/MockWordPress.php (modified) (1 diff)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_psr4.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_real.php (modified) (5 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (4 diffs)
-
trunk/vendor/composer/installed.json (modified) (3 diffs)
-
trunk/vendor/waughj/file-loader/src/FileLoader.php (modified) (3 diffs)
-
trunk/vendor/waughj/file-loader/tests/FileLoaderTest.php (modified) (1 diff)
-
trunk/waj-image-loaders.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
waj-image/trunk/README.md
r1987319 r1995174 2 2 * Contributors: waughjai 3 3 * Tags: image, loader, html generator 4 * Requires at least: 4.9.85 * Tested up to: 4.9.86 * Stable tag: 1. 2.04 * Requires at least: 5.0.0 5 * Tested up to: 5.0.1 6 * Stable tag: 1.3.0 7 7 * Requires PHP: 7.0 8 8 * License: GPLv2 or later … … 50 50 If "alt" attribute is not set, an empty 1 will automatically be added to the HTML generated, ensuring that all images made through these will have an alt tag. 51 51 52 To make working with theme image objects with minimal inconvenience for images that are all in the same directory that is not the topmost directory o' the theme directory, you can globally set the inner shared directory usingWPThemeImage's static setDefaultSharedDirectory method on the class itself. After that, all initialized WPThemeImage & WPThemePicture instances, including the shortcodes, will automatically use that shared directory if a different 1 isn't provided.52 To make working with theme image objects with minimal inconvenience for images that are all in the same directory that is not the topmost directory o' the theme directory, you can globally set the inner shared directory in the WordPress admin through Appearances -> Theme -> Directories, or directly in PHP with WPThemeImage's static setDefaultSharedDirectory method on the class itself. After that, all initialized WPThemeImage & WPThemePicture instances, including the shortcodes, will automatically use that shared directory if a different 1 isn't provided. 53 53 54 54 To add HTML attributes to WPThemePicture & WPUploadsPicture shortcodes, prefix them with "img-", "picture-", or "source-" depending on what tag you want the attribute given to. For example, to apply a class to the img tag, give the shortcode the attribute "img-class". … … 93 93 ## Changelog 94 94 95 ### 1.3 96 * Add directory bar to admin. 97 95 98 ### 1.2 96 99 * Add ability to just get source from images. -
waj-image/trunk/composer.json
r1987319 r1995174 14 14 "php": ">=7.0", 15 15 "waughj/file-loader": ">=0.2.0", 16 "waughj/html-image": ">=0. 4.0",16 "waughj/html-image": ">=0.3.0", 17 17 "waughj/html-picture": "*", 18 18 "waughj/test-hash-item": "*", 19 "waughj/wp-get-image-sizes": "*" 19 "waughj/wp-get-image-sizes": "*", 20 "waughj/wp-theme-option": "0.3.0" 20 21 }, 21 22 "require-dev": { -
waj-image/trunk/readme.txt
r1987319 r1995174 2 2 Contributors: waughjai 3 3 Tags: image, loader, html generator 4 Requires at least: 4.9.85 Tested up to: 4.9.86 Stable tag: 1. 2.04 Requires at least: 5.0.0 5 Tested up to: 5.0.1 6 Stable tag: 1.3.0 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 50 50 If "alt" attribute is not set, an empty 1 will automatically be added to the HTML generated, ensuring that all images made through these will have an alt tag. 51 51 52 To make working with theme image objects with minimal inconvenience for images that are all in the same directory that is not the topmost directory o' the theme directory, you can globally set the inner shared directory usingWPThemeImage's static setDefaultSharedDirectory method on the class itself. After that, all initialized WPThemeImage & WPThemePicture instances, including the shortcodes, will automatically use that shared directory if a different 1 isn't provided.52 To make working with theme image objects with minimal inconvenience for images that are all in the same directory that is not the topmost directory o' the theme directory, you can globally set the inner shared directory in the WordPress admin through Appearances -> Theme -> Directories, or directly in PHP with WPThemeImage's static setDefaultSharedDirectory method on the class itself. After that, all initialized WPThemeImage & WPThemePicture instances, including the shortcodes, will automatically use that shared directory if a different 1 isn't provided. 53 53 54 54 To add HTML attributes to WPThemePicture & WPUploadsPicture shortcodes, prefix them with "img-", "picture-", or "source-" depending on what tag you want the attribute given to. For example, to apply a class to the img tag, give the shortcode the attribute "img-class". … … 93 93 == Changelog == 94 94 95 = 1.3 = 96 * Add directory bar to admin. 97 95 98 = 1.2 = 96 99 * Add ability to just get source from images. -
waj-image/trunk/tests/MockWordPress.php
r1987123 r1995174 83 83 return null; 84 84 } 85 86 global $settings_fields; 87 $settings_fields = []; 88 89 function __( $name ) 90 { 91 return $name; 92 } 93 94 function add_action( $hook, $function ) 95 { 96 $function(); 97 } 98 99 function add_settings_field( $slug, $name, $renderer, $group ) 100 { 101 global $settings_fields; 102 if ( !isset( $settings_fields[ $group ] ) ) 103 { 104 $settings_fields[ $group ] = []; 105 } 106 $settings_fields[ $group ][] = $renderer; 107 }; 108 109 function do_settings_sections( $group ) 110 { 111 global $settings_fields; 112 if ( isset( $settings_fields[ $group ] ) ) 113 { 114 foreach ( $settings_fields[ $group ] as $renderer ) 115 { 116 echo $renderer(); 117 } 118 } 119 }; 120 121 function add_theme_page() {}; 122 function add_option() {}; 123 function register_setting() {}; 124 function add_settings_section() {}; 125 function settings_errors() {}; 126 function settings_fields() {}; 127 function submit_button() { echo '<input type="submit" name="submit" id="submit" class="button button-primary" value="Save Changes">'; }; -
waj-image/trunk/vendor/autoload.php
r1987123 r1995174 5 5 require_once __DIR__ . '/composer/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit 285755ba0587b518d8728f77f33b073b::getLoader();7 return ComposerAutoloaderInite59dc2f8def671ec8f56cadb899ebf75::getLoader(); -
waj-image/trunk/vendor/composer/autoload_psr4.php
r1983500 r1995174 7 7 8 8 return array( 9 'WaughJ\\WPThemeOption\\' => array($vendorDir . '/waughj/wp-theme-option/src'), 9 10 'WaughJ\\WPImage\\' => array($baseDir . '/src'), 10 11 'WaughJ\\VerifiedArguments\\' => array($vendorDir . '/waughj/verified-arguments/src'), -
waj-image/trunk/vendor/composer/autoload_real.php
r1987123 r1995174 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 285755ba0587b518d8728f77f33b073b5 class ComposerAutoloaderInite59dc2f8def671ec8f56cadb899ebf75 6 6 { 7 7 private static $loader; … … 20 20 } 21 21 22 spl_autoload_register(array('ComposerAutoloaderInit 285755ba0587b518d8728f77f33b073b', 'loadClassLoader'), true, true);22 spl_autoload_register(array('ComposerAutoloaderInite59dc2f8def671ec8f56cadb899ebf75', 'loadClassLoader'), true, true); 23 23 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); 24 spl_autoload_unregister(array('ComposerAutoloaderInit 285755ba0587b518d8728f77f33b073b', 'loadClassLoader'));24 spl_autoload_unregister(array('ComposerAutoloaderInite59dc2f8def671ec8f56cadb899ebf75', 'loadClassLoader')); 25 25 26 26 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); … … 28 28 require_once __DIR__ . '/autoload_static.php'; 29 29 30 call_user_func(\Composer\Autoload\ComposerStaticInit 285755ba0587b518d8728f77f33b073b::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInite59dc2f8def671ec8f56cadb899ebf75::getInitializer($loader)); 31 31 } else { 32 32 $map = require __DIR__ . '/autoload_namespaces.php'; … … 49 49 50 50 if ($useStaticLoader) { 51 $includeFiles = Composer\Autoload\ComposerStaticInit 285755ba0587b518d8728f77f33b073b::$files;51 $includeFiles = Composer\Autoload\ComposerStaticInite59dc2f8def671ec8f56cadb899ebf75::$files; 52 52 } else { 53 53 $includeFiles = require __DIR__ . '/autoload_files.php'; 54 54 } 55 55 foreach ($includeFiles as $fileIdentifier => $file) { 56 composerRequire 285755ba0587b518d8728f77f33b073b($fileIdentifier, $file);56 composerRequiree59dc2f8def671ec8f56cadb899ebf75($fileIdentifier, $file); 57 57 } 58 58 … … 61 61 } 62 62 63 function composerRequire 285755ba0587b518d8728f77f33b073b($fileIdentifier, $file)63 function composerRequiree59dc2f8def671ec8f56cadb899ebf75($fileIdentifier, $file) 64 64 { 65 65 if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { -
waj-image/trunk/vendor/composer/autoload_static.php
r1987123 r1995174 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 285755ba0587b518d8728f77f33b073b7 class ComposerStaticInite59dc2f8def671ec8f56cadb899ebf75 8 8 { 9 9 public static $files = array ( … … 16 16 'W' => 17 17 array ( 18 'WaughJ\\WPThemeOption\\' => 21, 18 19 'WaughJ\\WPImage\\' => 15, 19 20 'WaughJ\\VerifiedArguments\\' => 25, … … 38 39 39 40 public static $prefixDirsPsr4 = array ( 41 'WaughJ\\WPThemeOption\\' => 42 array ( 43 0 => __DIR__ . '/..' . '/waughj/wp-theme-option/src', 44 ), 40 45 'WaughJ\\WPImage\\' => 41 46 array ( … … 91 96 { 92 97 return \Closure::bind(function () use ($loader) { 93 $loader->prefixLengthsPsr4 = ComposerStaticInit 285755ba0587b518d8728f77f33b073b::$prefixLengthsPsr4;94 $loader->prefixDirsPsr4 = ComposerStaticInit 285755ba0587b518d8728f77f33b073b::$prefixDirsPsr4;98 $loader->prefixLengthsPsr4 = ComposerStaticInite59dc2f8def671ec8f56cadb899ebf75::$prefixLengthsPsr4; 99 $loader->prefixDirsPsr4 = ComposerStaticInite59dc2f8def671ec8f56cadb899ebf75::$prefixDirsPsr4; 95 100 96 101 }, null, ClassLoader::class); -
waj-image/trunk/vendor/composer/installed.json
r1987319 r1995174 198 198 { 199 199 "name": "waughj/file-loader", 200 "version": "0.4. 0",201 "version_normalized": "0.4. 0.0",200 "version": "0.4.2", 201 "version_normalized": "0.4.2.0", 202 202 "source": { 203 203 "type": "git", 204 204 "url": "https://github.com/waughjai/file-loader.git", 205 "reference": " 3532fee29005c127dc8c1e9f0ef9228c4898bc7d"206 }, 207 "dist": { 208 "type": "zip", 209 "url": "https://api.github.com/repos/waughjai/file-loader/zipball/ 3532fee29005c127dc8c1e9f0ef9228c4898bc7d",210 "reference": " 3532fee29005c127dc8c1e9f0ef9228c4898bc7d",205 "reference": "5ed773b2e739a6e07bbabc3d85f0f86015861b5f" 206 }, 207 "dist": { 208 "type": "zip", 209 "url": "https://api.github.com/repos/waughjai/file-loader/zipball/5ed773b2e739a6e07bbabc3d85f0f86015861b5f", 210 "reference": "5ed773b2e739a6e07bbabc3d85f0f86015861b5f", 211 211 "shasum": "" 212 212 }, … … 221 221 "phpunit/phpunit": "6.*" 222 222 }, 223 "time": "2018-12- 04T20:15:24+00:00",223 "time": "2018-12-12T20:32:53+00:00", 224 224 "type": "library", 225 225 "installation-source": "dist", … … 622 622 "wordpress" 623 623 ] 624 }, 625 { 626 "name": "waughj/wp-theme-option", 627 "version": "0.3.0", 628 "version_normalized": "0.3.0.0", 629 "source": { 630 "type": "git", 631 "url": "https://github.com/waughjai/wp-theme-option.git", 632 "reference": "112d170fe6abdf207c9f81f3f3e57ee6e473388c" 633 }, 634 "dist": { 635 "type": "zip", 636 "url": "https://api.github.com/repos/waughjai/wp-theme-option/zipball/112d170fe6abdf207c9f81f3f3e57ee6e473388c", 637 "reference": "112d170fe6abdf207c9f81f3f3e57ee6e473388c", 638 "shasum": "" 639 }, 640 "require": { 641 "php": ">=7.0", 642 "waughj/test-hash-item": ">=1.0.1", 643 "waughj/verified-arguments-same-type": "*" 644 }, 645 "require-dev": { 646 "phpunit/phpunit": "6.*" 647 }, 648 "time": "2018-12-14T00:46:52+00:00", 649 "type": "library", 650 "installation-source": "dist", 651 "autoload": { 652 "psr-4": { 653 "WaughJ\\WPThemeOption\\": "src/" 654 } 655 }, 656 "notification-url": "https://packagist.org/downloads/", 657 "license": [ 658 "GPL-2.0-or-later" 659 ], 660 "authors": [ 661 { 662 "name": "Jaimeson Waugh", 663 "email": "waughjai@gmail.com" 664 } 665 ], 666 "description": "Classes for simplifying the creation of theme options, option sections, & option pages.", 667 "keywords": [ 668 "generator", 669 "option", 670 "theme", 671 "wordpress" 672 ] 624 673 } 625 674 ] -
waj-image/trunk/vendor/waughj/file-loader/src/FileLoader.php
r1987123 r1995174 43 43 public function getSourceWithVersion( string $local ) : string 44 44 { 45 return $this->getSource( $local ) . $this->getVersionString( $local ); 45 $version_string = ''; 46 $source = $this->getSource( $local ); 47 try 48 { 49 $version_string = $this->getVersionString( $local ); 50 } 51 catch ( \Exception $e ) 52 { 53 echo( "Error: could not find modified time for file \"{$source}\"" ); 54 } 55 56 return $source . $version_string; 46 57 } 47 58 … … 104 115 { 105 116 $server_location = $this->getServerLocation( $local ); 106 return filemtime( $server_location->getString([ 'ending-slash' => false ]) ); 117 $filetime = filemtime( $server_location->getString([ 'ending-slash' => false ]) ); 118 return ( $filetime !== false ) ? $filetime : 0; 107 119 } 108 120 return 0; … … 121 133 { 122 134 $server_location = $this->getServerLocation( $local ); 123 return '?m=' . ( string )( $this->getVersion( $local ) ); 135 $version = $this->getVersion( $local ); 136 return '?m=' . ( string )( ( $version > 0 ) ? $version : '' ); 124 137 } 125 138 return ''; -
waj-image/trunk/vendor/waughj/file-loader/tests/FileLoaderTest.php
r1987123 r1995174 29 29 $loader4 = new FileLoader([ 'directory-url' => null ]); 30 30 $this->assertEquals( $loader4->getSource( 'logo.png' ), 'logo.png' ); 31 } 32 33 public function testNonexistentFile() 34 { 35 $loader = new FileLoader([ 'directory-url' => 'https://www.jaimeson-waugh.com/', 'directory-server' => getcwd() ]); 36 $this->assertEquals( 'https://www.jaimeson-waugh.com/bleb', $loader->getSourceWithVersion( 'bleb' ) ); 31 37 } 32 38 -
waj-image/trunk/waj-image-loaders.php
r1987324 r1995174 4 4 Plugin URI: https://github.com/waughjai/waj-image-loaders 5 5 Description: Classes & shortcodes for making image HTML generation simpler for WordPress. 6 Version: 1. 2.06 Version: 1.3.0 7 7 Author: Jaimeson Waugh 8 8 Author URI: https://www.jaimeson-waugh.com … … 24 24 use WaughJ\HTMLPicture\HTMLPicture; 25 25 use function WaughJ\TestHashItem\TestHashItemString; 26 use WaughJ\WPThemeOption\WPThemeOptionsPageManager; 27 use WaughJ\WPThemeOption\WPThemeOptionsSection; 28 use WaughJ\WPThemeOption\WPThemeOption; 26 29 27 add_shortcode28 (29 'theme-image',30 ImageShortcodeFunctionGenerator( WPThemeImage::class )31 );32 30 33 add_shortcode 34 ( 35 'upload-image', 36 function ( $atts ) 31 32 // 33 // ADMIN THEME IMAGE DIRECTORY 34 // 35 ////////////////////////////////////////////////////////// 36 37 $page = WPThemeOptionsPageManager::initializeIfNotAlreadyInitialized( 'directories', 'Directories' ); 38 $section = new WPThemeOptionsSection( $page, 'theme-image', 'Theme Image' ); 39 $option = new WPThemeOption( $section, 'theme-image-directory', 'Theme Image Directory' ); 40 WPThemeImage::setDefaultSharedDirectory( $option->getOptionValue() ); 41 42 43 44 // 45 // SHORTCODES 46 // 47 ////////////////////////////////////////////////////////// 48 49 add_shortcode 50 ( 51 'theme-image', 52 ImageShortcodeFunctionGenerator( WPThemeImage::class ) 53 ); 54 55 add_shortcode 56 ( 57 'upload-image', 58 function ( $atts ) 59 { 60 $id = TestHashItemString( $atts, 'id' ); 61 $size = TestHashItemString( $atts, 'size' ); 62 if ( $id ) 63 { 64 // Make sure we don't propagate this to the HTML Attributes list. 65 unset( $atts[ 'id' ], $atts[ 'size' ] ); 66 return ( string )( new WPUploadImage( intval( $id ), $size, $atts ) ); 67 } 68 return ''; 69 } 70 ); 71 72 add_shortcode 73 ( 74 'image', 75 function ( $atts ) 76 { 77 $src = TestHashItemString( $atts, 'src' ); 78 if ( $src ) 79 { 80 // Make sure we don't propagate this to the HTML Attributes list. 81 unset( $atts[ 'src' ] ); 82 return ( string )( new HTMLImage( $src, null, $atts ) ); 83 } 84 return ''; 85 } 86 ); 87 88 add_shortcode 89 ( 90 'theme-picture', 91 PictureShortcodeFunctionGenerator( WPThemePicture::class ) 92 ); 93 94 add_shortcode 95 ( 96 'upload-picture', 97 function ( $atts ) 98 { 99 $id = TestHashItemString( $atts, 'id' ); 100 if ( $id ) 101 { 102 $atts = TransformShortcodeAttributesToElementAttributes( $atts ); 103 // Make sure we don't propagate these to the HTML Attributes list. 104 unset( $atts[ 'id' ] ); 105 return ( string )( new WPUploadPicture( intval( $id ), $atts ) ); 106 } 107 return ''; 108 } 109 ); 110 111 add_shortcode 112 ( 113 'picture', 114 PictureShortcodeFunctionGenerator( HTMLPicture::class ) 115 ); 116 117 function ImageShortcodeFunctionGenerator( string $class ) 37 118 { 38 $id = TestHashItemString( $atts, 'id' ); 39 $size = TestHashItemString( $atts, 'size' ); 40 if ( $id ) 119 return function ( $atts ) use ( $class ) 41 120 { 42 // Make sure we don't propagate this to the HTML Attributes list. 43 unset( $atts[ 'id' ], $atts[ 'size' ] ); 44 return ( string )( new WPUploadImage( intval( $id ), $size, $atts ) ); 45 } 46 return ''; 47 } 48 ); 49 50 add_shortcode 51 ( 52 'image', 53 function ( $atts ) 54 { 55 $src = TestHashItemString( $atts, 'src' ); 56 if ( $src ) 57 { 58 // Make sure we don't propagate this to the HTML Attributes list. 59 unset( $atts[ 'src' ] ); 60 return ( string )( new HTMLImage( $src, null, $atts ) ); 61 } 62 return ''; 63 } 64 ); 65 66 add_shortcode 67 ( 68 'theme-picture', 69 PictureShortcodeFunctionGenerator( WPThemePicture::class ) 70 ); 71 72 add_shortcode 73 ( 74 'upload-picture', 75 function ( $atts ) 76 { 77 $id = TestHashItemString( $atts, 'id' ); 78 if ( $id ) 79 { 80 $atts = TransformShortcodeAttributesToElementAttributes( $atts ); 81 // Make sure we don't propagate these to the HTML Attributes list. 82 unset( $atts[ 'id' ] ); 83 return ( string )( new WPUploadPicture( intval( $id ), $atts ) ); 84 } 85 return ''; 86 } 87 ); 88 89 add_shortcode 90 ( 91 'picture', 92 PictureShortcodeFunctionGenerator( HTMLPicture::class ) 93 ); 94 95 function ImageShortcodeFunctionGenerator( string $class ) 96 { 97 return function ( $atts ) use ( $class ) 98 { 99 $src = TestHashItemString( $atts, 'src' ); 100 if ( $src ) 101 { 102 // Make sure we don't propagate this to the HTML Attributes list. 103 unset( $atts[ 'src' ] ); 104 return ( string )( new $class( $src, $atts ) ); 105 } 106 return ''; 107 }; 108 } 109 110 function PictureShortcodeFunctionGenerator( string $class ) 111 { 112 return function ( $atts ) use ( $class ) 113 { 114 $src = TestHashItemString( $atts, 'src' ); 115 $ext = TestHashItemString( $atts, 'ext' ); 116 $sizes = TestHashItemString( $atts, 'sizes' ); 117 if ( $src && $ext && $sizes ) 118 { 119 $atts = TransformShortcodeAttributesToElementAttributes( $atts ); 120 // Make sure we don't propagate these to the HTML Attributes list. 121 unset( $atts[ 'src' ], $atts[ 'ext' ], $atts[ 'sizes' ] ); 122 return ( string )( new $class( $src, $ext, $sizes, $atts ) ); 123 } 124 return ''; 125 }; 126 } 127 128 function TransformShortcodeAttributesToElementAttributes( array $atts ) : array 129 { 130 // Initialize 131 $element_atts = []; 132 $prefixes = []; 133 $prefix_lengths = []; 134 135 foreach ( PICTURE_ELEMENTS as $element ) 136 { 137 // Where we will put the new versions o' the attributes for each element. 138 $element_atts[ $element ] = []; 139 // We need these for the lengths, so we might as well save these. 140 $prefixes[ $element ] = "{$element}-"; 141 // Optimization: save string lengths so we don't recalculate these for every attribute x element, but can just reference them directly. 142 $prefix_lengths[ $element ] = strlen( $prefixes[ $element ] ); 121 $src = TestHashItemString( $atts, 'src' ); 122 if ( $src ) 123 { 124 // Make sure we don't propagate this to the HTML Attributes list. 125 unset( $atts[ 'src' ] ); 126 return ( string )( new $class( $src, $atts ) ); 127 } 128 return ''; 129 }; 143 130 } 144 131 145 // Convert attributes 146 foreach ( $atts as $attribute_key => $attribute_value ) 132 function PictureShortcodeFunctionGenerator( string $class ) 147 133 { 134 return function ( $atts ) use ( $class ) 135 { 136 $src = TestHashItemString( $atts, 'src' ); 137 $ext = TestHashItemString( $atts, 'ext' ); 138 $sizes = TestHashItemString( $atts, 'sizes' ); 139 if ( $src && $ext && $sizes ) 140 { 141 $atts = TransformShortcodeAttributesToElementAttributes( $atts ); 142 // Make sure we don't propagate these to the HTML Attributes list. 143 unset( $atts[ 'src' ], $atts[ 'ext' ], $atts[ 'sizes' ] ); 144 return ( string )( new $class( $src, $ext, $sizes, $atts ) ); 145 } 146 return ''; 147 }; 148 } 149 150 function TransformShortcodeAttributesToElementAttributes( array $atts ) : array 151 { 152 // Initialize 153 $element_atts = []; 154 $prefixes = []; 155 $prefix_lengths = []; 156 148 157 foreach ( PICTURE_ELEMENTS as $element ) 149 158 { 150 $prefix = $prefixes[ $element ]; 151 $prefix_length = $prefix_lengths[ $element ]; 152 $starts_with_prefix = ( strpos( $attribute_key, $prefix ) === 0 ); 153 if ( $starts_with_prefix ) 159 // Where we will put the new versions o' the attributes for each element. 160 $element_atts[ $element ] = []; 161 // We need these for the lengths, so we might as well save these. 162 $prefixes[ $element ] = "{$element}-"; 163 // Optimization: save string lengths so we don't recalculate these for every attribute x element, but can just reference them directly. 164 $prefix_lengths[ $element ] = strlen( $prefixes[ $element ] ); 165 } 166 167 // Convert attributes 168 foreach ( $atts as $attribute_key => $attribute_value ) 169 { 170 foreach ( PICTURE_ELEMENTS as $element ) 154 171 { 155 $attribute_key_without_prefix = substr( $attribute_key, $prefix_length ); 156 $element_atts[ $element ][ $attribute_key_without_prefix ] = $attribute_value; // Set new version o' attribute. 157 unset( $atts[ $attribute_key ] ); // Get rid of ol' version o' attribute. 172 $prefix = $prefixes[ $element ]; 173 $prefix_length = $prefix_lengths[ $element ]; 174 $starts_with_prefix = ( strpos( $attribute_key, $prefix ) === 0 ); 175 if ( $starts_with_prefix ) 176 { 177 $attribute_key_without_prefix = substr( $attribute_key, $prefix_length ); 178 $element_atts[ $element ][ $attribute_key_without_prefix ] = $attribute_value; // Set new version o' attribute. 179 unset( $atts[ $attribute_key ] ); // Get rid of ol' version o' attribute. 180 } 158 181 } 159 182 } 183 184 // Finally, add all new versions o' attributes to original attributes. 185 foreach ( PICTURE_ELEMENTS as $element ) 186 { 187 $atts[ "{$element}-attributes" ] = $element_atts[ $element ]; 188 } 189 190 return $atts; 160 191 } 161 192 162 // Finally, add all new versions o' attributes to original attributes. 163 foreach ( PICTURE_ELEMENTS as $element ) 164 { 165 $atts[ "{$element}-attributes" ] = $element_atts[ $element ]; 166 } 167 168 return $atts; 193 const PICTURE_ELEMENTS = [ 'img', 'picture', 'source' ]; 169 194 } 170 171 const PICTURE_ELEMENTS = [ 'img', 'picture', 'source' ];172 }
Note: See TracChangeset
for help on using the changeset viewer.