Changeset 2970365
- Timestamp:
- 09/22/2023 07:30:35 PM (2 years ago)
- Location:
- simple-post-template
- Files:
-
- 66 added
- 19 edited
-
tags/2.2.4 (added)
-
tags/2.2.4/admin (added)
-
tags/2.2.4/admin/class-advanced-content-templates-admin.php (added)
-
tags/2.2.4/admin/index.php (added)
-
tags/2.2.4/admin/partials (added)
-
tags/2.2.4/admin/partials/advanced-content-templates-admin-display.php (added)
-
tags/2.2.4/admin/partials/advanced-content-templates-admin-sidecar.php (added)
-
tags/2.2.4/admin/partials/advanced-content-templates-admin-upgrade.php (added)
-
tags/2.2.4/composer.json (added)
-
tags/2.2.4/composer.lock (added)
-
tags/2.2.4/includes (added)
-
tags/2.2.4/includes/class-advanced-content-templates-i18n.php (added)
-
tags/2.2.4/includes/class-advanced-content-templates-loader.php (added)
-
tags/2.2.4/includes/class-advanced-content-templates.php (added)
-
tags/2.2.4/includes/index.php (added)
-
tags/2.2.4/index.php (added)
-
tags/2.2.4/languages (added)
-
tags/2.2.4/languages/advanced-content-templates.pot (added)
-
tags/2.2.4/lib (added)
-
tags/2.2.4/lib/wordpress-simple-settings.php (added)
-
tags/2.2.4/license.txt (added)
-
tags/2.2.4/public (added)
-
tags/2.2.4/public/class-advanced-content-templates-public.php (added)
-
tags/2.2.4/public/index.php (added)
-
tags/2.2.4/readme.txt (added)
-
tags/2.2.4/simple-content-template.php (added)
-
tags/2.2.4/uninstall.php (added)
-
tags/2.2.4/vendor (added)
-
tags/2.2.4/vendor/autoload.php (added)
-
tags/2.2.4/vendor/composer (added)
-
tags/2.2.4/vendor/composer/ClassLoader.php (added)
-
tags/2.2.4/vendor/composer/InstalledVersions.php (added)
-
tags/2.2.4/vendor/composer/LICENSE (added)
-
tags/2.2.4/vendor/composer/autoload_classmap.php (added)
-
tags/2.2.4/vendor/composer/autoload_namespaces.php (added)
-
tags/2.2.4/vendor/composer/autoload_psr4.php (added)
-
tags/2.2.4/vendor/composer/autoload_real.php (added)
-
tags/2.2.4/vendor/composer/autoload_static.php (added)
-
tags/2.2.4/vendor/composer/installed.json (added)
-
tags/2.2.4/vendor/composer/installed.php (added)
-
tags/2.2.4/vendor/composer/platform_check.php (added)
-
tags/2.2.4/vendor/objectivco (added)
-
tags/2.2.4/vendor/objectivco/wordpress-simple-settings (added)
-
tags/2.2.4/vendor/objectivco/wordpress-simple-settings/.gitignore (added)
-
tags/2.2.4/vendor/objectivco/wordpress-simple-settings/LICENSE (added)
-
tags/2.2.4/vendor/objectivco/wordpress-simple-settings/README.md (added)
-
tags/2.2.4/vendor/objectivco/wordpress-simple-settings/composer.json (added)
-
tags/2.2.4/vendor/objectivco/wordpress-simple-settings/examples (added)
-
tags/2.2.4/vendor/objectivco/wordpress-simple-settings/examples/awesome-plugin (added)
-
tags/2.2.4/vendor/objectivco/wordpress-simple-settings/examples/awesome-plugin/awesome-plugin-admin.php (added)
-
tags/2.2.4/vendor/objectivco/wordpress-simple-settings/examples/awesome-plugin/awesome-plugin.php (added)
-
tags/2.2.4/vendor/objectivco/wordpress-simple-settings/examples/awesome-plugin/inc (added)
-
tags/2.2.4/vendor/objectivco/wordpress-simple-settings/examples/awesome-plugin/inc/wordpress-simple-settings.php (added)
-
tags/2.2.4/vendor/objectivco/wordpress-simple-settings/src (added)
-
tags/2.2.4/vendor/objectivco/wordpress-simple-settings/src/wordpress-simple-settings.php (added)
-
tags/2.2.4/vendor/objectivco/wp_tabbed_navigation (added)
-
tags/2.2.4/vendor/objectivco/wp_tabbed_navigation/.gitignore (added)
-
tags/2.2.4/vendor/objectivco/wp_tabbed_navigation/LICENSE (added)
-
tags/2.2.4/vendor/objectivco/wp_tabbed_navigation/README.md (added)
-
tags/2.2.4/vendor/objectivco/wp_tabbed_navigation/composer.json (added)
-
tags/2.2.4/vendor/objectivco/wp_tabbed_navigation/src (added)
-
tags/2.2.4/vendor/objectivco/wp_tabbed_navigation/src/class-wp-tabbed-navigation.php (added)
-
trunk/admin/partials/advanced-content-templates-admin-display.php (modified) (1 diff)
-
trunk/admin/partials/advanced-content-templates-admin-sidecar.php (modified) (1 diff)
-
trunk/admin/partials/advanced-content-templates-admin-upgrade.php (modified) (1 diff)
-
trunk/composer.json (modified) (1 diff)
-
trunk/composer.lock (modified) (5 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/simple-content-template.php (modified) (3 diffs)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/ClassLoader.php (modified) (17 diffs)
-
trunk/vendor/composer/InstalledVersions.php (added)
-
trunk/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_namespaces.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_psr4.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_real.php (modified) (2 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (1 diff)
-
trunk/vendor/composer/installed.json (modified) (1 diff)
-
trunk/vendor/composer/installed.php (added)
-
trunk/vendor/composer/platform_check.php (added)
-
trunk/vendor/objectivco/wordpress-simple-settings/.gitignore (added)
-
trunk/vendor/objectivco/wordpress-simple-settings/README.md (modified) (1 diff)
-
trunk/vendor/objectivco/wordpress-simple-settings/composer.json (modified) (1 diff)
-
trunk/vendor/objectivco/wordpress-simple-settings/src/wordpress-simple-settings.php (modified) (15 diffs)
-
trunk/vendor/objectivco/wp_tabbed_navigation/src/class-wp-tabbed-navigation.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
simple-post-template/trunk/admin/partials/advanced-content-templates-admin-display.php
r1643070 r2970365 39 39 <option value="false">None</option> 40 40 <?php foreach($templates as $t): ?> 41 <option value="<?php echo $t->ID; ?>" <?php if( isset($act_post_type_settings[$pto->name]) && $act_post_type_settings[$pto->name]['auto_load'] == $t->ID ) echo "selected"; ?>><?php echo $t->post_title; ?></option> 41 <?php 42 $key_exists = $act_post_type_settings[$pto->name] ?? false; 43 $auto_load_id = $act_post_type_settings[$pto->name]['auto_load'] ?? false; 44 $auto_load_current = $auto_load_id == $t->ID; 45 46 $selected_text = ""; 47 if ($key_exists && $auto_load_id && $auto_load_current) { 48 $selected_text = "selected"; 49 } 50 ?> 51 <option value="<?php echo $t->ID; ?>" <?php echo $selected_text ?>><?php echo $t->post_title; ?></option> 42 52 <?php endforeach; ?> 43 53 </select> -
simple-post-template/trunk/admin/partials/advanced-content-templates-admin-sidecar.php
r2806059 r2970365 20 20 </div> 21 21 22 <h4 style="margin-bottom: 4px;">Advanced Content Templates</h4> 23 <p>Want more powerful features like custom fields, featured images, and taxonomies? Go premium!</p> 24 <a class="button-secondary" target="_blank" href="https://www.advancedcontenttemplates.com/?utm_campaign=free&utm_source=wprepo">Get Advanced Content Templates</a> 22 <div class="" style="padding: 12px; border-radius: 4px; background-color:#ffe01a; margin-top: 12px;"> 23 <h4 style="margin-bottom: 4px; margin-top: 0px;">Advanced Content Templates</h4> 24 <p>Want more powerful features like custom fields, featured images, and taxonomies? Upgrade today!</p> 25 <p style="font-style: italic;">P.S. You can save 25% on your pro upgrade with code <b>LITE25</b></p> 26 <a class="button-secondary" target="_blank" href="https://www.advancedcontenttemplates.com/?utm_campaign=free&utm_source=wprepo">Check Out ACT</a> 27 </div> 25 28 26 29 <script> -
simple-post-template/trunk/admin/partials/advanced-content-templates-admin-upgrade.php
r2806059 r2970365 18 18 ?> 19 19 <div class="wrap"> 20 <?php global $wp_tabbed_navigation; ?>21 <?php $wp_tabbed_navigation->display_tabs(); ?>20 <?php global $wp_tabbed_navigation; ?> 21 <?php $wp_tabbed_navigation->display_tabs(); ?> 22 22 23 <h2>You're missing out!</h2> 24 <p>Advanced Content Templates has tons of bonus features, and it's growing all the time. Join over 300 other pro users and receive:</p> 25 <ol> 26 <li>Premium Support</li> 27 <li>Featured Images</li> 28 <li>Categories, Tags, and Custom Taxonomies</li> 29 <li>Custom Fields</li> 30 <li>Custom Post Type Support</li> 31 <li>And much more!</li> 32 </ol> 23 <div class="" style="padding: 20px; border-radius: 4px; background-color:#ffe01a; margin-top: 20px; max-width: 500px;"> 24 <h2 style="font-size: 22px; margin-top: 0px;">You're missing out!</h2> 25 <p style="font-size: 18px;">Advanced Content Templates has tons of bonus features, and it's growing all the time. Join over 600 other pro users and receive:</p> 26 <ol style="font-size: 18px;"> 27 <li>Premium Support</li> 28 <li>Featured Images</li> 29 <li>Categories, Tags, and Custom Taxonomies</li> 30 <li>Custom Fields</li> 31 <li>Custom Post Type Support</li> 32 <li>And much more!</li> 33 </ol> 34 35 <p style="font-size: 18px; font-style: italic;">P.S. You can save 25% on your pro upgrade with code <b>LITE25</b></p> 33 36 34 <a class="button-primary" target="_blank" href="https://www.advancedcontenttemplates.com/?utm_campaign=free&utm_source=wprepo">Get Advanced Content Templates Now!</a> 37 <a class="button-secondary" style="font-size: 18px;" target="_blank" href="https://www.advancedcontenttemplates.com/?utm_campaign=free&utm_source=wprepo">Check Out Advanced Content Templates!</a> 38 </div> 35 39 </div> -
simple-post-template/trunk/composer.json
r2310271 r2970365 1 1 { 2 "require": {3 "objectivco/wp_tabbed_navigation": "^0.2.0",4 "objectivco/wordpress-simple-settings": "^0.5.0"5 }2 "require": { 3 "objectivco/wp_tabbed_navigation": "^0.3.0", 4 "objectivco/wordpress-simple-settings": "^0.7.0" 5 } 6 6 } -
simple-post-template/trunk/composer.lock
r2310271 r2970365 2 2 "_readme": [ 3 3 "This file locks the dependencies of your project to a known state", 4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md# composer-lock-the-lock-file",4 "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 5 5 "This file is @generated automatically" 6 6 ], 7 "content-hash": " 0e2bbf497299acc79122a487c5c34c75",7 "content-hash": "71aabd15e29338127a2f1a452cc3e861", 8 8 "packages": [ 9 9 { 10 10 "name": "objectivco/wordpress-simple-settings", 11 "version": "0. 5.0",11 "version": "0.7.3", 12 12 "source": { 13 13 "type": "git", 14 14 "url": "https://github.com/Objectivco/wordpress-simple-settings.git", 15 "reference": " d4c80f46e420a214fcb4b3c5c4345da1c5d8191b"15 "reference": "13cd8d21463582a627b1f70c1406cb67ade60baf" 16 16 }, 17 17 "dist": { 18 18 "type": "zip", 19 "url": "https://api.github.com/repos/Objectivco/wordpress-simple-settings/zipball/ d4c80f46e420a214fcb4b3c5c4345da1c5d8191b",20 "reference": " d4c80f46e420a214fcb4b3c5c4345da1c5d8191b",19 "url": "https://api.github.com/repos/Objectivco/wordpress-simple-settings/zipball/13cd8d21463582a627b1f70c1406cb67ade60baf", 20 "reference": "13cd8d21463582a627b1f70c1406cb67ade60baf", 21 21 "shasum": "" 22 22 }, … … 32 32 "notification-url": "https://packagist.org/downloads/", 33 33 "license": [ 34 "GPL-3.0 +"34 "GPL-3.0-or-later" 35 35 ], 36 36 "authors": [ … … 42 42 "description": "A minimalist framework for managing WordPress plugin or theme settings.", 43 43 "homepage": "https://github.com/Objectivco/wordpress-simple-settings", 44 "time": "2017-10-19T16:46:17+00:00" 44 "support": { 45 "issues": "https://github.com/Objectivco/wordpress-simple-settings/issues", 46 "source": "https://github.com/Objectivco/wordpress-simple-settings/tree/master" 47 }, 48 "time": "2019-11-11T19:32:10+00:00" 45 49 }, 46 50 { 47 51 "name": "objectivco/wp_tabbed_navigation", 48 "version": "0. 2.0",52 "version": "0.3.0", 49 53 "source": { 50 54 "type": "git", 51 55 "url": "https://github.com/Objectivco/WP_Tabbed_Navigation.git", 52 "reference": " 932f0f2f94763ac10bdcd79549352d6bf047dddd"56 "reference": "34af439ef00304afd7c91bdfa4d806a1da92b9df" 53 57 }, 54 58 "dist": { 55 59 "type": "zip", 56 "url": "https://api.github.com/repos/Objectivco/WP_Tabbed_Navigation/zipball/ 932f0f2f94763ac10bdcd79549352d6bf047dddd",57 "reference": " 932f0f2f94763ac10bdcd79549352d6bf047dddd",60 "url": "https://api.github.com/repos/Objectivco/WP_Tabbed_Navigation/zipball/34af439ef00304afd7c91bdfa4d806a1da92b9df", 61 "reference": "34af439ef00304afd7c91bdfa4d806a1da92b9df", 58 62 "shasum": "" 59 63 }, … … 79 83 "description": "Automate creating a tabbed navigation and maintaining tabbed states", 80 84 "homepage": "https://github.com/Objectivco/WP_Tabbed_Navigation", 81 "time": "2019-04-24T19:52:48+00:00" 85 "support": { 86 "issues": "https://github.com/Objectivco/WP_Tabbed_Navigation/issues", 87 "source": "https://github.com/Objectivco/WP_Tabbed_Navigation/tree/0.3.0" 88 }, 89 "time": "2021-04-07T21:29:30+00:00" 82 90 } 83 91 ], … … 89 97 "prefer-lowest": false, 90 98 "platform": [], 91 "platform-dev": [] 99 "platform-dev": [], 100 "plugin-api-version": "2.3.0" 92 101 } -
simple-post-template/trunk/readme.txt
r2806062 r2970365 3 3 Tags: post template, content template, post from template, templates, copy, clone, duplicate 4 4 Requires at least: 3.6 5 Tested up to: 6. 0.36 Stable tag: 2.2. 25 Tested up to: 6.3.1 6 Stable tag: 2.2.4 7 7 8 8 Create content templates for your posts and pages. When creating a new post or page use one of your content templates as the starting point! … … 21 21 6. ...next time you need to write a similar post or create a similar page, do it all over again! 22 22 23 **Custom Post Types, Custom Fields, Tags, Categories, Featured Images:** if you need any of these, you should check out the pro version of this plugin, Advanced Content Templates: <a href="https://advancedcontenttemplates.com">Advanced Content Templates</a> 24 25 = Version History = 23 **Unlock More Features** 24 25 * Custom Post Types 26 * Custom Fields 27 * Tags 28 * Categories 29 * Featured Images: 30 31 If you need any of these, you should check out the pro version of this plugin, Advanced Content Templates: <a href="https://advancedcontenttemplates.com/?utm_campaign=free&utm_source=wprepo">Advanced Content Templates</a> 32 33 https://youtu.be/VeZwerk2aN0 34 35 We hope you enjoy creating with Simple Content Templates! 36 37 == Changelog == 38 39 **Version 2.2.4** 40 41 * Bump version 42 43 **Version 2.2.3** 44 45 * Update tested to version. 46 * Fix php notice in logs. 47 * Upgrade dependencies. 48 * Clean a few things up. 26 49 27 50 **Version 2.2.2** -
simple-post-template/trunk/simple-content-template.php
r2806059 r2970365 17 17 * Plugin URI: https://www.advancedcontenttemplates.com/ 18 18 * Description: A simple to use content template system. Create similarly structured posts & pages with ease. 19 * Version: 2.2. 219 * Version: 2.2.4 20 20 * Author: Clifton Griffin 21 21 * Author URI: https://objectiv.co … … 24 24 * Text Domain: advanced-content-templates 25 25 * Domain Path: /languages 26 * Tested up to: 6. 0.326 * Tested up to: 6.3.1 27 27 */ 28 28 29 29 // If this file is called directly, abort. 30 if ( ! defined( 'WPINC' )) {31 die;30 if (! defined('WPINC')) { 31 die; 32 32 } 33 33 34 define( 'CGD_SCT_VERSION', '2.2.2');35 define( 'CGD_SCT_NAME', 'Simple Content Templates');34 define('CGD_SCT_VERSION', '2.2.4'); 35 define('CGD_SCT_NAME', 'Simple Content Templates'); 36 36 37 37 /** 38 38 * Composer Include 39 39 */ 40 require dirname( __FILE__) . '/vendor/autoload.php';40 require dirname(__FILE__) . '/vendor/autoload.php'; 41 41 42 42 /** … … 44 44 * dashboard-specific hooks, and public-facing site hooks. 45 45 */ 46 require plugin_dir_path( __FILE__) . 'includes/class-advanced-content-templates.php';46 require plugin_dir_path(__FILE__) . 'includes/class-advanced-content-templates.php'; 47 47 48 48 $Simple_Content_Templates = new Simple_Content_Templates(); 49 49 $Simple_Content_Templates->run(); 50 50 51 register_activation_hook( __FILE__, array( $Simple_Content_Templates, 'activate' ));52 register_deactivation_hook( __FILE__, array( $Simple_Content_Templates, 'deactivate' ));51 register_activation_hook(__FILE__, array( $Simple_Content_Templates, 'activate' )); 52 register_deactivation_hook(__FILE__, array( $Simple_Content_Templates, 'deactivate' )); -
simple-post-template/trunk/vendor/autoload.php
r1746168 r2970365 3 3 // autoload.php @generated by Composer 4 4 5 if (PHP_VERSION_ID < 50600) { 6 if (!headers_sent()) { 7 header('HTTP/1.1 500 Internal Server Error'); 8 } 9 $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; 10 if (!ini_get('display_errors')) { 11 if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { 12 fwrite(STDERR, $err); 13 } elseif (!headers_sent()) { 14 echo $err; 15 } 16 } 17 trigger_error( 18 $err, 19 E_USER_ERROR 20 ); 21 } 22 5 23 require_once __DIR__ . '/composer/autoload_real.php'; 6 24 -
simple-post-template/trunk/vendor/composer/ClassLoader.php
r2310271 r2970365 38 38 * @author Fabien Potencier <[email protected]> 39 39 * @author Jordi Boggiano <[email protected]> 40 * @see http ://www.php-fig.org/psr/psr-0/41 * @see http ://www.php-fig.org/psr/psr-4/40 * @see https://www.php-fig.org/psr/psr-0/ 41 * @see https://www.php-fig.org/psr/psr-4/ 42 42 */ 43 43 class ClassLoader 44 44 { 45 /** @var \Closure(string):void */ 46 private static $includeFile; 47 48 /** @var ?string */ 49 private $vendorDir; 50 45 51 // PSR-4 52 /** 53 * @var array[] 54 * @psalm-var array<string, array<string, int>> 55 */ 46 56 private $prefixLengthsPsr4 = array(); 57 /** 58 * @var array[] 59 * @psalm-var array<string, array<int, string>> 60 */ 47 61 private $prefixDirsPsr4 = array(); 62 /** 63 * @var array[] 64 * @psalm-var array<string, string> 65 */ 48 66 private $fallbackDirsPsr4 = array(); 49 67 50 68 // PSR-0 69 /** 70 * @var array[] 71 * @psalm-var array<string, array<string, string[]>> 72 */ 51 73 private $prefixesPsr0 = array(); 74 /** 75 * @var array[] 76 * @psalm-var array<string, string> 77 */ 52 78 private $fallbackDirsPsr0 = array(); 53 79 80 /** @var bool */ 54 81 private $useIncludePath = false; 82 83 /** 84 * @var string[] 85 * @psalm-var array<string, string> 86 */ 55 87 private $classMap = array(); 88 89 /** @var bool */ 56 90 private $classMapAuthoritative = false; 91 92 /** 93 * @var bool[] 94 * @psalm-var array<string, bool> 95 */ 57 96 private $missingClasses = array(); 97 98 /** @var ?string */ 58 99 private $apcuPrefix; 59 100 101 /** 102 * @var self[] 103 */ 104 private static $registeredLoaders = array(); 105 106 /** 107 * @param ?string $vendorDir 108 */ 109 public function __construct($vendorDir = null) 110 { 111 $this->vendorDir = $vendorDir; 112 self::initializeIncludeClosure(); 113 } 114 115 /** 116 * @return string[] 117 */ 60 118 public function getPrefixes() 61 119 { 62 120 if (!empty($this->prefixesPsr0)) { 63 return call_user_func_array('array_merge', $this->prefixesPsr0);121 return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); 64 122 } 65 123 … … 67 125 } 68 126 127 /** 128 * @return array[] 129 * @psalm-return array<string, array<int, string>> 130 */ 69 131 public function getPrefixesPsr4() 70 132 { … … 72 134 } 73 135 136 /** 137 * @return array[] 138 * @psalm-return array<string, string> 139 */ 74 140 public function getFallbackDirs() 75 141 { … … 77 143 } 78 144 145 /** 146 * @return array[] 147 * @psalm-return array<string, string> 148 */ 79 149 public function getFallbackDirsPsr4() 80 150 { … … 82 152 } 83 153 154 /** 155 * @return string[] Array of classname => path 156 * @psalm-return array<string, string> 157 */ 84 158 public function getClassMap() 85 159 { … … 88 162 89 163 /** 90 * @param array $classMap Class to filename map 164 * @param string[] $classMap Class to filename map 165 * @psalm-param array<string, string> $classMap 166 * 167 * @return void 91 168 */ 92 169 public function addClassMap(array $classMap) … … 103 180 * appending or prepending to the ones previously set for this prefix. 104 181 * 105 * @param string $prefix The prefix 106 * @param array|string $paths The PSR-0 root directories 107 * @param bool $prepend Whether to prepend the directories 182 * @param string $prefix The prefix 183 * @param string[]|string $paths The PSR-0 root directories 184 * @param bool $prepend Whether to prepend the directories 185 * 186 * @return void 108 187 */ 109 188 public function add($prefix, $paths, $prepend = false) … … 148 227 * appending or prepending to the ones previously set for this namespace. 149 228 * 150 * @param string $prefix The prefix/namespace, with trailing '\\'151 * @param array|string $paths The PSR-4 base directories152 * @param bool $prepend Whether to prepend the directories229 * @param string $prefix The prefix/namespace, with trailing '\\' 230 * @param string[]|string $paths The PSR-4 base directories 231 * @param bool $prepend Whether to prepend the directories 153 232 * 154 233 * @throws \InvalidArgumentException 234 * 235 * @return void 155 236 */ 156 237 public function addPsr4($prefix, $paths, $prepend = false) … … 196 277 * replacing any others previously set for this prefix. 197 278 * 198 * @param string $prefix The prefix 199 * @param array|string $paths The PSR-0 base directories 279 * @param string $prefix The prefix 280 * @param string[]|string $paths The PSR-0 base directories 281 * 282 * @return void 200 283 */ 201 284 public function set($prefix, $paths) … … 212 295 * replacing any others previously set for this namespace. 213 296 * 214 * @param string $prefix The prefix/namespace, with trailing '\\'215 * @param array|string $paths The PSR-4 base directories297 * @param string $prefix The prefix/namespace, with trailing '\\' 298 * @param string[]|string $paths The PSR-4 base directories 216 299 * 217 300 * @throws \InvalidArgumentException 301 * 302 * @return void 218 303 */ 219 304 public function setPsr4($prefix, $paths) … … 235 320 * 236 321 * @param bool $useIncludePath 322 * 323 * @return void 237 324 */ 238 325 public function setUseIncludePath($useIncludePath) … … 257 344 * 258 345 * @param bool $classMapAuthoritative 346 * 347 * @return void 259 348 */ 260 349 public function setClassMapAuthoritative($classMapAuthoritative) … … 277 366 * 278 367 * @param string|null $apcuPrefix 368 * 369 * @return void 279 370 */ 280 371 public function setApcuPrefix($apcuPrefix) … … 297 388 * 298 389 * @param bool $prepend Whether to prepend the autoloader or not 390 * 391 * @return void 299 392 */ 300 393 public function register($prepend = false) 301 394 { 302 395 spl_autoload_register(array($this, 'loadClass'), true, $prepend); 396 397 if (null === $this->vendorDir) { 398 return; 399 } 400 401 if ($prepend) { 402 self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders; 403 } else { 404 unset(self::$registeredLoaders[$this->vendorDir]); 405 self::$registeredLoaders[$this->vendorDir] = $this; 406 } 303 407 } 304 408 305 409 /** 306 410 * Unregisters this instance as an autoloader. 411 * 412 * @return void 307 413 */ 308 414 public function unregister() 309 415 { 310 416 spl_autoload_unregister(array($this, 'loadClass')); 417 418 if (null !== $this->vendorDir) { 419 unset(self::$registeredLoaders[$this->vendorDir]); 420 } 311 421 } 312 422 … … 315 425 * 316 426 * @param string $class The name of the class 317 * @return bool|null True if loaded, null otherwise427 * @return true|null True if loaded, null otherwise 318 428 */ 319 429 public function loadClass($class) 320 430 { 321 431 if ($file = $this->findFile($class)) { 322 includeFile($file); 432 $includeFile = self::$includeFile; 433 $includeFile($file); 323 434 324 435 return true; 325 436 } 437 438 return null; 326 439 } 327 440 … … 368 481 } 369 482 483 /** 484 * Returns the currently registered loaders indexed by their corresponding vendor directories. 485 * 486 * @return self[] 487 */ 488 public static function getRegisteredLoaders() 489 { 490 return self::$registeredLoaders; 491 } 492 493 /** 494 * @param string $class 495 * @param string $ext 496 * @return string|false 497 */ 370 498 private function findFileWithExtension($class, $ext) 371 499 { … … 433 561 return false; 434 562 } 563 564 /** 565 * @return void 566 */ 567 private static function initializeIncludeClosure() 568 { 569 if (self::$includeFile !== null) { 570 return; 571 } 572 573 /** 574 * Scope isolated include. 575 * 576 * Prevents access to $this/self from included files. 577 * 578 * @param string $file 579 * @return void 580 */ 581 self::$includeFile = \Closure::bind(static function($file) { 582 include $file; 583 }, null, null); 584 } 435 585 } 436 437 /**438 * Scope isolated include.439 *440 * Prevents access to $this/self from included files.441 */442 function includeFile($file)443 {444 include $file;445 } -
simple-post-template/trunk/vendor/composer/autoload_classmap.php
r1746286 r2970365 3 3 // autoload_classmap.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 8 8 return array( 9 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 9 10 'WP_Tabbed_Navigation' => $vendorDir . '/objectivco/wp_tabbed_navigation/src/class-wp-tabbed-navigation.php', 10 11 'WordPress_SimpleSettings' => $vendorDir . '/objectivco/wordpress-simple-settings/src/wordpress-simple-settings.php', -
simple-post-template/trunk/vendor/composer/autoload_namespaces.php
r1746168 r2970365 3 3 // autoload_namespaces.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
simple-post-template/trunk/vendor/composer/autoload_psr4.php
r1746168 r2970365 3 3 // autoload_psr4.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
simple-post-template/trunk/vendor/composer/autoload_real.php
r1746168 r2970365 14 14 } 15 15 16 /** 17 * @return \Composer\Autoload\ClassLoader 18 */ 16 19 public static function getLoader() 17 20 { … … 20 23 } 21 24 25 require __DIR__ . '/platform_check.php'; 26 22 27 spl_autoload_register(array('ComposerAutoloaderInit5251c6df6cf3bfc1691db7b8368628bd', 'loadClassLoader'), true, true); 23 self::$loader = $loader = new \Composer\Autoload\ClassLoader( );28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 24 29 spl_autoload_unregister(array('ComposerAutoloaderInit5251c6df6cf3bfc1691db7b8368628bd', 'loadClassLoader')); 25 30 26 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); 27 if ($useStaticLoader) { 28 require_once __DIR__ . '/autoload_static.php'; 29 30 call_user_func(\Composer\Autoload\ComposerStaticInit5251c6df6cf3bfc1691db7b8368628bd::getInitializer($loader)); 31 } else { 32 $map = require __DIR__ . '/autoload_namespaces.php'; 33 foreach ($map as $namespace => $path) { 34 $loader->set($namespace, $path); 35 } 36 37 $map = require __DIR__ . '/autoload_psr4.php'; 38 foreach ($map as $namespace => $path) { 39 $loader->setPsr4($namespace, $path); 40 } 41 42 $classMap = require __DIR__ . '/autoload_classmap.php'; 43 if ($classMap) { 44 $loader->addClassMap($classMap); 45 } 46 } 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInit5251c6df6cf3bfc1691db7b8368628bd::getInitializer($loader)); 47 33 48 34 $loader->register(true); -
simple-post-template/trunk/vendor/composer/autoload_static.php
r1746286 r2970365 8 8 { 9 9 public static $classMap = array ( 10 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 10 11 'WP_Tabbed_Navigation' => __DIR__ . '/..' . '/objectivco/wp_tabbed_navigation/src/class-wp-tabbed-navigation.php', 11 12 'WordPress_SimpleSettings' => __DIR__ . '/..' . '/objectivco/wordpress-simple-settings/src/wordpress-simple-settings.php', -
simple-post-template/trunk/vendor/composer/installed.json
r2310271 r2970365 1 [ 2 { 3 "name": "objectivco/wordpress-simple-settings", 4 "version": "0.5.0", 5 "version_normalized": "0.5.0.0", 6 "source": { 7 "type": "git", 8 "url": "https://github.com/Objectivco/wordpress-simple-settings.git", 9 "reference": "d4c80f46e420a214fcb4b3c5c4345da1c5d8191b" 1 { 2 "packages": [ 3 { 4 "name": "objectivco/wordpress-simple-settings", 5 "version": "0.7.3", 6 "version_normalized": "0.7.3.0", 7 "source": { 8 "type": "git", 9 "url": "https://github.com/Objectivco/wordpress-simple-settings.git", 10 "reference": "13cd8d21463582a627b1f70c1406cb67ade60baf" 11 }, 12 "dist": { 13 "type": "zip", 14 "url": "https://api.github.com/repos/Objectivco/wordpress-simple-settings/zipball/13cd8d21463582a627b1f70c1406cb67ade60baf", 15 "reference": "13cd8d21463582a627b1f70c1406cb67ade60baf", 16 "shasum": "" 17 }, 18 "require": { 19 "php": ">=5.2.0" 20 }, 21 "time": "2019-11-11T19:32:10+00:00", 22 "type": "library", 23 "installation-source": "dist", 24 "autoload": { 25 "classmap": [ 26 "src/wordpress-simple-settings.php" 27 ] 28 }, 29 "notification-url": "https://packagist.org/downloads/", 30 "license": [ 31 "GPL-3.0-or-later" 32 ], 33 "authors": [ 34 { 35 "name": "Clifton Griffin", 36 "email": "[email protected]" 37 } 38 ], 39 "description": "A minimalist framework for managing WordPress plugin or theme settings.", 40 "homepage": "https://github.com/Objectivco/wordpress-simple-settings", 41 "support": { 42 "issues": "https://github.com/Objectivco/wordpress-simple-settings/issues", 43 "source": "https://github.com/Objectivco/wordpress-simple-settings/tree/master" 44 }, 45 "install-path": "../objectivco/wordpress-simple-settings" 10 46 }, 11 "dist": { 12 "type": "zip", 13 "url": "https://api.github.com/repos/Objectivco/wordpress-simple-settings/zipball/d4c80f46e420a214fcb4b3c5c4345da1c5d8191b", 14 "reference": "d4c80f46e420a214fcb4b3c5c4345da1c5d8191b", 15 "shasum": "" 16 }, 17 "require": { 18 "php": ">=5.2.0" 19 }, 20 "time": "2017-10-19T16:46:17+00:00", 21 "type": "library", 22 "installation-source": "dist", 23 "autoload": { 24 "classmap": [ 25 "src/wordpress-simple-settings.php" 26 ] 27 }, 28 "notification-url": "https://packagist.org/downloads/", 29 "license": [ 30 "GPL-3.0+" 31 ], 32 "authors": [ 33 { 34 "name": "Clifton Griffin", 35 "email": "[email protected]" 36 } 37 ], 38 "description": "A minimalist framework for managing WordPress plugin or theme settings.", 39 "homepage": "https://github.com/Objectivco/wordpress-simple-settings" 40 }, 41 { 42 "name": "objectivco/wp_tabbed_navigation", 43 "version": "0.2.0", 44 "version_normalized": "0.2.0.0", 45 "source": { 46 "type": "git", 47 "url": "https://github.com/Objectivco/WP_Tabbed_Navigation.git", 48 "reference": "932f0f2f94763ac10bdcd79549352d6bf047dddd" 49 }, 50 "dist": { 51 "type": "zip", 52 "url": "https://api.github.com/repos/Objectivco/WP_Tabbed_Navigation/zipball/932f0f2f94763ac10bdcd79549352d6bf047dddd", 53 "reference": "932f0f2f94763ac10bdcd79549352d6bf047dddd", 54 "shasum": "" 55 }, 56 "require": { 57 "php": ">=5.2.0" 58 }, 59 "time": "2019-04-24T19:52:48+00:00", 60 "type": "library", 61 "installation-source": "dist", 62 "autoload": { 63 "classmap": [ 64 "src/class-wp-tabbed-navigation.php" 65 ] 66 }, 67 "notification-url": "https://packagist.org/downloads/", 68 "license": [ 69 "GPL-3.0+" 70 ], 71 "authors": [ 72 { 73 "name": "Clifton Griffin", 74 "email": "[email protected]" 75 } 76 ], 77 "description": "Automate creating a tabbed navigation and maintaining tabbed states", 78 "homepage": "https://github.com/Objectivco/WP_Tabbed_Navigation" 79 } 80 ] 47 { 48 "name": "objectivco/wp_tabbed_navigation", 49 "version": "0.3.0", 50 "version_normalized": "0.3.0.0", 51 "source": { 52 "type": "git", 53 "url": "https://github.com/Objectivco/WP_Tabbed_Navigation.git", 54 "reference": "34af439ef00304afd7c91bdfa4d806a1da92b9df" 55 }, 56 "dist": { 57 "type": "zip", 58 "url": "https://api.github.com/repos/Objectivco/WP_Tabbed_Navigation/zipball/34af439ef00304afd7c91bdfa4d806a1da92b9df", 59 "reference": "34af439ef00304afd7c91bdfa4d806a1da92b9df", 60 "shasum": "" 61 }, 62 "require": { 63 "php": ">=5.2.0" 64 }, 65 "time": "2021-04-07T21:29:30+00:00", 66 "type": "library", 67 "installation-source": "dist", 68 "autoload": { 69 "classmap": [ 70 "src/class-wp-tabbed-navigation.php" 71 ] 72 }, 73 "notification-url": "https://packagist.org/downloads/", 74 "license": [ 75 "GPL-3.0+" 76 ], 77 "authors": [ 78 { 79 "name": "Clifton Griffin", 80 "email": "[email protected]" 81 } 82 ], 83 "description": "Automate creating a tabbed navigation and maintaining tabbed states", 84 "homepage": "https://github.com/Objectivco/WP_Tabbed_Navigation", 85 "support": { 86 "issues": "https://github.com/Objectivco/WP_Tabbed_Navigation/issues", 87 "source": "https://github.com/Objectivco/WP_Tabbed_Navigation/tree/0.3.0" 88 }, 89 "install-path": "../objectivco/wp_tabbed_navigation" 90 } 91 ], 92 "dev": true, 93 "dev-package-names": [] 94 } -
simple-post-template/trunk/vendor/objectivco/wordpress-simple-settings/README.md
r2310271 r2970365 36 36 Change Log 37 37 -------- 38 ### 0.7.2 39 - Pass NULL as old value if there isn't an old value. 40 41 ### 0.7.1 42 - WordPress coding standards 43 - Don't save to db for reach setting on save_settings(). Defer to the end. 44 - Add action {$this->prefix}_update_setting_{$setting} that receives the old and new values during setting update. 45 - Ignore .idea folder 46 38 47 ### 0.3.0 39 48 - Added $delimeter variable to allow switching array delimeter from semi-colon (default) to something else. -
simple-post-template/trunk/vendor/objectivco/wordpress-simple-settings/composer.json
r2310271 r2970365 7 7 "php": ">=5.2.0" 8 8 }, 9 "license": "GPL-3.0 +",9 "license": "GPL-3.0-or-later", 10 10 "authors": [ 11 11 { -
simple-post-template/trunk/vendor/objectivco/wordpress-simple-settings/src/wordpress-simple-settings.php
r2310271 r2970365 6 6 * 7 7 * @author Clifton H. Griffin II 8 * @version 0. 58 * @version 0.7.3 9 9 * @copyright Objectiv 2013-2017 10 10 * @license GNU GPL version 3 (or later) {@see license.txt} … … 13 13 var $settings = array(); 14 14 var $prefix; 15 var $delimeter; 15 var $delimiter; 16 var $network_only = false; 16 17 17 18 /** … … 19 20 * 20 21 * @author Clifton H. Griffin II 21 * @since 0.1 22 * @since 0.1.0 22 23 * 23 24 * @return void … … 25 26 public function __construct() { 26 27 // Set a default prefix 27 if( function_exists('get_called_class') && empty($this->prefix) ) $this->prefix = get_called_class(); 28 29 // Set a default delimeter for separated values 30 if ( empty($this->delimeter) ) $this->delimeter = ";"; 31 32 $this->settings = $this->get_settings_obj( $this->prefix ); 33 add_action('admin_init', array($this, 'save_settings') ); 28 if ( function_exists( 'get_called_class' ) && empty( $this->prefix ) ) { 29 $this->prefix = get_called_class(); 30 } 31 32 // Set a default delimiter for separated values 33 if ( empty( $this->delimiter ) ) { 34 $this->delimiter = ';'; 35 } 36 37 $this->settings = $this->get_settings_obj(); 38 39 add_action( 'admin_init', array( $this, 'save_settings' ) ); 34 40 } 35 41 … … 38 44 * 39 45 * @author Clifton H. Griffin II 40 * @since 0.1 41 * 42 * @param string $setting The name of the new option46 * @since 0.1.0 47 * 48 * @param string|bool $setting The name of the new option 43 49 * @param string $value The value of the new option 44 50 * @return boolean True if successful, false otherwise 45 51 **/ 46 public function add_setting ( $setting = false, $value ) {47 if ($setting === false ) return false;48 49 if ( ! isset($this->settings[$setting]) ){50 return $this->update_setting($setting, $value);51 } else return false;52 public function add_setting( $setting, $value ) { 53 if ( ! isset( $this->settings[ $setting ] ) ) { 54 return $this->update_setting( $setting, $value ); 55 } else { 56 return false; 57 } 52 58 } 53 59 … … 55 61 * Updates or adds a setting 56 62 * 57 * @author Clifton H. Griffin II 58 * @since 0.1 59 * 60 * @param string $setting The name of the option 61 * @param string $value The new value of the option 63 * @param string|bool $setting The name of the option 64 * @param string|array $value The new value of the option 65 * @param bool $save_to_db 66 * 62 67 * @return boolean True if successful, false if not 63 **/ 64 public function update_setting ( $setting = false, $value ) { 65 if( $setting === false ) return false; 66 67 $this->settings = $this->get_settings_obj($this->prefix); 68 $this->settings[$setting] = $value; 69 70 return $this->set_settings_obj($this->settings); 68 * @author Clifton H. Griffin II 69 * @since 0.1.0 70 * 71 */ 72 public function update_setting( $setting, $value, $save_to_db = true ) { 73 if ( $setting === false ) { 74 return false; 75 } 76 77 $old_value = isset( $this->settings[ $setting ] ) ? $this->settings[ $setting ] : NULL; 78 $this->settings[ $setting ] = $value; 79 80 do_action( "{$this->prefix}_update_setting", $setting, $old_value, $value ); 81 do_action( "{$this->prefix}_update_setting_{$setting}", $old_value, $value ); 82 83 if ( $save_to_db ) { 84 return $this->set_settings_obj( $this->settings ); 85 } 86 87 return true; 71 88 } 72 89 … … 80 97 * @return boolean True if successful, false if not 81 98 **/ 82 public function delete_setting ( $setting = false ) { 83 if( $setting === false ) return false; 84 85 $this->settings = $this->get_settings_obj($this->prefix); 86 unset($this->settings[$setting]); 87 88 return $this->set_settings_obj($this->settings); 99 public function delete_setting( $setting ) { 100 if ( ! isset( $this->settings[ $setting ] ) ) { 101 return false; 102 } 103 104 unset( $this->settings[ $setting ] ); 105 106 return $this->set_settings_obj( $this->settings ); 89 107 } 90 108 … … 93 111 * 94 112 * @author Clifton H. Griffin II 95 * @since 0.1 113 * @since 0.1.0 96 114 * 97 115 * @param string $setting The name of the option … … 99 117 * @return mixed The value of the setting 100 118 **/ 101 public function get_setting ( $setting = false, $type = 'string' ) { 102 if($setting === false || ! isset($this->settings[$setting]) ) return false; 103 104 $value = $this->settings[$setting]; 105 106 if( strtolower($type) == 'array' && ! empty($value) ) { 107 $value = (array)explode($this->delimeter, $value); 108 } 109 110 return apply_filters($this->prefix . '_get_setting', $value, $setting); 119 public function get_setting( $setting, $type = 'string' ) { 120 if ( ! isset( $this->settings[ $setting ] ) ) { 121 return false; 122 } 123 124 $value = $this->settings[ $setting ]; 125 126 if ( strtolower( $type ) == 'array' && ! empty( $value ) ) { 127 $value = (array) explode( $this->delimiter, $value ); 128 } 129 130 return apply_filters( $this->prefix . '_get_setting', $value, $setting ); 111 131 } 112 132 … … 115 135 * 116 136 * @author Clifton H. Griffin II 117 * @since 0.1 137 * @since 0.1.0 118 138 * 119 139 * @param string $setting The name of the setting … … 121 141 * @return string The name of the field 122 142 **/ 123 public function get_field_name( $setting, $type = 'string') {143 public function get_field_name( $setting, $type = 'string' ) { 124 144 return "{$this->prefix}_setting[$setting][$type]"; 125 145 } … … 129 149 * 130 150 * @author Clifton H. Griffin II 131 * @since 0.1 151 * @since 0.1.0 132 152 * 133 153 * @return void … … 141 161 * 142 162 * @author Clifton H. Griffin II 143 * @since 0.1 163 * @since 0.1.0 144 164 * 145 165 * @return void 146 166 **/ 147 167 public function save_settings() { 148 if ( isset($_REQUEST["{$this->prefix}_setting"]) && check_admin_referer("save_{$this->prefix}_settings","{$this->prefix}_save") ) {149 $new_settings = $_REQUEST[ "{$this->prefix}_setting"];168 if ( isset( $_REQUEST[ "{$this->prefix}_setting" ] ) && check_admin_referer( "save_{$this->prefix}_settings", "{$this->prefix}_save" ) ) { 169 $new_settings = $_REQUEST[ "{$this->prefix}_setting" ]; 150 170 151 171 // Strip Magic Slashes 152 172 $new_settings = stripslashes_deep( $new_settings ); 153 173 154 foreach( $new_settings as $setting_name => $setting_value ) { 155 foreach( $setting_value as $type => $value ) { 156 if( $type == "array" ) { 157 if ( ! is_array($value) && ! empty($value) ) $value = (array)explode($this->delimeter, $value); 158 159 $this->update_setting($setting_name, $value); 174 foreach ( $new_settings as $setting_name => $setting_value ) { 175 foreach ( $setting_value as $type => $value ) { 176 if ( $type == 'array' ) { 177 if ( ! is_array( $value ) && ! empty( $value ) ) { 178 $value = (array) explode( $this->delimiter, $value ); 179 } 180 181 $this->update_setting( $setting_name, $value, false ); 160 182 } else { 161 $this->update_setting( $setting_name, $value);183 $this->update_setting( $setting_name, $value, false ); 162 184 } 163 185 } 164 186 } 165 187 166 do_action("{$this->prefix}_settings_saved"); 188 // Actually write the changes to the db 189 $this->set_settings_obj( $this->settings ); 190 191 do_action( "{$this->prefix}_settings_saved" ); 167 192 } 168 193 } … … 172 197 * 173 198 * @author Clifton H. Griffin II 174 * @since 0.1 199 * @since 0.1.0 175 200 * 176 201 * @return array The settings array 177 202 **/ 178 public function get_settings_obj () { 179 return get_option("{$this->prefix}_settings", false); 203 public function get_settings_obj() { 204 if ( $this->network_only ) { 205 return get_site_option( "{$this->prefix}_settings", false ); 206 } else { 207 return get_option( "{$this->prefix}_settings", false ); 208 } 180 209 } 181 210 … … 184 213 * 185 214 * @author Clifton H. Griffin II 186 * @since 0.1 215 * @since 0.1.0 187 216 * 188 217 * @param array $newobj The new settings object 189 218 * @return boolean True if successful, false otherwise 190 219 **/ 191 public function set_settings_obj ( $newobj ) { 192 return update_option("{$this->prefix}_settings", $newobj); 220 public function set_settings_obj( $newobj ) { 221 if ( $this->network_only ) { 222 return update_site_option( "{$this->prefix}_settings", $newobj ); 223 } else { 224 return update_option( "{$this->prefix}_settings", $newobj ); 225 } 193 226 } 194 227 } -
simple-post-template/trunk/vendor/objectivco/wp_tabbed_navigation/src/class-wp-tabbed-navigation.php
r2310271 r2970365 90 90 * @return string Tab markup. 91 91 */ 92 public function get_tabs() { 93 $html = '<h2>' . $this->_title . '</h2>'; 92 public function get_tabs( $show_title = true ) { 93 $html = ''; 94 95 if ( $show_title ) { 96 $html .= '<h2>' . $this->_title . '</h2>'; 97 } 94 98 95 99 $html .= '<h2 class="nav-tab-wrapper">'; … … 118 122 * @since 0.1.0 119 123 */ 120 public function display_tabs( ) {121 echo $this->get_tabs( );124 public function display_tabs( $show_title = true ) { 125 echo $this->get_tabs( $show_title ); 122 126 } 123 127 }
Note: See TracChangeset
for help on using the changeset viewer.