PluginProbe
Query Loop Load More / 1.0.18
Query Loop Load More v1.0.18
trunk 0.0.99 0.0.999 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.2 1.0.3 1.0.4 1.0.5 1.0.7 1.0.8 1.0.9
query-loop-load-more / query-loop-load-more.php

query-loop-load-more.php in Query Loop Load More 1.0.18, at query-loop-load-more.php

58 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Query Loop Load More
4 * Plugin URI: https://github.com/a8cteam51/query-loop-load-more
5 * Description: Adds a load more option to the Query Loop Pagination block in Gutenberg.
6 * Short Description: Adds a load more option to the Query Loop Pagination block, allowing users to load more posts without a page refresh.
7 * Version: 1.0.18
8 * Requires at least: 6.2
9 * Tested up to: 6.9
10 * Requires PHP: 8.0
11 * Author: WordPress.com Special Projects
12 * Author URI: https://wpspecialprojects.wordpress.com
13 * License: GPLv3 or later
14 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
15 * Text Domain: query-loop-load-more
16 * Domain Path: /languages
17 *
18 * @package Query Loop Load More
19 **/
20
21 defined( 'ABSPATH' ) || exit;
22
23 // Define plugin constants.
24 define( 'WPCOMSP_QLLM_BASENAME', plugin_basename( __FILE__ ) );
25 define( 'WPCOMSP_QLLM_DIR_PATH', plugin_dir_path( __FILE__ ) );
26 define( 'WPCOMSP_QLLM_DIR_URL', plugin_dir_url( __FILE__ ) );
27
28 // Load the rest of the bootstrap functions.
29 require_once WPCOMSP_QLLM_DIR_PATH . '/functions-bootstrap.php';
30
31 // Load plugin translations so they are available even for the error admin notices.
32 add_action(
33 'init',
34 static function () {
35 load_plugin_textdomain(
36 wpcomsp_qllm_get_plugin_metadata( 'TextDomain' ),
37 false,
38 dirname( WPCOMSP_QLLM_BASENAME ) . wpcomsp_qllm_get_plugin_metadata( 'DomainPath' )
39 );
40 }
41 );
42
43 // Load the autoloader.
44 if ( ! is_file( WPCOMSP_QLLM_DIR_PATH . '/vendor/autoload.php' ) ) {
45 wpcomsp_qllm_output_requirements_error( new WP_Error( 'missing_autoloader' ) );
46 return;
47 }
48 require_once WPCOMSP_QLLM_DIR_PATH . '/vendor/autoload.php';
49
50 // Bootstrap the plugin (maybe)!
51 define( 'WPCOMSP_QLLM_REQUIREMENTS', wpcomsp_qllm_validate_requirements() );
52 if ( is_wp_error( WPCOMSP_QLLM_REQUIREMENTS ) ) {
53 wpcomsp_qllm_output_requirements_error( WPCOMSP_QLLM_REQUIREMENTS );
54 } else {
55 require_once WPCOMSP_QLLM_DIR_PATH . '/functions.php';
56 add_action( 'plugins_loaded', array( wpcomsp_qllm_get_plugin_instance(), 'maybe_initialize' ) );
57 }
58