0
votes
0answers
26 views

Post Rating System with wordpress

I'm using a Post Rating System with wordpress and jQuery, i followed this tutorial for that. ` jQuery(document).ready(function(){ jQuery("a.like:not('.voted')").live("click",function(){ ...
0
votes
0answers
52 views

Contact Form 7 to web service

I wonder if anyone can help me with something that's driving me crazy. I'm trying to implement a series of forms that will write to a CRM and the data must be passed as XML. I'm not particularly ...
0
votes
1answer
76 views

add_action into another add_action not working

I have this little php code for wordpress. It doesn't work. I want to make one add_action under another add_action. But the add_action that is under, is not working! function no_reminder() { ...
0
votes
2answers
38 views

Basic function call on init failing

I've been banging my head against this for a while. I have this very straight-forward code in my plugin: add_action('init', 'register_shortcodes'); $shortcodeRegistrationRan = False; function ...
0
votes
2answers
64 views

what is correct way to hook when update post

i try to hook when post is updated but all hook i try never executed except updated_post_meta add_action('updated_post_meta', 'my_function'); function my_function($post_id) { echo 'This is ...
2
votes
1answer
68 views

Check php version before theme activation

I've got theme that requires php 5.3+ version. If older - fatal error occurs with it. So what I need to do when user try to activate this theme is to check php version before going into theme code ...
0
votes
0answers
49 views

inline script : prettyPhoto setting deeplinking to false not working

This is suppose to be simple but I can not figure it out. I'm using WordPress prettyPhoto plugin for my project and I'm trying to set deeplinking to false (deeplinking:false). In the Chrome console, I ...
1
vote
1answer
42 views

wordpress plugin is not activating from widget

I am just creating a plugin in wordpress. In this plugin I am trying to create a widget, In that widget it will show a title, input text and text area in the widget section and when the values will be ...
1
vote
2answers
54 views

Which hook callback has priority if both plugin and theme use the same hook?

If a theme and a plugin uses the same action hook, for example comment_form is used by both theme and plugin. Then , which one will be called first? the function associated with the theme's hook or ...
0
votes
0answers
322 views

How does add_action 'comment_post' work?

I found an example how to How To AJAX-ify WordPress Comments. I tweak it little bit and so far everything works fine but I want to understand the code. Where did the arguments $comment_ID, ...
2
votes
1answer
289 views

Delete option value from array using update_option()

I have a user profile field which subscribes the user to forum posts by email. This adds the user's email address to an array in wp-options. Naturally I want the user to be able to unsubscribe, in ...
0
votes
2answers
410 views

jQuery code not working when included in functions.php

I feel like I am definitely missing something simple here... but for the life of me, can't find what I'm missing. I am of the "bad habit" of including jQuery functions directly in the header.php file ...
0
votes
2answers
146 views

How to pass hook variable to function?

I have a function that has an add_action inside it that calls the user_register hook. I would like to be able to echo the variable $user_id from the user_register hook and the $_POST array as well. ...
0
votes
0answers
46 views

Highlight posts currently being edited on multiple editor site?

I have a custom page that uses the Cleverness To-Do List plugin to display multiple posts on a page. My site has multiple editors, and if a post is currently being edited on the custom page (not the ...
2
votes
1answer
49 views

Why do filters/actions require an argument count?

I was just looking at plugin.php trying to answer the above question and I couldn't work it out. The actual code that calls filters is this: do { foreach( (array) current($wp_filter[$tag]) as ...
0
votes
1answer
282 views

How to access function from outside of a class within this class in WP plugin?

I am developing a WP plugin called e.g. DD_Awesome_Plugin and this is my code so far (simplified version without additional code logic within class functions): class DD_Awesome_PLugin { public ...
0
votes
1answer
51 views

How to show a users bio on a page

I'm fairly new to Wordpress. I have users that create profiles on my site and one of the sections is their bio. How can I take this information and display it on lets say a "users profile page". ...
-1
votes
2answers
95 views

Fix incorrect related posts code snippet

Can anybody fix this incorrect related posts codes snippet? function related_posts() { if (is_single()) { global $post; $current_post = $post->ID; $categories = get_the_category(); ...
0
votes
1answer
229 views

Custom action on comment post

Whenever a user posts a comment, I'd like to basically have a copy of the post sent to another database for a separate site. The database part is simple, but I can't seem to find the right action hook ...
0
votes
1answer
73 views

Wordpress Plugin Receive a Link

I'm writing a Wordpress plugin. The plugin should allow every user to rate posts (1 to 5 stars). What actually works is to read the rating from storage and show the stars. So there are five <a> ...
4
votes
1answer
87 views

Getting the action's tag name within the action

There's a function attached to a set of actions, like this: add_action('some_tag', 'the_function'); function the_function($maybe_some_vars){ // ... } Is it possible to find out the action name ...
2
votes
1answer
1k views

How can I remove “Proudly powered by WordPress” from twentyeleven without modifying footer.php?

How can I remove "Proudly powered by WordPress" from twentyeleven without modifying footer.php, and without creating a child theme? I'm looking for a php command, such as add_action, remove_action, ...
1
vote
1answer
1k views

How can I see all the actions attached to an “add_action” hook?

I'm working with the admin bar and trying to debug some of the menus and their priorities. I know several callbacks get bound to actions, such as this one: add_action( 'admin_bar_menu', ...
1
vote
2answers
303 views

WP_cron won't trigger my action

I'm in a dead end with a schedualed task in a wordpress plugin for a multisite. Somehow the action I added don't get triggered. The task is getting schedualed and returns a timestamp when I run ...
1
vote
1answer
493 views

Add title, post content, and category like add_post_meta and update_post_meta

How can I update/add a new title, post content, and category to a post with hard PHP code similar to add_post_meta(), update_post_meta()?
4
votes
2answers
2k views

Does an activated plugin automatically mean its methods are available to other WP functions?

I made a WordPress plugin like this: Class MY_CLASS { //codes } Global $myclass; $myclass = New MY_CLASS (); After installed and activated the plugin, can I use this class in other plugins without ...
2
votes
1answer
720 views

Appending meta value onto post content in WordPress during save_post

The problem seems pretty straight forward: Once the save_post action is fired, I would like to append the value of a meta key onto the end of the post_content if it's not already found within the post ...
0
votes
2answers
1k views

Are there action hooks for comments?

This is for a personal-use plugin I'm trying to make. I want to submit a comment from site A to my blog (sort of like sending trackbacks/pingbacks but a full comment). For instance, on site A I have ...
2
votes
3answers
4k views

How to set custom cookies before output

What's a surefire way to check/set cookies before the php headers are sent? Is there an action or filter that would be the best place to hook a setcookie() function?