WordPress.org

Ready to get started?Download WordPress

Forums

Sharedaddy
[resolved] Quick or Bulk Edit Remove sharing_disabled meta value (3 posts)

  1. Milan Dinić
    Member
    Posted 3 years ago #

    If you uncheck "Show sharing buttons on this post." and you later edit that post via Quick Edit or Bulk Edit, sharing_disabled post meta value is deleted so it removes user selected option.

    This is caused by wrong code in sharedaddy.php, lines 44-47. Instead of

    if ( isset( $_POST['sharing_status_hidden'] ) && !isset( $_POST['enable_post_sharing'] ) )
    				update_post_meta( $post_id, 'sharing_disabled', 1 );
    			else
    				delete_post_meta( $post_id, 'sharing_disabled' );

    you should have

    if ( isset( $_POST['sharing_status_hidden'] ) ) {
    				if ( !isset( $_POST['enable_post_sharing'] ) )
    					update_post_meta( $post_id, 'sharing_disabled', 1 );
    				else
    					delete_post_meta( $post_id, 'sharing_disabled' );
    			}

    Some suggestions:

    1. $content = sprintf( __( '%s (%s) thinks you may be interested in the following post:'."\n\n", 'sharedaddy' ), $data['name'], $data['source'] ); would be better as $content = sprintf( __( '%1$s (%2$s) thinks you may be interested in the following post:'."\n\n", 'sharedaddy' ), $data['name'], $data['source'] );
    2. i18n of services' names in sharing-sources.php (Twitter, StumbleUpon, etc)
    3. adding another parameter to sharing_permalink parameter that includes name of service (for example, someone might want to filter permalink only for Twitter)
    4. using wp_enqueue instead of hard coding for CSS & JS
    5. mnification of sharing.js and sharing.css; you can have .dev.js versions as WP core for raw code

    http://wordpress.org/extend/plugins/sharedaddy/

  2. Milan Dinić
    Member
    Posted 3 years ago #

    Although he didn't respond here, in version 0.2.8 John fixed issue from topic's title, and suggestions 3 and 4 (4 was partly, JS was already using wp_register_script, which I didn't notice at first).

  3. Milan Dinić
    Member
    Posted 3 years ago #

    He fixed issue 1 too but I didn't notice it at first since he didn't update POT file.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags