PluginProbe ʕ •ᴥ•ʔ
Admin Columns / 3.4.1
Admin Columns v3.4.1
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 7 years ago classes 7 years ago external 7 years ago languages 7 years ago templates 7 years ago api.php 7 years ago codepress-admin-columns.php 7 years ago readme.txt 7 years ago
api.php
121 lines
1 <?php
2
3 /**
4 * @since 3.0
5 * @return AC\AdminColumns
6 */
7 function AC() {
8 return AC\AdminColumns::instance();
9 }
10
11 /**
12 * @return bool True when Admin Columns Pro plugin is activated.
13 */
14 function ac_is_pro_active() {
15 return function_exists( 'ACP' );
16 }
17
18 /**
19 * Get the url where the Admin Columns website is hosted
20 *
21 * @param string $path
22 *
23 * @return string
24 */
25 function ac_get_site_url( $path = '' ) {
26 $url = 'https://www.admincolumns.com';
27
28 if ( ! empty( $path ) ) {
29 $url .= '/' . trim( $path, '/' ) . '/';
30 }
31
32 return $url;
33 }
34
35 /**
36 * Url with utm tags
37 *
38 * @param string $path
39 * @param string $utm_medium
40 * @param string $utm_content
41 * @param bool $utm_campaign
42 *
43 * @return string
44 */
45 function ac_get_site_utm_url( $path, $utm_medium, $utm_content = null, $utm_campaign = false ) {
46 $url = ac_get_site_url( $path );
47
48 if ( ! $utm_campaign ) {
49 $utm_campaign = 'plugin-installation';
50 }
51
52 $args = array(
53 // Referrer: plugin
54 'utm_source' => 'plugin-installation',
55
56 // Specific promotions or sales
57 'utm_campaign' => $utm_campaign,
58
59 // Marketing medium: banner, documentation or email
60 'utm_medium' => $utm_medium,
61
62 // Used for differentiation of medium
63 'utm_content' => $utm_content,
64 );
65
66 $args = array_map( 'sanitize_key', array_filter( $args ) );
67
68 return add_query_arg( $args, $url );
69 }
70
71 /**
72 * Admin Columns Twitter username
73 * @return string
74 */
75 function ac_get_twitter_handle() {
76 return 'admincolumns';
77 }
78
79 /**
80 * Simple helper methods for AC_Column objects
81 * @since 3.0
82 */
83 function ac_helper() {
84 return new AC\Helper();
85 }
86
87 /**
88 * Manually set the columns for a list screen
89 * This overrides the database settings and thus renders the settings screen for this list screen useless
90 * If you like to register a column of your own please have a look at our documentation.
91 * We also have a free start-kit available, which contains all the necessary files.
92 * Documentation: https://www.admincolumns.com/documentation/developer-docs/creating-new-column-type/
93 * Starter-kit: https://github.com/codepress/ac-column-template/
94 * @since 2.2
95 *
96 * @param array|string $list_screen_keys
97 * @param array $column_data
98 */
99 function ac_register_columns( $list_screen_keys, $column_data ) {
100 AC()->api()->load_columndata( $list_screen_keys, $column_data );
101 }
102
103 /**
104 * @param string $slug Page slug
105 *
106 * @return string
107 */
108 function ac_get_admin_url( $slug = null ) {
109 if ( null === $slug ) {
110 $slug = 'columns';
111 }
112
113 return AC()->admin()->get_url( $slug );
114 }
115
116 /**
117 * @return int
118 */
119 function ac_get_lowest_price() {
120 return 49;
121 }