PluginProbe
JetFormBuilder — Dynamic Blocks Form Builder / 3.6.6
JetFormBuilder — Dynamic Blocks Form Builder v3.6.6
3.6.6.1 3.6.6 3.6.5.4 3.6.5.3 3.6.5.2 3.6.5.1 3.6.5 3.6.4.2 3.6.4.1 3.6.4 3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 All 134 releases
jetformbuilder / components / admin / page / traits / action-page-trait.php

action-page-trait.php in JetFormBuilder — Dynamic Blocks Form Builder 3.6.6, at components/admin/page/traits/action-page-trait.php

48 lines 719 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3
4 namespace JFB_Components\Admin\Page\Traits;
5
6 // If this file is called directly, abort.
7 if ( ! defined( 'WPINC' ) ) {
8 die;
9 }
10
11 trait Action_Page_Trait {
12
13 public function rep_item_id() {
14 return $this->slug();
15 }
16
17 public function get_url( $query_args = array() ): string {
18 return $this->admin_url(
19 array_merge(
20 array(
21 'slug' => $this->slug(),
22 ),
23 $query_args
24 )
25 );
26 }
27
28 /**
29 * Returns current page url
30 *
31 * @param array $query_args
32 *
33 * @return string
34 */
35 public function admin_url( $query_args = array() ): string {
36 return add_query_arg(
37 array_merge(
38 array(
39 'action' => 'jfb',
40 ),
41 $query_args
42 ),
43 esc_url_raw( admin_url( 'admin.php' ) )
44 );
45 }
46
47 }
48