Method by which plugins and themes extend core WordPress functionality.

learn more… | top users | synonyms

1
vote
0answers
13 views

put custom taxonomy slug in front of their respective term slugs

I needed to register two custom taxonomies which partly share some terms. The structure would look like this, when commerce and crafting are two different custom taxonomies: Commerce Furniture ...
1
vote
0answers
26 views

Get log of function/method calls made by do_action() on WordPress initialization

Is there any way I can get a log of the method calls that are made when do_action( 'init') is fired?
1
vote
0answers
510 views

How to set a custom path, for ajax image upload folder in admin?

I am coding my first Wordpress plugin that handles some data for a custom (shop-like) post type. It also has an image uploader within a metabox, where you simply drag in your images and it ...
1
vote
0answers
78 views

How can I register a hook for all Custom Post Types that are published?

I'm developing a plugin. I want that when every Custom Post Type is published, a hook is called (where I send an email notification to the administrator). I know I can use: ...
1
vote
0answers
63 views

I have 2 plugins using the same wp_login action hook and one is not working

so this is after a few hours investigating, I have s2member plugin and a custom plugin what happens is they are both using wp_login hook in this manner, s2member: add_action("wp_login", ...
1
vote
0answers
58 views

Add custom text in the media library image meta area

I want to add some custom text in this area in the media library: Is there a filter I could hook into or how can I add content there? If not, how do we do this using Javascript? I want the text to ...
1
vote
0answers
58 views

Issue understanding and using WordPress filters and actions

I have a custom WordPress plugin that I have developed. The plugin is a widget bundle containing a bunch of custom widgets. The scenerio The plugin allows for custom css styles through creating a ...
1
vote
0answers
92 views

Show message in media-new.php

I'm wondering if there's a way to show a specific message when user uploads a file using the wp-admin/media-new.php script. So far I have this: function my_uploads_notice(){ global $pagenow; ...
1
vote
0answers
40 views

Hooks are not being removed in child theme

I have a hook file: function load_admin_package(){ do_action('load_admin_package'); } /* * ----------------------------------- * Define hooks bellow * ----------------------------------- */ ...
1
vote
0answers
32 views

How to hook into unregistering a widget instance?

I would like to hook into a widget instance after it is removed from a sidebar panel on the Appearances -> Widgets admin page. So if the instance was an active widget and then removed, I would like ...
1
vote
0answers
97 views

Firing a function AFTER redirect

I am using a function that redirects the user to a custom page, rather than wp-login in the event of errors. In my case I am using the Http Referer function to send the user back to the same page ...
1
vote
0answers
82 views

Copy post to separate database with “add_action(…)”

I'm basically trying to have a copy of a post be sent to another database's table when it's published. I've gotten it to add a new row in the new table, with my own static arguments, but I'm not sure ...
1
vote
0answers
141 views

Hook into existing tinyMCE button

Is there a way to hook into an existing tinyMCE editor button? I have a plugin that currently has a button on the editor and it shows a popup-box when clicked. This box has tabs inside. I would like ...
1
vote
0answers
65 views

Add a new confirmation page before saving

I'm going to add a hook that does some modifications of the text before saving. Before making the changes permanent, I would like the user to confirm the changes after a "save_post" hook. Is there a ...
1
vote
0answers
114 views

Featured image upload finished hook

I'm looking for a way to hook into the process of uploading a featured image. Ideally I would want to be able to do some stuff right when the upload has finished, before the thumbnails are generated. ...
1
vote
0answers
80 views

Can I hook into wp_update_core outside of the admin?

I'm trying to bring some of the admin functionality to a custom front end in WordPress. Questions of security and pragmatism of this aside, is there an available hook to trigger wp_update_core outside ...
0
votes
0answers
14 views

Add row counter in Admin area - Custom post list

Hi I add some custom columns to my custom post type listing in admin area. In my functions php: function book_cpt_columns($columns) { unset( $columns['date'] // Ocultar columna ...
0
votes
0answers
19 views

How to apply hook on pre_get_posts go get natural sort in listings in dashboard?

I have this code to do sorting on meta_key e_nummer ascending order in admin dashboard when listing products. /* Sort posts in wplist admin by e-nr! */ function custom_post_order($query){ ...
0
votes
0answers
47 views

admin-ajax.php not working after wordpress 4 update

n WordPress 3.9.2 access to admin-ajax was working for non loggedin users. When I upgraded the script stop working. I have the following code in functions.php function theme_name_scripts() { ...
0
votes
0answers
11 views

Override child theme menu to social menu

I have a header.php file contains these code supreme_primary_navigation(); do_action( 'after_menu_primary' ); and functions.php file contains these code function supreme_primary_navigation(){ ...
0
votes
0answers
23 views

Add notice to add image popup

I have been using the global "pagenow" variable to add instructions for users, but I need to somehow hook into the add image popup as I would like to instruct the users on optimal resolution for ...
0
votes
0answers
14 views

Comments closed only for contributors

I am having a very funny issue right now. My WordPress is currently with comments activated and it always worked, but now that I've opened the website for contributors, only their posts are coming ...
0
votes
0answers
19 views

Get post titles shows on single posts

I want to display this link lists in "single post" only. How to do this? add_action( 'genesis_before_footer', 'radiolink_unit', 1 ); function radiolink_unit() { ?> <div id="languagelinks"> ...
0
votes
0answers
13 views

comment_post and preprocess_comment connected

In my comment_form arguments i add a input label with a value: 'comment_notes_after' => '<div id="canvasDiv" ></div> <script type="text/javascript"> ...
0
votes
0answers
18 views

attachment custom values are'nt inserted to database

I have created attachment custom field. After I uploading image and inserting to new-post.php (post creating window) no meta values are saved in database. Even that I have set a default value for ...
0
votes
0answers
16 views

template_redirect and title

I pass a template_redirect in wordpress as hook but I want to have a personnalized title for this page and I miss to do that. Has someone any idea ? add_action( 'template_redirect', 'virtual_pages' ...
0
votes
0answers
49 views

Editor/TinyMCE - change double enter key to <br /> and single enter to nothing

I have learned over the last year on Stack Overflow that people here prefer I give all details in the beginning instead of answering 12 comments worth of this stuff later. EDIT: If you don't want to ...
0
votes
0answers
34 views

Hook pages by id on static front-page

I would like to build a one page website upon the Wordpress CMS. I'm looking for a way too hook my pages on a static frontpage by id, since I have several page types. I've tried: $id=6; $post = ...
0
votes
0answers
19 views

Appropriate hook for filtering the posts from the admin page

I am currently developing a custom post type and I would like to know which hook I should use in order to filter posts by category. Can anyone please tell me how to do this?
0
votes
0answers
19 views

Automatically create featured image on post publish

I know how to make an image display IN PLACE OF a featured image if the post has no featured image, however, as far as the database is concerned, the post still has no featured image. In my theme, ...
0
votes
0answers
18 views

Removing WP-Login inputs

I'm building a passive captcha system for my WP sites, and I'm attempting to remove the inputs (username, password, submit) from my standard WP-Login page via php hooks; they'll be replaced via jQuery ...
0
votes
0answers
59 views

Add icon near meta box title in posts/pages

I'm trying to add some "help icon" that will be use to show "help text" with the help of the tooltip or pointers to admin section. Now I'm trying to understand how can I add in the posts/pages in ...
0
votes
0answers
20 views

URL mod rewriting for my custom links

My Actual link :- http://nanhai.com/nanhai-overview/162/ I want it like :- http://nanhai.com/nanhai-overview/xyz/ My code add_action('init', 'add_actor_url'); function add_actor_url() { ...
0
votes
0answers
45 views

Hook before & after plugin / core update

I'm working on a maintenance plugin for my website and I want to enable it before plugin/core upgrade starts and disable it after plugin/upgrade ends. Any ideas ? Thanks! :) PS: all I know is I can ...
0
votes
0answers
22 views

Meta query not working with pre_get_posts

This works $q->set('meta_key', 'available-date_%_from'); $q->set('meta_value', '20140701'); This doesn't $q->set( 'meta_query', array( array( 'key' => 'available-date_%_from', ...
0
votes
0answers
16 views

check_admin_referer always false when I use on add_action('load-'* hook

I have try to add hook on load my plugin page. But every time i save my config, it always return "Are you sure want to ..." message. Is there something i missed? Here's my code: <?php class ...
0
votes
0answers
46 views

Using 'add_attachment' to add taxonomy term on upload completion?

function amend_gametitle_upload( $game_title ) { global $post; if ( isset( $_REQUEST['post_id'] ) ) { $post_id = absint( $_REQUEST['post_id'] ); $post_obj = get_post( ...
0
votes
0answers
40 views

Checking if some condition is matched before inserting post into database

Is there a way to check if some requirements are matched before adding new instance of custom post type to database? Like custom policies for adding new posts etc? What I want to do is to build two ...
0
votes
0answers
15 views

Ask for template when adding a new page

I would ask the admin which template they would like to user when they click on "Add New" Page. Is this possible? I think I have seen something similar before where it ask you how many columns you ...
0
votes
0answers
48 views

get_plugins() doesn't work after plugins_loaded

Any idea why the following code function my_plugin_load() { get_plugins(); } add_action( 'plugins_loaded', 'my_plugin_load' ); Throws this error? Fatal error: Call to undefined function ...
0
votes
0answers
39 views

register_activation_hook not working with symbolic links

I'm writing my first own Wordpress plugin. It's working great so far, except that now I need to create a few DB tables upon plugin activation. So I put register_activation_hook( __FILE__, ...
0
votes
0answers
73 views

Get the menu name or location of current menu item

I am having a hard time trying to get the name of the active menu and, apparently, I cannot find any solutions to this issue. Basically, I have several menus that follow this pattern: Menu Name ...
0
votes
0answers
14 views

Edit default action for profile_personal_options

Is there a way to edit the pre-existing action attached to the profile_personal_options hook that is built-in to WordPress?
0
votes
0answers
25 views

How to hook new args into a Custom Menu Widget?

I am trying to add some code before the list items in a sidebar Custom Menu Widget. Maybe I'll add an image, maybe I'll add some text. Not sure yet. But I'm having a hard time trying to figure it ...
0
votes
0answers
24 views

How to get WP to run plugin code triggered by an external site hook?

I have written a plugin to sync data from a WP blog to an external website. Changes to made to the external site also sync back to the WP blog. Right now the external website executes a POST request ...
0
votes
0answers
20 views

addaction hook cause redirection problem

I have added the hook in my wp functions: add_action('pa_taxname_edit_form_fields', 'woocom_edit_attribute_chk_field', 10, 2); function woocom_edit_attribute_chk_field($term, $taxonomy) { ...
0
votes
0answers
34 views

Customizing the built-in Media Playlist

I have a simple challenge I can't quite seem to make any progress on: Get the current track (or video) playing and display a link to a transcript of the song. This should be a simple task (and the ...
0
votes
0answers
29 views

PHP header() gives headers already sent

I am working on a checkout proces in Wordpress where if customer clicks on the checkout button he gets redirected to a payment provider. Important to know: I use a session in this proces. I use PHP ...
0
votes
0answers
67 views

Init hook for header send

I am working on a checkout proces where if I submit the checkout I get an error "headers already send" because I use a PHP header() function to send the customer to my payment provider url. My idea ...
0
votes
0answers
36 views

Which hook to use to add notification message at beginning of my <body>

i want to add dynamic messages to the beginning of my but I can't figure what hook to use. I have tried get_header but i can't append content to it... any idea? I don't want a solution that requires ...