diff --git a/CHANGELOG.md b/CHANGELOG.md index 644fb29..9340c41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 1.1.5 +### Bug fixes +- fixed a bug where fresh glossary terms would often result in 404 Errors and needed manual saving of permalinks + +### Enhancements +- enhanced default styles + +### Code Quality +- removed unused dependencies + ## 1.1.4 ### Enhancements - fixed minor styling issues diff --git a/core/inc/shortcodes/revisions.php b/core/inc/shortcodes/revisions.php new file mode 100644 index 0000000..753b70b --- /dev/null +++ b/core/inc/shortcodes/revisions.php @@ -0,0 +1,44 @@ +get_results("select * from {$wpdb->posts} where post_parent={$post_id} and post_type='revision'"); + + ob_start(); + echo '
';
+	print_r($revisions);
+	echo '
'; + return ob_get_clean(); + + + ob_start(); + wp_list_post_revisions( get_the_ID(), 'revision' ); + $revisions = ob_get_clean(); + + return $revisions; + + $output = ''; + + if ( ! $revisions = wp_get_post_revisions( get_the_ID() ) ) { + return $output; + } + + $rows = ''; + foreach ( $revisions as $revision ) { + if ( ! current_user_can( 'read_post', $revision->ID ) ) { + continue; + } + $rows .= "\t
  • " . wp_post_revision_title_expanded( $revision ) . "
  • \n"; + } + + $output .= "'; + + // At the end of your shortcode function, make sure to.. + return $output; +} +add_shortcode( 'wppedia_revisions', 'testrev' ); \ No newline at end of file diff --git a/package.json b/package.json index bfa5ae2..9e62a59 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wppedia", - "version": "1.1.4", + "version": "1.1.5", "description": "", "main": "index.js", "scripts": { diff --git a/readme.txt b/readme.txt index 1594e56..3fd5420 100644 --- a/readme.txt +++ b/readme.txt @@ -1,12 +1,12 @@ === Glossary by WPPedia - Best Glossary plugin for WordPress === Contributors: steinrein, bastianfiessinger, wppedia Tested up to: 5.7.2 -Stable tag: 1.1.4 +Stable tag: 1.1.5 Tags: glossary, encyclopedia, wiki, lexicon, vocabulary, dictionary, tooltip, clavis License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html -The ultimate Glossary plugin that will fit all your needs. Create your own glossary (also called encyclopedia, or wiki) with all the features you need! 📖 +The ultimate Glossary plugin that will fit all your needs. Create your own glossary (aka encyclopedia, or lexicon) with all the features you need! 📖 == Description == @@ -145,6 +145,16 @@ or == Changelog == += 1.1.5 = +##### Bug fixes +- fixed a bug where fresh glossary terms would often result in 404 Errors and needed manual saving of permalinks + +##### Enhancements +- enhanced default styles + +##### Code Quality +- removed unused dependencies + = 1.1.4 = ##### Enhancements - fixed minor styling issues diff --git a/wppedia.php b/wppedia.php index efd9bfe..b677bed 100644 --- a/wppedia.php +++ b/wppedia.php @@ -9,7 +9,7 @@ * Description: The most advanced Glossary solution for WordPress! * Author: Bastian Fießinger & WPPedia Glossary Team * AuthorURI: https://github.com/bfiessinger/ - * Version: 1.1.4 + * Version: 1.1.5 * Text Domain: wppedia */ @@ -18,8 +18,6 @@ /** * Core WPPedia functions - * - * @since 1.0.0 */ require_once plugin_dir_path(__FILE__) . 'core/inc/core-functions.php'; @@ -91,61 +89,45 @@ public function init() { /** * Instantiate Template Utils - * - * @since 1.0.0 */ template::getInstance(); /** * Instantiate REST API Controller Class - * - * @since 1.0.0 */ new rest_controller(); /** * Instantiate Query Controller - * - * @since 1.0.0 */ new query_control(); /** * Instatiate Admin View * Used to edit post or edit views in wp_admin - * - * @since 1.1.0 */ new admin(); /** * Options * Setup options and settings pages - * - * @since 1.1.0 */ options::getInstance(); /** * Post meta * Setup custom postmeta for WPPedia articles - * - * @since 1.1.0 */ new post_meta(); /** * Instantiate Post Type * Generates the WPPedia Post type and related taxonomies - * - * @since 1.0.0 */ post_type::getInstance(); /** * Modify Wiki Content - * - * @since 1.0.0 */ $crosslinks_active = ( get_option('wppedia_feature_crosslinks', options::get_option_defaults('wppedia_feature_crosslinks')) ) ? true : false; $prefer_single_words = ( get_option('wppedia_crosslinks_prefer_single_words', options::get_option_defaults('wppedia_crosslinks_prefer_single_words')) ) ? true : false; @@ -157,8 +139,6 @@ public function init() { /** * Tooltips - * - * @since 1.0.0 */ new tooltip(); @@ -194,29 +174,21 @@ public function plugin_path() { /** * Template Hooks - * - * @since 1.0.0 */ require_once wpPediaPluginDir . 'template-hooks/hooks.php'; /** * Enqueue Assets - * - * @since 1.0.0 */ require_once wpPediaPluginDir . 'core/inc/assets.php'; /** * Shortcodes - * - * @since 1.0.0 */ require_once wpPediaPluginDir . 'core/inc/shortcodes.php'; /** * The code that runs during plugin activation. - * - * @since 1.0.0 */ require_once wpPediaPluginDir . 'core/inc/class.activation.php'; register_activation_hook( __FILE__, [ 'bf\\wpPedia\\activation', 'activate' ] ); @@ -238,8 +210,6 @@ public function plugin_path() { /** * The code that runs during plugin deactivation. - * - * @since 1.0.0 */ require_once wpPediaPluginDir . 'core/inc/class.deactivation.php'; register_deactivation_hook( __FILE__, [ 'bf\\wpPedia\\deactivation', 'deactivate' ] );