Ok i can pass variables to hook but i was doing it wrong. Code should be:
function encrypt_password_function($pass, $id){
global $wpdb;
$encrypted=sha1($pass);
$wpdb->query($wpdb->prepare("UPDATE wp_users SET iphone_pass = %s WHERE ID = %d",array($encrypted, '10')));
}
function encrypt_password($var1, $var2) {
do_action('encrypt_password',$var1, $var2);
}
add_action('encrypt_password', 'encrypt_password_function', 1,2);
Related Posts:
- Get password when user registers and save it sha1 into database
- Issues with title-tag and document_title_parts
- How to remove the Theme Customization Button from the dashboard and themes options page?
- Change admin bar to default:off
- Display a different theme for not logged-in users
- How do I “unhook” / de-register jQuery so that it’s not called as part of wp_footer();?
- Passing variable in hooks and filter
- Highlight “Show all” item in wp_list_categories
- Menu item added in wp_nav_menu_items filter is never highlighted
- Should I use add_filter for functions in function.php of the theme?
- Theme Customizer not loading JS for live preview
- Replace single_template filter with what for default posts?
- How to change footer credit text in Twenty Twenty One theme with a hook?
- Modify available templates (in dropdown)
- Add content after get_header
- How to set default values for edit_post_link() in my theme?
- Unpublished Pages Failing To Appear On Custom Path
- WordPress wp_get_current_user returning blank values until refresh
- what is do_action(); in wordpress? [duplicate]
- apply_filters to featured image
- Is there any filter or action hook to remove layout classes from appearing in my templates?
- Get the blog page URL set in Options
- get_template_part vs action hooks in themes
- Theme Activate Hook
- Using classes instead of global functions in functions.php
- What is the difference between wp_register_sidebar_widget and register_widget?
- Add custom classes to anchor in wp_nav_menu
- What filters are applied to the_content function?
- Define custom Page Template without its own .php file
- How to modify an image block in Gutenberg WordPress 5?
- How to influence the information displayed on widget inside wp-admin
- Create “File-less” Page Template in Functions.php
- Edit srcset and sizes attributes in Gutenberg image, cover and gallery – blocks
- Getting instance variable in scope of ‘wp_enqueue_scripts’
- wp_get_attachment_image_attributes not working for me
- When to use esc_url, esc_html, esc_attr, and friends?
- How do I Make a Theme “plugin-ready”?
- How to edit bbPress template files – WordPress + BuddyPress + bbPress? [closed]
- What can I hook into after_setup_theme?
- Change the footer text on the login page
- Run shortcode before filters
- Add class to before_widget for all widgets with a dropdown and a counter
- How to change post thumbnail title and alt attributes to post title?
- Why might $input (Settings API) be coming through empty?
- Seeking clarification on page request life-cycle
- How to Auto Approve Comments on a Specific Page?
- Identifying the priority of style.css so I can make a small CSS file load last
- Check if page parent has certain template
- Override default cropping in WordPress [duplicate]
- What’s the difference between hooks, filters and actions? [duplicate]
- Remove Page Title from Static Frontpage
- How to use filter hook ‘post_updated_messages’ in coherence with action hook ‘save_post’
- Change parent theme file function in child themes functions.php
- Removing the default sidebar from admin panel
- Merging PHP download script into `functions.php`
- Dynamically Override Fancy Title
- Is there an error in get_the_tag_list()?
- Returning Variables back into a template
- Allow users to add custom functions to wordpress theme
- Change date number to another language/script?
- How to add custom template tag in wordpress theme?
- wp_enqueue_scripts not called on search page?
- Nesting Functions within Functions
- Is using eval() ok in this scenario
- What function to hook for changes made in status and visibility of a post
- Custom php page in WordPress theme?
- WordPress nav_menu_css_class theme filter is not being called
- Alternative solution for script_loader_tag?
- Alt header logo and link for specific pages
- Remove External Links from WordPress posts Using add_filter() in Theme functions.php
- WordPress Twenty-Fourteen: How to Remove Home Page Header Image from Other Pages
- How to hook into wordpress upgrade procedure for a custom theme
- Alter theme pages on language switch
- Make a custom field in admin post.php read only
- Hook in parent theme Menu function
- How do I remove p tag *insertions*? Disabling `wpautop` removes manual tags
- How to add custom nav_menu_css_class to certain menu only?
- How to manipulate wordpress template tags’ output
- WordPress permalink setting
- Allow tags and attributes in post and pages content
- Suppress the_content filter in a nested loop
- enqueue script if page is not equal to
- Mamp pro permalink issues. Pages keep reverting to index.php
- Force resize for all video content
- loading custom.js file after jquery is loaded
- add query string to all pages after user logged in
- Add rel to all images in a post
- Why functions metaboxes is causing White Screen in Admin [closed]
- Creating custom function in wordpress to return data from database
- Getting URL of Resized Image
- Adding a new layout for genesis
- themeforce (happytables framework) implementation
- Assign new post author IF another user in custom field on post transition
- How to Add Extra Text In WordPress Title Before Post Publish
- Add text when displying attribute with a hook on single product page
- Is there a hook that I can use when a fatal error occurs?
- Only show read more text when when wp:post-excerpt meets excerptLength
- How can I able to exclude ‘Category’ and ‘Tag’ slug from the URL in WordPress without reloading to new site?
- WP “optimizing” PNGs into thumbnails 5X larger than originals – FIX
- optimized PNGs 5X larger than originals