Skip to content

Commit

Permalink
Update to version 1.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
terrylinooo committed Dec 24, 2018
1 parent 001736c commit 7505025
Show file tree
Hide file tree
Showing 6 changed files with 937 additions and 17 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ For example, if you enabled `syntax highlight`, you have to update your post aga

* PHP version > 5.6
* WordPress version > 4.7
* Tested up to 5.0.2

## Suggestions

Expand Down
6 changes: 4 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Contributors: terrylin
Tags: githuber, markdown
Requires at least: 4.7
Tested up to: 4.7
Stable tag: 4.7
Tested up to: 5.0.2
Stable tag: 1.2.5
Requires PHP: 5.6
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl.html
Expand Down Expand Up @@ -95,6 +95,8 @@ GNU General Public License for more details.
* Rename plugin name from "Githuber MD" to "WP Githuber MD".
* Add new settings.

= 1.2.5

== Upgrade Notice ==

= Currently no logs now.
Expand Down
6 changes: 3 additions & 3 deletions githuber-md.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
*
* @package Githuber
* @since 1.0.0
* @version 1.0.0
* @version 1.2.5
*/

/**
* Plugin Name: WP Githuber MD
* Plugin URI: https://github.com/terrylinooo/githuber-md
* Description: An all-in-one Markdown plugin for your WordPress sites.
* Version: 1.2.0
* Version: 1.2.5
* Author: Terry Lin
* Author URI: https://terryl.in/
* License: GPL 3.0
Expand Down Expand Up @@ -64,7 +64,7 @@
define( 'GITHUBER_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'GITHUBER_PLUGIN_PATH', __FILE__ );
define( 'GITHUBER_PLUGIN_LANGUAGE_PACK', dirname( plugin_basename( __FILE__ ) ) . '/languages' );
define( 'GITHUBER_PLUGIN_VERSION', '1.1.0' );
define( 'GITHUBER_PLUGIN_VERSION', '1.2.5' );
define( 'GITHUBER_PLUGIN_TEXT_DOMAIN', 'wp-githuber-md' );

/**
Expand Down
30 changes: 19 additions & 11 deletions src/Githuber.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@ class Githuber {
public function __construct() {
add_action( 'init', array( $this, 'load_textdomain' ) );
add_action( 'wp_enqueue_scripts', array( $this, 'front_enqueue_styles' ), 998 );
}

// If in Admin Panel and WordPress > 5.0, load Class editor and disable Gutenberg editor.
if ( $GLOBALS['wp_version'] > '5.0' && is_admin() ) {
githuber_load_utility('classic-editor');
}
}

/**
* Initialize everything the Githuber plugin needs.
*/
Expand All @@ -31,19 +36,22 @@ public function init() {
$register = new Controller\Register();
$register->init();

$setting = new Controller\Setting();
$setting->init();

if ( 'yes' === githuber_get_option( 'support_image_paste', 'githuber_markdown' ) ) {
$image_paste = new Controller\ImagePaste();
$image_paste->init();
// Only load controllers in backend.
if ( is_admin() ) {
$setting = new Controller\Setting();
$setting->init();

if ( 'yes' === githuber_get_option( 'support_image_paste', 'githuber_markdown' ) ) {
$image_paste = new Controller\ImagePaste();
$image_paste->init();
}

$markdown = new Controller\Markdown();
$markdown->init();
}

$markdown = new Controller\Markdown();
$markdown->init();

/**
* Let's start loading modules.
* Let's start loading frontend modules.
*/

// Module Name: FlowChart
Expand Down
2 changes: 1 addition & 1 deletion src/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
'Githuber_Walker' => 'class-githuber-walker',
'Githuber_Post_Type_Repository' => 'class-githuber-post-type-repository',
'Githuber_Widget_Toc' => 'class-githuber-widget-toc',
'WeDevs_Settings_API' => 'class-settings-api'
'WeDevs_Settings_API' => 'class-settings-api',
);

if ( array_key_exists( $class_name, $wp_utils_mapping ) ) {
Expand Down
Loading

0 comments on commit 7505025

Please sign in to comment.