PluginProbe
Ultimate Markdown – Markdown Editor, Importer, & Exporter / 1.13
Ultimate Markdown – Markdown Editor, Importer, & Exporter v1.13
1.26 trunk 1.07 1.08 1.09 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.18 1.19 1.20 1.21 1.22 1.23 1.24 1.25
ultimate-markdown / init.php

init.php in Ultimate Markdown – Markdown Editor, Importer, & Exporter 1.13, at init.php

60 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Ultimate Markdown
4 * Description: Create WordPress posts with the popular Markdown syntax.
5 * Version: 1.13
6 * Author: DAEXT
7 * Author URI: https://daext.com
8 * Text Domain: ultimate-markdown
9 * License: GPLv3
10 *
11 * @package ultimate-markdown
12 */
13
14 // Prevent direct access to this file.
15 if ( ! defined( 'WPINC' ) ) {
16 die();
17 }
18
19 // Class shared across public and admin.
20 require_once plugin_dir_path( __FILE__ ) . 'shared/class-daextulma-shared.php';
21
22 // Perform the Gutenberg related activities only if Gutenberg is present.
23 if ( function_exists( 'register_block_type' ) ) {
24 require_once plugin_dir_path( __FILE__ ) . 'blocks/src/init.php';
25 }
26
27 // Admin.
28 if ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) {
29
30 // Admin.
31 require_once plugin_dir_path( __FILE__ ) . 'admin/class-daextulma-admin.php';
32 add_action( 'plugins_loaded', array( 'Daextulma_Admin', 'get_instance' ) );
33
34 // Activate.
35 register_activation_hook( __FILE__, array( Daextulma_Admin::get_instance(), 'ac_activate' ) );
36
37 }
38
39 // Ajax.
40 if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
41
42 // Admin.
43 require_once plugin_dir_path( __FILE__ ) . 'class-daextulma-ajax.php';
44 add_action( 'plugins_loaded', array( 'daextulma_Ajax', 'get_instance' ) );
45
46 }
47
48 /**
49 * Customize the action links in the "Plugins" menu.
50 *
51 * @param array $actions An array of plugin action links.
52 *
53 * @return mixed
54 */
55 function daextulma_customize_action_links( $actions ) {
56 $actions[] = '<a href="https://daext.com/ultimate-markdown/">' . esc_html__( 'Buy the Pro Version', 'ultimate-markdown' ) . '</a>';
57 return $actions;
58 }
59 add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'daextulma_customize_action_links' );
60