PluginProbe
Read More WP / 1.1.6
Read More WP v1.1.6
trunk 1.1.5 1.1.6
read-more-wp / read-more-wp.php

read-more-wp.php in Read More WP 1.1.6, at read-more-wp.php

122 lines 4.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * The plugin bootstrap file
5 *
6 * This file is read by WordPress to generate the plugin information in the plugin
7 * admin area. This file also includes all of the dependencies used by the plugin,
8 * registers the activation and deactivation functions, and defines a function
9 * that starts the plugin.
10 *
11 * @link https://www.boltonstudios.com/read-more-wp/
12 * @since 1.0.0
13 * @package Read_More_Wp
14 *
15 * @wordpress-plugin
16 * Plugin Name: Read More WP
17 * Plugin URI: https://wordpress.org/plugins/read-more-wp/
18 * Description: Create excerpts and hide text with an elegant toggle button to show more.
19 * Version: 1.1.6
20 * Author: Aaron Bolton
21 * Author URI: https://www.boltonstudios.com/read-more-wp/
22 * License: GPL-2.0+
23 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
24 * Text Domain: read-more-wp
25 * Domain Path: /languages
26 *
27 */
28 // If this file is called directly, abort.
29 if ( !defined( 'WPINC' ) ) {
30 die;
31 }
32 // The Freemius SDK comes with a special mechanism to auto deactivate the free version when activating the paid one.
33 if ( function_exists( 'rmwp_fs' ) ) {
34 rmwp_fs()->set_basename( false, __FILE__ );
35 } else {
36 /**
37 * Current plugin version.
38 * Start at version 1.0.0 and use SemVer - https://semver.org
39 * Rename this for your plugin and update it as you release new versions.
40 */
41 define( 'READ_MORE_WP_VERSION', '1.1.6' );
42 define( 'READ_MORE_WP_BASENAME', plugin_basename( __FILE__ ) );
43 /**
44 * The code that runs during plugin activation.
45 * This action is documented in includes/class-read-more-wp-activator.php
46 */
47 function activate_read_more_wp() {
48 require_once plugin_dir_path( __FILE__ ) . 'includes/class-read-more-wp-activator.php';
49 Read_More_Wp_Activator::rmwp_activate();
50 }
51
52 /**
53 * The code that runs during plugin deactivation.
54 * This action is documented in includes/class-read-more-wp-deactivator.php
55 */
56 function deactivate_read_more_wp() {
57 require_once plugin_dir_path( __FILE__ ) . 'includes/class-read-more-wp-deactivator.php';
58 Read_More_Wp_Deactivator::rmwp_deactivate();
59 }
60
61 register_activation_hook( __FILE__, 'activate_read_more_wp' );
62 register_deactivation_hook( __FILE__, 'deactivate_read_more_wp' );
63 /**
64 * The core plugin class that is used to define internationalization,
65 * admin-specific hooks, and public-facing site hooks.
66 */
67 require plugin_dir_path( __FILE__ ) . 'includes/class-read-more-wp.php';
68 if ( !function_exists( 'rmwp_fs' ) ) {
69 // Create a helper function for easy SDK access.
70 function rmwp_fs() {
71 global $rmwp_fs;
72 if ( !isset( $rmwp_fs ) ) {
73 // Include Freemius SDK.
74 require_once dirname( __FILE__ ) . '/freemius/start.php';
75 $rmwp_fs = fs_dynamic_init( array(
76 'id' => '12677',
77 'slug' => 'read-more-wp',
78 'premium_slug' => 'read-more-wp-plus',
79 'type' => 'plugin',
80 'public_key' => 'pk_42b15e73d8e69906aae9a2d9ecfd9',
81 'is_premium' => false,
82 'premium_suffix' => 'Plus',
83 'has_addons' => false,
84 'has_paid_plans' => true,
85 'menu' => array(
86 'slug' => 'read-more-wp',
87 'contact' => false,
88 'support' => false,
89 'parent' => array(
90 'slug' => 'options-general.php',
91 ),
92 ),
93 'is_live' => true,
94 ) );
95 }
96 return $rmwp_fs;
97 }
98
99 // Init Freemius.
100 rmwp_fs();
101 // Signal that SDK was initiated.
102 do_action( 'rmwp_fs_loaded' );
103 }
104 /**
105 * Begins execution of the plugin.
106 *
107 * Since everything within the plugin is registered via hooks,
108 * then kicking off the plugin from this point in the file does
109 * not affect the page life cycle.
110 *
111 * @since 1.0.0
112 */
113 function run_read_more_wp() {
114 // Load the essential plugin features.
115 $plugin = new Read_More_Wp(READ_MORE_WP_BASENAME);
116 // Execute all of the plugin hooks with WordPress.
117 $plugin->rmwp_run();
118 }
119
120 // Start the plugin.
121 run_read_more_wp();
122 }