PluginProbe ʕ •ᴥ•ʔ
JetFormBuilder — Dynamic Blocks Form Builder / 3.5.6.3
JetFormBuilder — Dynamic Blocks Form Builder v3.5.6.3
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 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.1.0 2.1.1 2.1.10 2.1.11 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 3.0.0 3.0.0.1 3.0.0.2 3.0.0.3 3.0.1 3.0.1.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.0.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.2.2 3.2.3 3.3.0 3.3.1 3.3.2 3.3.3 3.3.3.1 3.3.4 3.3.4.1 3.3.4.2 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.5.1 3.4.5.2 3.4.6 3.4.7 3.4.7.1 3.5.0 3.5.1 3.5.1.1 3.5.1.2 3.5.2 3.5.2.1 3.5.3 3.5.4 3.5.5 3.5.6 3.5.6.1 3.5.6.2 3.5.6.3 3.6.0
jetformbuilder / modules / actions-v2 / insert-term / properties / base-term-action.php
jetformbuilder / modules / actions-v2 / insert-term / properties Last commit date
abstract-term-modifier.php 1 year ago base-term-action.php 1 year ago insert-action.php 1 year ago term-id-property.php 1 year ago term-meta-property.php 1 year ago term-modifier.php 1 year ago term-name-property.php 1 year ago term-parent-id-property.php 1 year ago term-slug-property.php 1 year ago term-taxonomy-property.php 1 year ago update-action.php 6 months ago
base-term-action.php
66 lines
1 <?php
2
3 namespace JFB_Modules\Actions_V2\Insert_Term\Properties;
4
5 use Jet_Form_Builder\Actions\Methods\Base_Modifier_Action;
6
7 // If this file is called directly, abort.
8 if ( ! defined( 'WPINC' ) ) {
9 die;
10 }
11
12 abstract class Base_Term_Action extends Base_Modifier_Action {
13
14 protected $inserted_id = 0;
15
16 /**
17 * Inserted ID getter.
18 *
19 * @return integer
20 */
21 public function get_inserted_id(): int {
22 return $this->inserted_id;
23 }
24
25 public function do_after() {
26 if ( ! $this->inserted_id ) {
27 return;
28 }
29
30 /**
31 * Perform any actions after term inserted/updated
32 */
33 do_action(
34 'jet-form-builder/action/after-term-' . $this->get_id(),
35 jet_fb_action_handler()->get_current_action(),
36 jet_fb_action_handler(),
37 $this
38 );
39 }
40
41 public function pre_check(): bool {
42 return apply_filters(
43 'jet-form-builder/action/insert-term/pre-check',
44 true,
45 $this->modifier->source_arr,
46 jet_fb_action_handler()->get_current_action()
47 );
48 }
49
50 public function get_inserted(): int {
51 return $this->inserted_id;
52 }
53
54 public function user_can_manage_taxonomy_terms( $taxonomy ) {
55 $taxonomy_object = get_taxonomy( $taxonomy );
56
57 if ( ! $taxonomy_object ) {
58 return false;
59 }
60
61 $capability = $taxonomy_object->cap->edit_terms;
62
63 return current_user_can( $capability );
64 }
65 }
66