Changeset 2047243
- Timestamp:
- 03/09/2019 05:25:39 PM (7 years ago)
- Location:
- featured-image-caption/trunk
- Files:
-
- 2 edited
-
featured-image-caption.php (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
featured-image-caption/trunk/featured-image-caption.php
r2046347 r2047243 4 4 Plugin URI: https://christiaanconover.com/code/wp-featured-image-caption?utm_source=wp-featured-image-caption 5 5 Description: Set a caption for the featured image of a post that can be displayed on your site. 6 Version: 0.8. 76 Version: 0.8.8 7 7 Author: Christiaan Conover 8 8 Author URI: https://christiaanconover.com?utm_source=wp-featured-image-caption-author … … 19 19 define( 'CCFIC_ID', 'ccfic' ); // Plugin ID 20 20 define( 'CCFIC_NAME', 'Featured Image Caption' ); // Plugin name 21 define( 'CCFIC_VERSION', '0.8. 7' ); // Plugin version21 define( 'CCFIC_VERSION', '0.8.8' ); // Plugin version 22 22 define( 'CCFIC_WPVER', '3.5' ); // Minimum required version of WordPress 23 23 define( 'CCFIC_KEY', 'cc_featured_image_caption' ); // Database key (legacy support, ID now used) … … 36 36 37 37 /** 38 * Class autoloader 39 * 40 * Auto-loads classes for the plugin. 41 * 42 * @param string $class The fully-qualified class name. 43 * @return void 44 */ 45 spl_autoload_register( function ( $class ) { 46 47 // project-specific namespace prefix 48 $prefix = 'cconover\\FeaturedImageCaption\\'; 49 50 // base directory for the namespace prefix 51 $base_dir = __DIR__ . '/classes/'; 52 53 // does the class use the namespace prefix? 54 $len = strlen( $prefix ); 55 if ( strncmp( $prefix, $class, $len ) !== 0 ) { 56 // no, move to the next registered autoloader 57 return; 58 } 59 60 // get the relative class name 61 $relative_class = substr( $class, $len ); 62 63 // replace the namespace prefix with the base directory, replace namespace 64 // separators with directory separators in the relative class name, append 65 // with .php 66 $file = $base_dir . str_replace( '\\', '/', $relative_class ) . '.php'; 67 68 // if the file exists, require it 69 if ( file_exists( $file ) ) { 70 require $file; 71 } 72 } ); 73 74 /** 38 75 * Plugin loader hook. 39 76 */ 40 77 function cc_featured_image_caption_loader() 41 78 { 42 // Composer autoloader43 require_once __DIR__ . '/vendor/autoload.php';44 45 79 // Instantiate the plugin 46 80 $bootstrap = new \cconover\FeaturedImageCaption\Bootstrap(); -
featured-image-caption/trunk/readme.txt
r2046347 r2047243 108 108 == Changelog == 109 109 110 = 0.8.8 = 111 Replace the Composer autoloader with an inline autoloader, to reduce plugin size and improve performance. 112 110 113 = 0.8.7 = 111 114 Fix an error caused by a relative include path.
Note: See TracChangeset
for help on using the changeset viewer.