PluginProbe ʕ •ᴥ•ʔ
Admin Columns / 2.4.6
Admin Columns v2.4.6
7.0.19 2.3.5 2.4 2.4.1 2.4.10 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.6.1 2.5.6.2 2.5.6.3 2.5.6.4 3.0 3.0.1 3.0.2 3.0.3 3.0.5 3.0.7 3.1 3.1.1 3.1.10 3.1.2 3.1.3 3.1.5 3.2.3 3.2.7 3.3.1 3.4.1 3.4.6 3.4.8 4.0.1 4.0.3 4.1.6 4.2.2 4.2.5 4.3 4.3.2 4.4.1 4.4.4 4.4.5 4.5.5 4.6.1 4.7.18 4.7.19 4.7.20 4.7.7 7.0.13 7.0.14 7.0.16 trunk 1.0 1.1 1.1.3 1.2 1.2.1 1.3 1.3.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.5.1 1.4.6 1.4.6.1 1.4.6.2 1.4.6.3 1.4.6.4 1.4.7 1.4.8 1.4.9 2.0.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2 2.2.1 2.2.1.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.5.1 2.2.6 2.2.6.1 2.2.6.2 2.2.6.3 2.2.6.4 2.2.7 2.2.8 2.2.8.1 2.2.9 2.3.1 2.3.2 2.3.3
codepress-admin-columns / api.php
codepress-admin-columns Last commit date
assets 10 years ago classes 10 years ago external 10 years ago includes 10 years ago languages 10 years ago api.php 10 years ago codepress-admin-columns.php 10 years ago readme.txt 10 years ago
api.php
37 lines
1 <?php
2 /**
3 * If you like to register a column of your own please have a look at our documentation.
4 * We also have a free start-kit available, which contains all the necessary files.
5 *
6 * Documentation: https://www.admincolumns.com/documentation/developer-docs/creating-new-column-type/
7 * Starter-kit: https://github.com/codepress/cac-column-template/
8 *
9 */
10
11 /**
12 * Manually set the columns for a storage model
13 * This overrides the database settings and thus renders the settings screen for this storage model useless
14 *
15 * @since 2.2
16 *
17 * @param string $storage_model Storage model key
18 * @param array $columns List of columns ([column_name] => [column_options])
19 */
20 function ac_register_columns( $storage_model, $columns ) {
21 global $_cac_exported_columns;
22
23 $storage_models = (array) $storage_model;
24
25 foreach ( $storage_models as $storage_model ) {
26 if ( isset( $_cac_exported_columns[ $storage_model ] ) ) {
27 $_cac_exported_columns[ $storage_model ] = array_merge( $_cac_exported_columns[ $storage_model ], $columns );
28 }
29 else {
30 $_cac_exported_columns[ $storage_model ] = $columns;
31 }
32 }
33 }
34
35 function cpac_set_storage_model_columns( $storage_model, $columns ) {
36 ac_register_columns( $storage_model, $columns );
37 }