how to remove mandatory required fields in buddypress registration [closed]

Finally i did find an hack for this problem Make the field fullname, confirm password as display:none Bind the data from username to fullname and from password to confirm password For eg ( a simple binding example ) <html> <head> <script src=”http://code.jquery.com/jquery-latest.js”></script> <script> $(document).ready(function(){ $(‘#target’).bind(‘keyup keypress blur’, function() { $(‘#target1’).val($(this).val()); }); }); </script> </head> <body> … Read more

Add Download Button in prettyPhoto Plugin

Well programmers can make use of the prettyPhoto documentation and modify the plugin after the wp_footer() call in footer.php: Add the button via image_markup Give prettyPhoto a little height boost after adding the Download button. <?php wp_footer();?> <style>.download-btn{ margin-top: 10px; padding: 5px; background: #ccc; float: left }</style> <script> jQuery(document).ready(function() { jQuery(“a[rel^=’prettyPhoto’]”).prettyPhoto({ image_markup: ‘<img id=”fullResImage” src=”https://wordpress.stackexchange.com/questions/68012/{path}” … Read more

Delete all one-word comments

DISCLAIMER : Not a WordPress Developer, Just a MySQL DBA If you have privileges to login to MySQL and query data you could collect all the comment_ID values that have one word. SELECT comment_ID FROM wp_comments WHERE REPLACE(TRIM(comment_content),’ ‘,”)=TRIM(comment_content); You can test this by also seeing the comment_content SELECT comment_ID,comment_content FROM wp_comments WHERE REPLACE(TRIM(comment_content),’ ‘,”)=TRIM(comment_content); … Read more

How to get “Widget Logic” plugin’s input value in a custom widget code (to display on the Widget admin page)

I’m almost sure there is no way to do that (server side) without hacking core files, bu luckly i know a little jQuery and i’ve come up with this hackish function that does the job just fine: function widget_logic_hack(){ global $pagenow; if ($pagenow == ‘widgets.php’){ ?> <script> function hack_logic(){ jQuery(‘input[id$=”widget_logic”]’).each(function() { if (jQuery(this).val().length === 0){}else{ … Read more

Change the ‘published on’ text?

Use a gettext filter and match against the text. add_filter( ‘gettext’, ‘filter_published_on’, 10000, 2 ); function filter_published_on( $trans, $text ) { if( ‘Published on: <b>%1$s</b>’ == $text ) { global $post; switch( $post->post_type ) { case ‘your-posttype’: return ‘Whatever on: <strong>%1$s</strong>’; break; default: return $trans; break; } } return $trans; } The alternative would be … Read more

Is it dangerous to install unupdated plugins?

It depends on the plugin. The rule of thumb is that it is a bad sign when a plugin is not being updated, but is it “dangerous” depends on the complexity of the plugin. For example I have a small plugin which is probably 10 lines of code and will never become “dangerous” because of … Read more

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