Register theme customizer settings when theme activates [duplicate]

You need only use the default value on the wp_customize and that is all $wp_customize->add_setting(‘mytextoption’, array( ‘default’ => ‘defaultvalue’, ‘capability’ => ‘edit_theme_options’, ‘type’ => ‘option’, replace defaultvalue for the value you want, and when the user activate the theme this line will register the default value on the DB only when not exist on the … Read more

Display commenter’s registration date on comments?

In your wp_list_comments callback function, you can call get_userdata to get any additional comment author data: $userdata = get_userdata( $comment->user_id ); echo ‘Registered: ‘ . $userdata->user_registered; // format the date // Sunday January 13th 2013 echo ‘Registered: ‘ . date( ‘l F jS Y’, strtotime( $userdata->user_registered ) );

Adding extra info via GET while registeration in wordpress

I’ve recently written an affiliate plugin where i had to do pretty much the same stuff. Here’s a chopup of the relevant parts: To process the extra info you get from the registration form: add_action(‘user_register’, ‘my_handle_signup’, 10, 2); function my_handle_signup($user_id, $data = null) { $reg_ip = $_REQUEST[‘reg_ip’]; $referrer = $_REQUEST[‘referrer’]; if (isset($reg_ip) && isset($referrer)) { … Read more

Creating a Closed WordPress Community Using Referral Codes

So, first up, we need some sort of submit form. Here’s a simple one, it can be whatever you want, obviously. This is just for this example. Emails the person on submission and sets up a password key for them in the wp_options table. <?php add_action( ‘init’, ‘wpse15535_add_shortcode’ ); function wpse15535_add_shortcode() { add_shortcode( ‘invite-form’, ‘wpse15535_invite_form’ … Read more

How to add a description to the user name input field in the registration form?

OK, that’s possible using JavaScript (jQuery lib). Code – // load jquery on login screen if not loaded already add_action( ‘login_enqueue_scripts’, ‘wpse_login_head’ ); function wpse_login_head(){ wp_enqueue_script(‘jquery’); } add_action( ‘register_form’, ‘wpse_register_form’ ); function wpse_register_form(){ ?> <!– we have used an unique id for the description tag –> <span id=”user_login_description” style=” display:none;” class=”description”><?php _e(“Description text”); ?></span> <!– … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)