Skip to content

Commit f1c7b42

Browse files
committed
🔥 Remove deprecated Admin Columns support
1 parent a50e5b9 commit f1c7b42

File tree

1 file changed

+1
-25
lines changed

1 file changed

+1
-25
lines changed

plugin.php

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Plugin Name: Advanced Custom Fields: Phone Number
55
* Plugin URI: https://github.com/log1x/acf-phone-number
66
* Description: A real ACF phone number field.
7-
* Version: 1.2.6
7+
* Version: 1.3.0
88
* Author: Brandon Nifong
99
* Author URI: https://github.com/log1x
1010
*/
@@ -36,10 +36,6 @@ public function __invoke()
3636
}
3737

3838
$this->register();
39-
40-
if (defined('ACP_FILE')) {
41-
$this->hookAdminColumns();
42-
}
4339
}
4440

4541
/**
@@ -60,24 +56,4 @@ protected function register()
6056
return (new PhoneNumber($value))->toArray();
6157
}, 10, 4);
6258
}
63-
64-
/**
65-
* Hook the Admin Columns Pro plugin to provide basic field support
66-
* if detected on the current WordPress installation.
67-
*
68-
* @return void
69-
*/
70-
protected function hookAdminColumns()
71-
{
72-
add_filter('ac/column/value', function ($value, $id, $column) {
73-
if (
74-
! is_a($column, '\ACA\ACF\Column') ||
75-
$column->get_acf_field_option('type') !== 'phone_number'
76-
) {
77-
return $value;
78-
}
79-
80-
return get_field($column->get_meta_key())->national ?? $value;
81-
}, 10, 3);
82-
}
8359
});

0 commit comments

Comments
 (0)