Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'job_manager_job_dashboard_column_c27_listing_logo', function( $listing ) {
- global $wp_filter;
- if ( ! ( $listing = \MyListing\Src\Listing::get( $listing ) ) ) {
- return false;
- }
- $images = get_post_meta( $listing->get_id(), '_job_gallery', true );
- if ( is_array( $images ) && ! empty( $images ) ) {
- $image_url = $images[0];
- echo '<img src="' . esc_url( $image_url ) . '" width="32" height="32">';
- }
- // Remove default Filters
- $filters =& $wp_filter['job_manager_job_dashboard_column_c27_listing_logo'];
- if ( count( $filters->callbacks ) <= 1 ) {
- return null;
- }
- $this_filter = true;
- foreach ( $filters as $key => $value ) {
- if ( $this_filter ) {
- $this_filter = false;
- continue;
- }
- foreach( $value as $filter_name => $filter ) {
- remove_action( 'job_manager_job_dashboard_column_c27_listing_logo', $filter['function'] );
- }
- }
- }, 1 );
Add Comment
Please, Sign In to add comment