PluginProbe ʕ •ᴥ•ʔ
Pods – Custom Content Types and Fields / trunk
Pods – Custom Content Types and Fields vtrunk
trunk 1.14.8 2.7.31.3 2.8.23.3 2.9.19.3 3.0.10.3 3.1.4.1 3.2.0 3.2.1 3.2.1.1 3.2.2 3.2.4 3.2.5 3.2.6 3.2.7 3.2.7.1 3.2.8 3.2.8.1 3.2.8.2 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9
pods / src / Pods / Blocks / Blocks_Interface.php
pods / src / Pods / Blocks Last commit date
Collections 4 months ago Types 4 months ago API.php 4 months ago Blocks_Abstract.php 4 months ago Blocks_Interface.php 4 months ago Service_Provider.php 4 months ago
Blocks_Interface.php
84 lines
1 <?php
2
3 namespace Pods\Blocks;
4
5 // Don't load directly.
6 if ( ! defined( 'ABSPATH' ) ) {
7 die( '-1' );
8 }
9
10 /**
11 * Blocks interface.
12 *
13 * @credit The Events Calendar team - https://github.com/the-events-calendar/tribe-common
14 *
15 * @since 3.0
16 */
17 interface Blocks_Interface {
18 /**
19 * Which is the name/slug of this block
20 *
21 * @since 3.0
22 *
23 * @return string
24 */
25 public function slug();
26
27 /**
28 * Which is the name/slug of this block
29 *
30 * @since 3.0
31 *
32 * @return string
33 */
34 public function name();
35
36 /**
37 * What are the default attributes for this block
38 *
39 * @since 3.0
40 *
41 * @return array
42 */
43 public function default_attributes();
44
45 /**
46 * Since we are dealing with a Dynamic type of Block we need a PHP method to render it
47 *
48 * @since 3.0
49 *
50 * @param array $attributes
51 *
52 * @return string
53 */
54 public function render( $attributes = [] );
55
56 /**
57 * Does the registration for PHP rendering for the Block, important due to been
58 * an dynamic Block
59 *
60 * @since 3.0
61 *
62 * @return void
63 */
64 public function register();
65
66 /**
67 * Used to include any Assets for the Block we are registering
68 *
69 * @since 3.0
70 *
71 * @return void
72 */
73 public function assets();
74
75 /**
76 * Attach any specific hook to the current block.
77 *
78 * @since 3.0
79 *
80 * @return mixed
81 */
82 public function hook();
83 }
84