• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

[oik] plugins.com

WordPress plugins and themes

  • About
    • lazy shortcodes
    • smart shortcodes
    • oik base plugin
      • oik – donate
      • oik PayPal buttons
      • oik installation
      • oik Button Shortcode button
      • oik changelog
      • oik FAQ
      • oik plugins on SVN
      • oik plugins on GitHub
  • Plugins
    • oik base plugin
    • FREE oik plugins
    • WordPress plugins
    • Premium oik plugins
    • Bespoke oik plugins
  • Shortcodes
    • Shortcode examples
  • Blocks
    • Block examples
  • APIs
    • ALL action and filter hooks
  • Blog

oik_ids_loaded() – Function to invoke when oik-ids is loaded

You appear to be a bot. Output may be restricted

Description

Function to invoke when oik-ids is loaded

Define action and filter hooks to include the ID column in the admin list page for various content types, except comments. We also make the ID field sortable. In the codex we get told that the manage_edit-post_type_columns filter has been supplanted by manage_{$post_type}_posts_columns So what about the filter for custom post types? http://codex.wordpress.org/Plugin_API/Action_Reference/manage_$post_type_posts_custom_column For custom post types we see the following actions/filters

  • [manage_edit-oik_location_columns] => 1
  • [manage_taxonomies_for_oik_location_columns] => 2
  • [manage_posts_columns] => 2
  • [manage_oik_location_posts_columns] => 2
Whether or not it's more efficient to respond to the action for the particular 'screen' has not been determined BUT we're doing it anyway.
URI action Invoked for
edit.php load-edit.php posts, pages and CPTs
edit-tags.php load-edit-tags.php taxonomies
upload.php load-upload.php media attachments
link-manager.php load-link-manager.php links
users.php load-users.php users
The most efficient method would be to dynamically define the function to match the action e.g. oik_ids_load_edit – for "load_edit" IF the function exists AND we know the screen->id. which we can get from the first file loaded?
$_SERVER[ 'REQUEST_URI' ] = /wordpress/wp-admin/users.php 
$_SERVER[ 'SCRIPT_FILENAME ' ] 
$_SERVER[ 'PHP_SELF' ] 
$_SERVER[ 'SCRIPT_NAME' ] 
admin.php uses $pagenow – which is set to the URI without the prefix

Usage

oik_ids_loaded();

Parameters

Returns

void

TO DO

Can we make media sortable by adding logic when handling manager_media_columns ? Ditto for post http://codex.wordpress.org/Plugin_API/Filter_Reference/manage_edit-post_type_columns

Source

File name: oik/oik-ids.php
Lines:
1 to 10 of 10
function oik_ids_loaded() {
  global $pagenow;
  if ( $pagenow ) {
    $pagenow_function = "oik_ids_load_";
    $pagenow_function .= str_replace( array( ".", "-" ), "_", $pagenow );
    if ( function_exists( $pagenow_function ) ) {
      add_action( "load-" . $pagenow, $pagenow_function );
    }
  }
}
 
 View on GitHub View on Trac

Published: February 2, 2018 | Last updated: February 2, 2018

Primary Sidebar

Information

Function name: oik_ids_loaded
Plugin ref: oik – oik information kit
Version: 4.16.0
Sourcefile: oik-ids.php
File ref: oik-ids.php
Deprecated?: No
API Letters: I,L,O

Recent plugin updates

oik-fields v1.55.1
oik-fields v1.55.1 oik-fields v1.55.1 has been tested with WordPress 7.1. ...
oik v4.16.0
oik v4.16.0 Upgrade to oik v4.16.0 for many accessibility (a11y) improvements for both the front end and admin areas, plus a security fix. ...
oik-fields v1.55.0
oik-fields v1.55.0 Upgrade to oik-fields v1.55.0 for accessibility improvements to the featured image virtual field. ...
oik-css v2.4.0
oik-css v2.4.0 Upgrade to oik-css v2.4.0 for accessibility improvements for Low Color Contrast errors. ...
oik-unloader v0.4.0
oik-unloader v0.4.0 Update to oik-unloader v0.4.0 for improved accessibility of the active-plugins shortcode. Tested with WordPress 6.9 and PHP 8.4 ...

Footer

Plugins

  • All Plugins
  • oik base plugin
  • FREE oik plugins
  • WordPress plugins
  • Premium oik plugins

Themes

  • FREE themes
  • Bespoke themes
  • Premium themes

Blocks

  • All Blocks
  • Block examples
  • About Blocks

Shortcodes

  • All Shortcodes
  • Shortcode examples
  • About Shortcodes

Reference

  • About APIs
  • All APIs
  • All Classes
  • All Files
  • All Hooks

Support

  • Contact
  • Cookies policy
  • Get API key
  • Privacy
  • Request support
  • Sitemap
  • Stay informed
  • Terms and Conditions
oik-plugins
Email: herb@bobbingwide.com

Weight shipping plugins

Find out which cart weight shipping plugin you need for your WooCommerce site.
Which cart weight based plugin do I need?

Site:  www.oik-plugins.com
© Copyright oik-plugins 2011-2026. All rights reserved.


Website designed and developed by Herb Miller of Bobbing Wide
Proudly powered by WordPress and oik-plugins

WordPress version: 7.1.2

Gutenberg version: 24.0.0

PHP version: 8.2.35