PluginProbe
Portfolio Block – show off your work with stunning layouts / trunk
Portfolio Block – show off your work with stunning layouts vtrunk
2.1.5 2.1.3 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1
portfolio-block / includes / rootPlugin / CustomColumn.php

CustomColumn.php in Portfolio Block – show off your work with stunning layouts trunk, at includes/rootPlugin/CustomColumn.php

26 lines 875 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace PFB;
3
4 class CustomColumn {
5 function __construct() {
6 add_filter('manage_pfb_posts_columns', [$this, 'managePFBPostsColumns'], 10);
7 add_action('manage_pfb_posts_custom_column', [$this, 'managePFBPostsCustomColumns'], 10, 2);
8 }
9
10 function managePFBPostsColumns($defaults){
11 unset($defaults['date']);
12 $defaults['shortcode'] = 'ShortCode';
13 $defaults['date'] = 'Date';
14 return $defaults;
15 }
16
17 function managePFBPostsCustomColumns($column_name, $post_ID){
18 if ($column_name == 'shortcode') {
19 echo '<div class="bPlAdminShortcode" id="bPlAdminShortcode-' . esc_attr($post_ID) . '">
20 <input value="[pfb id=' . esc_attr($post_ID) . ']" onclick="copyBPlAdminShortcode(\'' . esc_attr($post_ID) . '\')">
21 <span class="tooltip">' . esc_html__('Copy To Clipboard', 'portfolio-block') . '</span>
22 </div>';
23 }
24 }
25
26 }