summaryrefslogtreecommitdiff
path: root/draggable-post-order.php
blob: 026b1c10f2df8c27a754ef0f82df397f548728c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
 * Draggable Post Order
 *
 * @package Draggable_Post_Order
 */

/**
 * Plugin Name: Draggable Post Order
 * Description: Drag'n'drop posts to order them
 * Plugin URI: https://gitlab.com/DRogueRonin/wp-plugin-draggable-post-order
 * Author: Daniel Weipert
 * Version: 1.0.0
 * Author URI: https://dweipert.de
 * Text Domain: draggable-post-order
 * Domain Path: /languages
 */

require __DIR__ . '/vendor/autoload.php';

/**
 * Callback for "init" action.
 */
function draggable_post_order() {
	\Draggable_Post_Order\Draggable_Post_Order::init();
}
add_action( 'init', 'draggable_post_order' );

/**
 * URL to enqueue scripts and styles.
 *
 * @param string $path Relative path inside the build folder.
 *
 * @return string
 */
function draggable_post_order_assets_url( $path ) {
	return plugin_dir_url( __FILE__ ) . "build/$path";
}

/**
 * Absolute path to plugin folder.
 *
 * @return string
 */
function draggable_post_order_path() {
	return plugin_dir_path( __FILE__ );
}