PluginProbe ʕ •ᴥ•ʔ
Pods – Custom Content Types and Fields / 3.2.8.4
Pods – Custom Content Types and Fields v3.2.8.4
2.7.31.4 2.8.23.5 2.9.19.5 3.0.10.5 3.1.4.3 3.2.8.4 3.3.9.2 2.8.23.4 2.9.19.4 3.0.10.4 3.1.4.2 3.2.8.3 3.3.9.1 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 / Whatsit / Block_Collection.php
pods / src / Pods / Whatsit Last commit date
Storage 1 week ago Block.php 1 week ago Block_Collection.php 1 week ago Block_Field.php 1 week ago Field.php 1 week ago Group.php 1 week ago Legacy_Object.php 1 week ago Object_Field.php 1 week ago Page.php 1 week ago Pod.php 1 week ago Storage.php 1 week ago Store.php 1 week ago Template.php 1 week ago
Block_Collection.php
65 lines
1 <?php
2
3 namespace Pods\Whatsit;
4
5 use Pods\Whatsit;
6
7 /**
8 * Block Collection class.
9 *
10 * @since 2.8.0
11 */
12 class Block_Collection extends Pod {
13
14 /**
15 * {@inheritdoc}
16 */
17 protected static $type = 'block-collection';
18
19 /**
20 * Get list of Block Collection API arguments to use.
21 *
22 * @since 2.8.0
23 *
24 * @return array List of Block Collection API arguments.
25 */
26 public function get_block_collection_args() {
27 $namespace = $this->get_arg( 'namespace', 'pods' );
28
29 // Block collections are only allowed A-Z0-9- characters, no underscores.
30 $namespace = str_replace( '_', '-', sanitize_title_with_dashes( $namespace ) );
31
32 return [
33 'namespace' => $namespace,
34 'title' => $this->get_arg( 'title', $this->get_arg( 'label' ) ),
35 'icon' => $this->get_arg( 'icon', '' ),
36 ];
37 }
38
39 /**
40 * {@inheritdoc}
41 */
42 public function get_args() {
43 $args = Whatsit::get_args();
44
45 // Pods generally have no parent, group, or order.
46 unset( $args['parent'], $args['group'] );
47
48 return $args;
49 }
50
51 /**
52 * {@inheritdoc}
53 */
54 public function get_fields( array $args = [] ) {
55 return [];
56 }
57
58 /**
59 * {@inheritdoc}
60 */
61 public function get_table_info() {
62 return [];
63 }
64 }
65