PluginProbe ʕ •ᴥ•ʔ
Permalink Manager Lite / 2.2.9.7
Permalink Manager Lite v2.2.9.7
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 5 years ago permalink-manager-admin-functions.php 5 years ago permalink-manager-core-functions.php 5 years ago permalink-manager-debug.php 5 years ago permalink-manager-gutenberg.php 5 years ago permalink-manager-helper-functions.php 5 years ago permalink-manager-language-plugins.php 5 years ago permalink-manager-third-parties.php 5 years ago permalink-manager-uri-functions-post.php 5 years ago permalink-manager-uri-functions.php 5 years ago
permalink-manager-gutenberg.php
47 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;
17
18 // Get displayed post type
19 if(empty($current_screen->post_type)) { return; }
20 $post_type = $current_screen->post_type;
21
22 // Check if post type is disabled
23 if(Permalink_Manager_Helper_Functions::is_disabled($post_type, 'post_type')) { return; }
24
25 // Stop the hook (if needed)
26 $show_uri_editor = apply_filters("permalink_manager_hide_uri_editor_post_{$post_type}", true);
27 if(!$show_uri_editor) { return; }
28
29 add_meta_box('permalink-manager', __('Permalink Manager', 'permalink-manager'), array($this, 'get_uri_editor'), '', 'side', 'high' );
30 // wp_enqueue_script('permalink-manager-gutenberg', PERMALINK_MANAGER_URL . '/out/permalink-manager-gutenberg.js', array('wp-plugins', 'wp-edit-post', 'wp-i18n', 'wp-element'));
31 }
32
33 public function get_uri_editor($post = null) {
34 if(empty($post->ID) && empty($_REQUEST['post_id'])) {
35 return '';
36 } else if(!empty($_REQUEST['post_id'])) {
37 $post = get_post($_REQUEST['post_id']);
38 }
39
40 // Display URI Editor
41 echo Permalink_Manager_Admin_Functions::display_uri_box($post, true);
42 }
43
44 }
45
46 ?>
47