Tag Info

Hot answers tagged

8

"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay." -The Adventure of the Copper Beeches So let's gather some real data from an install with no plugins and the TwentyTwelve theme activated with only a single Text widget. For the home page the following do_action calls are made in the following order: muplugins_loaded ...


3

This is the filter: "plugin_install_action_links". You can find this in /wp-admin/includes/class-wp-plugin-install-list-table.php (currently) at line 434: $action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin ); Use it like: add_filter( 'plugin_install_action_links', 'my_custom_links', 10, 2 ); function my_custom_links( ...


2

This is the filter: views_plugin-install You can find this in /wp-admin/includes/class-wp-plugin-install-list-table.php (currently) at line 226: $views = apply_filters( "views_{$this->screen->id}", $views ); Use it like: add_filter( 'views_plugin-install', 'my_filter', 10, 1 ); function my_filter( $views ){ //Do your stuff return $views; ...


2

This should be an extension to @birgire answer. One of the site members, @beultge has written a quite extensive plugin called Debug Objects One of the many functions included is printing a list of hooks and filters that is executed on a page load. PS! I don't have any affiliation to the plugin


2

If I understand well, you want to append to every post a meta value taken from another post, but the latter need to be dynamic, so not hardcoded in the function. In OP you say the post id is "user-defined". What does it exactly mean? If it is stored somewhere or it is given as query var the simplest solution is moving the code that retrieve the selected ...


1

There is admin_enqueue_scripts(): admin_enqueue_scripts is the first action hooked into the admin scripts actions. This hook provides a single parameter, the $hook_suffix for the current admin page. And it's an action it can only be used to callback a specified function. Usage like: add_action( 'admin_enqueue_scripts', 'function_name' ); The codex ...


1

I had to do this recently in a custom plugin The basic idea was this: add_action( 'wp_footer', 'create_view_entry' ) ); function create_view_entry() { $uid = get_current_user_id(); if ( $uid != 0 && is_single() ) $wpdb->insert( $this->tableName, array( 'uid' => $uid, 'pid' => $post->ID, 'date' => ...



Only top voted, non community-wiki answers of a minimum length are eligible