Plugin Directory

Changeset 1810242


Ignore:
Timestamp:
01/26/2018 11:00:44 PM (8 years ago)
Author:
kernox
Message:

Some enhancements

Location:
wp-mastodon-share/trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • wp-mastodon-share/trunk/form.tpl.php

    r1809481 r1810242  
    1010                    </th>
    1111                    <td>
    12                         <input type="text" id="instance" name="instance" size="80" value="<?php esc_attr_e( $instance ); ?>">
     12                        <input type="text" id="instance" name="instance" size="80" value="<?php esc_attr_e( $instance ); ?>" pattern="^http.+">
     13                        <p class="description"><?php esc_html_e('The instance url must be like http(s)://domain.tld', 'wp-mastodon-share') ?></p>
    1314                    </td>
    1415                </tr>
     
    4243                        <textarea  rows="10" cols="80" name="message" id="message"><?php esc_html_e( stripslashes( $message ) ); ?></textarea>
    4344                        <p class="description"><i><?php esc_html_e( 'You can use these metas in the message', 'wp-mastodon-share' ); ?></i>
    44                             : [title], [excerpt], [permalink] <?php esc_html_e( 'and', 'wp-mastodon-share' ); ?> <a href="#" draggable="true">[tags]</a></p>
     45                            : [title], [excerpt], [permalink] <?php esc_html_e( 'and', 'wp-mastodon-share' ); ?> [tags]</p>
    4546                    </td>
    4647                </tr>
  • wp-mastodon-share/trunk/wp-mastodon-share.php

    r1809646 r1810242  
    2626        add_action( 'tiny_mce_before_init', array($this, 'tinymce_before_init' ) );
    2727        add_action( 'publish_future_post', array($this, 'toot_scheduled_post') );
    28 
    29         register_uninstall_hook(__FILE__, array($this, 'uninstall'));
    3028    }
    3129
     
    163161        }
    164162
    165         $message = get_option( 'mastoshare-message', '[title] - [excerpt] - [permalink]' );
     163        $message = get_option( 'mastoshare-message', "[title]\n\n[excerpt]\n\n[permalink]\n\n[tags]" );
    166164        $mode = get_option( 'mastoshare-mode', 'public' );
    167165        $toot_size = get_option( 'mastoshare-toot-size', 500 );
     
    359357        return $init_array;
    360358    }
    361 
    362     public function uninstall(){
    363         delete_option( 'mastoshare-client-id' );
    364         delete_option( 'mastoshare-client-secret' );
    365         delete_option( 'mastoshare-token' );
    366         delete_option( 'mastoshare-instance' );
    367         delete_option( 'mastoshare-message' );
    368         delete_option( 'mastoshare-mode' );
    369         delete_option( 'mastoshare-toot-size' );
    370         delete_option( 'mastoshare-notice' );
    371     }
    372359}
    373360
Note: See TracChangeset for help on using the changeset viewer.