Plugin Directory

Changeset 2201895


Ignore:
Timestamp:
11/27/2019 10:00:01 AM (6 years ago)
Author:
flei
Message:

fix: plugin disabled for ajax requests to wp admin backend

Location:
admin-columns-for-acf-fields/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • admin-columns-for-acf-fields/trunk/acf_admin_columns.php

    r2170806 r2201895  
    44 * Plugin URI: https://wordpress.org/plugins/acf-admin-columns/
    55 * Description: Add columns for your ACF fields to post and taxonomy index pages in the WP backend.
    6  * Version: 0.1
     6 * Version: 0.1.1
    77 * Author: Florian Eickhorst
    88 * Author URI: http://www.fleimedia.com/
     
    503503}
    504504
    505 if (is_admin()) {
     505if (is_admin() && !wp_doing_ajax()) {
    506506    $flei_acf_admin_columns = FleiACFAdminColumns::get_instance();
    507507}
  • admin-columns-for-acf-fields/trunk/readme.txt

    r2170806 r2201895  
    1 # Admin Columns for ACF Fields #
     1=== Admin Columns for ACF Fields ===
    22
    33Contributors: flei
    44Tags: advanced custom fields, acf, admin columns
    55Requires at least: 4.6
    6 Tested up to: 5.1.1
     6Tested up to: 5.3
    77Stable tag: 4.3
    88Requires PHP: 5.2.4
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
    11 Date: 01.10.2019
    12 Version: 0.1
     11Date: 27.11.2019
     12Version: 0.1.1
    1313
    1414
    1515Allows you to enable columns for your ACF fields in post and taxonomy overviews (e.g. "All Posts") in the Wordpress admin backend. This plugin requires a recent version of plugin "Advanced Custom Fields" (ACF).
    1616
    17 ## Description ##
     17== Description ==
    1818
    1919Use this plugin to show ACF fields in the "All Posts" table view in the Wordpress admin backend.
     
    2121Simply enable the new option "Admin Column" in your ACF field settings for any regular field (see exceptions below). Now there will be an extra column for your field shown in any overview of posts, pages, taxonomies or your custom post types or taxonomies (e.g. "All Pages").
    2222
    23 You can use filters (see below) to control the plugin's behaviour even more precisely.
     23You can use filters (see below) to control the plugins behaviour even more precisely.
    2424
    2525Works on any regular ACF field (see exceptions below).
     
    2727Compatible with Advanced Custom Fields 5.x
    2828
    29 Github: https://www.github.com/fleiflei/
     29Github: https://github.com/fleiflei/acf-admin-columns
    3030
    31 ## Usage: ##
     31== Screenshots ==
     32
     331. Example of various admin columns for Posts
     34
     352. New settings within the ACF field settings UI
     36
     37== Usage: ==
    3238
    33391. Install ACF and this plugin (see below)
     
    38446. Save the field group and go to the overview page of the post type or taxonomy (e.g. "Posts > All Posts", or "Pages > All Pages") that you noted above and notice the newly added column for your field.
    3945
    40 ## Advanced Usage ##
     46== Advanced Usage ==
    4147
    42 ### Excluded ACF Fields ###
     48= Excluded ACF Fields =
    4349
    4450Due to their nature the option "Admin Column" is not shown in ACF for these fields:
     
    5359 - Tab
    5460
    55 ### Change how the returned column value is displayed ###
    56 Use filter "acf/admin_columns/$field_name" to alter the value that is returned
     61== Filters ==
    5762
    58 ## Filters ##
    59 ### acf/admin_columns/admin_columns ###
     63= "acf/admin_columns/admin_columns" =
    6064Allows you to change which columns are displayed on the current admin screen.
    6165
    62 #### Parameters ####
    63 $fields - Array of all ACF fields to be shown in current screen. 
     66** Parameters **
     67    $fields - Array of all ACF fields to be shown in current screen.
    6468
    65 ### acf/admin_columns/sortable_columns ###
     69** Example: **
     70
     71    function my_admin_columns($fields) {
     72      $fields['my_field'] = 'my_field';
     73    }
     74    add_filter('acf/admin_columns/admin_columns','my_admin_columns');
     75
     76= "acf/admin_columns/sortable_columns" =
    6677Change which columns should be sortable. By default every column is sortable.
    6778
    68 #### Parameters ####
     79** Parameters **
    6980$columns - Array of all ACF fields to be shown in current screen. 
    7081
    71 ### acf/admin_columns/column/$field ###
     82= "acf/admin_columns/column/$field" =
    7283Allows you to modify the output of a certain $field in every row of a posts table.
    7384
    74 #### Parameters ####
     85** Parameters **
    7586$field_value - The field value   
    7687
    77 
    78 ## Installation ##
     88== Installation ==
    7989
    8090This section describes how to install the plugin and get it working.
     
    8797
    8898None yet, feel free to ask.
     99
     100== Changelog ==
     101
     102= 0.1.1 =
     103* Release date: 27.11.2019 *
     104
     105* Fix: disable plugin for AJAX requests (see https://github.com/fleiflei/acf-admin-columns/issues/2)
     106* Documentation: screenshot added, formatting and content updates
Note: See TracChangeset for help on using the changeset viewer.