PluginProbe ʕ •ᴥ•ʔ
Permalink Manager Lite / 2.2.12
Permalink Manager Lite v2.2.12
2.5.4 2.5.3.4 2.2.18 2.2.19.2 2.2.19.3 2.2.19.3.1 2.2.2 2.2.20 2.2.20.1 2.2.20.3 2.2.4 2.2.5 2.2.6 2.2.7.2 2.2.7.3 2.2.7.5 2.2.7.6 2.2.8.4 2.2.8.5 2.2.8.6 2.2.8.7 2.2.8.9 2.2.9.1 2.2.9.2 2.2.9.2.1 2.2.9.3 2.2.9.4 2.2.9.6 2.2.9.7 2.2.9.9 2.3.0 2.3.1.1 2.4.0 2.4.1 2.4.1.2 2.4.1.3 2.4.1.4 2.4.1.5 2.4.1.6 2.4.2 2.4.2.1 2.4.3 2.4.3.1 2.4.3.2 2.4.3.3 2.4.3.4 2.4.4 2.4.4.1 2.4.4.2 2.4.4.3 2.5.0 2.5.1 2.5.1.1 2.5.1.2 2.5.1.3 2.5.1.4 2.5.2 2.5.2.1 2.5.2.2 2.5.2.3 2.5.2.4 2.5.3 2.5.3.1 2.5.3.2 2.5.3.3 trunk 0.2 0.3 0.3.1 0.3.2 0.3.3 0.3.4 0.4 0.4.1 0.4.2 0.4.3 0.4.4 0.4.6 0.4.7 0.4.8 0.4.9 0.5.3 0.5.4 1.0.0 1.0.1 1.0.4 1.1.0 1.1.1 1.1.2 1.11.6.3 2.0.0 2.0.3 2.0.4 2.0.4.3 2.0.5.1 2.0.5.2 2.0.5.3 2.0.5.3.1 2.0.5.4 2.0.5.4a 2.0.5.5 2.0.5.6 2.0.5.6.1 2.0.5.7 2.0.5.9a 2.0.6.2.1 2.0.6.2a 2.0.6.3 2.1.0 2.1.1 2.1.2.4 2.2.0 2.2.1.1 2.2.1.2 2.2.11 2.2.12 2.2.13.1 2.2.14 2.2.15.1 2.2.16 2.2.17
permalink-manager / includes / core / permalink-manager-gutenberg.php
permalink-manager / includes / core Last commit date
permalink-manager-actions.php 4 years ago permalink-manager-admin-functions.php 4 years ago permalink-manager-core-functions.php 4 years ago permalink-manager-debug.php 4 years ago permalink-manager-gutenberg.php 4 years ago permalink-manager-helper-functions.php 4 years ago permalink-manager-language-plugins.php 4 years ago permalink-manager-third-parties.php 4 years ago permalink-manager-uri-functions-post.php 4 years ago permalink-manager-uri-functions.php 4 years ago
permalink-manager-gutenberg.php
51 lines
1 <?php
2
3 /**
4 * Additional hooks for "Permalink Manager Pro"
5 */
6 class Permalink_Manager_Gutenberg extends Permalink_Manager_Class {
7
8 public function __construct() {
9 add_action('enqueue_block_editor_assets', array($this, 'init'));
10
11 // add_action('wp_ajax_pm_get_uri_editor', array($this, 'get_uri_editor'));
12 // add_action('wp_ajax_nopriv_pm_get_uri_editor', array($this, 'get_uri_editor'));
13 }
14
15 public function init() {
16 global $current_screen, $post;
17
18 // Get displayed post type
19 if(empty($current_screen->post_type)) { return; }
20 $post_type = $current_screen->post_type;
21
22 // Stop the hook (if needed)
23 $show_uri_editor = apply_filters("permalink_manager_show_uri_editor_post_{$post->post_type}", true, $post);
24 if(!$show_uri_editor) {
25 return;
26 }
27
28 // Check if the post is excluded
29 if(!empty($post->ID) && Permalink_Manager_Helper_Functions::is_post_excluded($post)) {
30 return;
31 }
32
33 add_meta_box('permalink-manager', __('Permalink Manager', 'permalink-manager'), array($this, 'get_uri_editor'), '', 'side', 'high' );
34 // wp_enqueue_script('permalink-manager-gutenberg', PERMALINK_MANAGER_URL . '/out/permalink-manager-gutenberg.js', array('wp-plugins', 'wp-edit-post', 'wp-i18n', 'wp-element'));
35 }
36
37 public function get_uri_editor($post = null) {
38 if(empty($post->ID) && empty($_REQUEST['post_id'])) {
39 return '';
40 } else if(!empty($_REQUEST['post_id'])) {
41 $post = get_post($_REQUEST['post_id']);
42 }
43
44 // Display URI Editor
45 echo Permalink_Manager_Admin_Functions::display_uri_box($post, true);
46 }
47
48 }
49
50 ?>
51