Which action does wp_update_user triggers?

wp_update_user() is in /wp-includes/user.php lines 1401-1439. It uses wp_insert_user() (same file, lines 1254-1380) to update the existing user or add a new one if the user doesn’t exist. That function is where the various filters and actions affecting user account info live, and shows everything you can do to the $user object.

Removing permalink from post thumb in twentyeleven

No idea, never used twenty eleven theme. I opened the theme files. Check out showcase.php around Line 104-118. Should be on line 115 – just remove the anchor wrapping the post thumb, <a href=”https://wordpress.stackexchange.com/questions/52498/<?php the_permalink(); ?>” title=”<?php printf( esc_attr__( ‘Permalink to %s’, ‘twentyeleven’ ), the_title_attribute( ‘echo=0’ ) ); ?>” rel=”bookmark”><?php the_post_thumbnail( $thumbnail_size ); ?></a>

wp_nav_menu, walker class, categories as classes of li

your walker class is almost perfect for what you need @Gab. instead of line 21: $output .= ‘<li>’; move it down just before line 38 $output .= apply_filters( ‘walker_nav_menu_start_el’ […] and change it to something like $output .= $indent . ‘<li id=”nav-menu-item-‘. $item->ID . ‘” class=”‘. $title . ‘”>’; and you should have the category … Read more

how to call a function only in specific pages and exclude it from other pages

if you know which page id , for example , you can change your page.php if ( get_the_ID() == ’99’ ) { my_specific_page_99_calls(); } and then on functions.php my_specific_page_99_calls( require_once(GABFIRE_FUNCTIONS_PATH. ‘/review-options.php’); require_once(GABFIRE_FUNCTIONS_PATH . ‘/custom.php’); require_once(GABFIRE_FUNCTIONS_PATH . ‘/shortcodes.php’); require_once(GABFIRE_FUNCTIONS_PATH . ‘/post-types.php’); ) i’m sure there’s other options, but this will get you there. to exclude from … Read more

Having a Function Inside of the Loop

Before continuing, please read this: http://www.slideshare.net/andrewnacin/you-dont-know-query-wordcamp-netherlands-2012 It’s by a core WordPress developer and you should consider it required reading. You should never use query_posts, and it’s important to understand how to use loops correctly. That presentation will demonstrate the best practices, how, and why to use them. I can see the approach you’ve taken, what … Read more

List all-childpages on parent-page AND list child-pages on childpage itself but not the current one?

function show_subpages() { global $post; $subpages = wp_list_pages( array( ‘echo’ =>0, ‘title_li’ =>”, ‘depth’ =>2, ‘link_before’ => ‘&mdash; ‘, ‘child_of’ => ( $post->post_parent == 0 ? $post->ID : $post->post_parent), ‘exclude’ => ( $post->post_parent == 0 ? ” : $post->ID) )); if ( !empty($subpages) ) { echo ‘<ul id=”subpages” class=”wrapper”>’; echo $subpages; echo ‘</ul>’; } } … Read more

User meta and author meta

class emailer { static function notifyHeart($post_ID) { $interests = get_user_meta(get_current_user_id(), ‘interests’); $to = get_the_author_meta( ‘user_email’, get_current_user_id() ); $post = get_post($post_ID); foreach($interests as $interest) { if(has_tag($interest, $post)) { $email = $to; mail($email, “An article about Heart”, ‘A new post has been published about heart.’); break; } } } } add_action(‘publish_post’, array(’emailer’, ‘notifyHeart’)); Here’s a reworked example. … Read more

Frontend tag edit/submit form

In case that I have understood your (very brief) question and you’re not actually talking about the post_tag-taxonomy then you have wp_insert_term(), which is the underlying API function. Edit As to the comment, there’s the need of meta data for a term and administrator approval. WordPress currently has no native way of adding meta data … Read more

Restore Image Title Text

You can hook into the media_send_to_editor filter and add the title tag to the generated HTML image tag: function wpse_78529_restore_image_title( $html, $id ) { /* retrieve the post object */ $attachment = get_post( $id ); /* if the title attribute is already present, bail early */ if ( strpos( $html, ‘title=” ) ) return $html; … Read more

How can I change a function in a parent theme via a child themes functions.php

On the init action, remove the action calling their function and enqueue an action calling your (differently named) function, like this: add_action(‘init’, ‘wpse_80107_init’); function wpse_80107_init() { // remove parent theme’s header content action remove_action(‘cyberchimps_header_content’, ‘cyberchimps_logo_icons’); // add child theme’s header content action add_action(‘cyberchimps_header_content’, ‘wpse_80107_logo_icons’); } function wpse_80107_logo_icons() { // your custom code here }