Changeset 1702671
- Timestamp:
- 07/25/2017 08:33:59 PM (9 years ago)
- Location:
- wp-mastodon-share/trunk
- Files:
-
- 2 edited
-
form.tpl.php (modified) (4 diffs)
-
mastoshare.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-mastodon-share/trunk/form.tpl.php
r1702506 r1702671 23 23 24 24 <div class="wrap"> 25 <h1 class="big-title"><?php esc_html_e( 'Mastodon Share Configuration', ' mastoshare' ); ?></h1>25 <h1 class="big-title"><?php esc_html_e( 'Mastodon Share Configuration', 'wp-mastodon-share' ); ?></h1> 26 26 <form method="POST"> 27 27 <?php wp_nonce_field( 'instance-access-key' ); ?> 28 28 <div class="block"> 29 <label for="instance"><?php esc_html_e( 'Instance', ' mastoshare' ); ?></label>29 <label for="instance"><?php esc_html_e( 'Instance', 'wp-mastodon-share' ); ?></label> 30 30 <input type="text" id="instance" name="instance" size="80" value="<?php esc_attr_e( $instance ); ?>"> 31 31 <p> … … 34 34 type="submit" name="obtain_key" 35 35 id="obtain_key" 36 value="<?php esc_attr_e( 'Obtain Access Key', ' mastoshare' ); ?>"36 value="<?php esc_attr_e( 'Obtain Access Key', 'wp-mastodon-share' ); ?>" 37 37 > 38 38 </p> … … 43 43 <?php wp_nonce_field( 'mastoshare-configuration' ); ?> 44 44 <div class="block"> 45 <label for="token"><?php esc_html_e( 'Access Key', ' mastoshare' ); ?></label>45 <label for="token"><?php esc_html_e( 'Access Key', 'wp-mastodon-share' ); ?></label> 46 46 <input type="text" name="token" id="token" value="<?php esc_attr_e( $token ); ?>" size="80" required> 47 47 </div> … … 49 49 50 50 <div class="block"> 51 <label for="message"><?php esc_html_e( 'Message', ' mastoshare' ); ?></label>51 <label for="message"><?php esc_html_e( 'Message', 'wp-mastodon-share' ); ?></label> 52 52 <textarea rows="10" cols="80" name="message" id="message"><?php esc_html_e( stripslashes( $message ) ); ?></textarea> 53 <p><i><?php esc_html_e( 'You can use these metas in the message', ' mastoshare' ); ?></i> : [title], [excerpt], [permalink]</p>53 <p><i><?php esc_html_e( 'You can use these metas in the message', 'wp-mastodon-share' ); ?></i> : [title], [excerpt], [permalink]</p> 54 54 </div> 55 55 56 56 <div class="block"> 57 <label for="mode"><?php esc_html_e( 'Toot mode', ' mastoshare' ); ?></label>57 <label for="mode"><?php esc_html_e( 'Toot mode', 'wp-mastodon-share' ); ?></label> 58 58 <select name="mode" id="mode"> 59 <option <?php if ( 'public' === $mode ): ?>selected<?php endif; ?> value="public"><?php esc_html_e( 'Public', ' mastoshare' ); ?></option>60 <option <?php if ( 'unlisted' === $mode ): ?>selected<?php endif; ?> value="unlisted"><?php esc_html_e( 'Unlisted', ' mastoshare' ); ?></option>61 <option <?php if ( 'private' === $mode ): ?>selected<?php endif; ?> value="private"><?php esc_html_e( 'Private', ' mastoshare' ); ?></option>62 <option <?php if ( 'direct' === $mode ): ?>selected<?php endif; ?> value="direct"><?php esc_html_e( 'Direct', ' mastoshare' ); ?></option>59 <option <?php if ( 'public' === $mode ): ?>selected<?php endif; ?> value="public"><?php esc_html_e( 'Public', 'wp-mastodon-share' ); ?></option> 60 <option <?php if ( 'unlisted' === $mode ): ?>selected<?php endif; ?> value="unlisted"><?php esc_html_e( 'Unlisted', 'wp-mastodon-share' ); ?></option> 61 <option <?php if ( 'private' === $mode ): ?>selected<?php endif; ?> value="private"><?php esc_html_e( 'Private', 'wp-mastodon-share' ); ?></option> 62 <option <?php if ( 'direct' === $mode ): ?>selected<?php endif; ?> value="direct"><?php esc_html_e( 'Direct', 'wp-mastodon-share' ); ?></option> 63 63 </select> 64 64 </div> 65 65 66 66 <div class="block"> 67 <label for="size"><?php esc_html_e( 'Toot size', ' mastoshare' ); ?></label>68 <input name="size" id="size" type="number" min="100" max="500" value="<?php esc_attr_e( $toot_size ); ?>"> <?php esc_html_e( 'characters', ' mastoshare' ); ?>67 <label for="size"><?php esc_html_e( 'Toot size', 'wp-mastodon-share' ); ?></label> 68 <input name="size" id="size" type="number" min="100" max="500" value="<?php esc_attr_e( $toot_size ); ?>"> <?php esc_html_e( 'characters', 'wp-mastodon-share' ); ?> 69 69 </div> 70 70 71 <input class="button button-primary" type="submit" value="<?php esc_attr_e( 'Save configuration', ' mastoshare' ); ?>" name="save" id="save">71 <input class="button button-primary" type="submit" value="<?php esc_attr_e( 'Save configuration', 'wp-mastodon-share' ); ?>" name="save" id="save"> 72 72 73 73 </form> -
wp-mastodon-share/trunk/mastoshare.php
r1702622 r1702671 8 8 * Author: Hellexis 9 9 * Author URI: https://github.com/kernox 10 * Text Domain: mastoshare10 * Text Domain: wp-mastodon-share 11 11 * Domain Path: /languages 12 12 */ … … 29 29 function mastoshare_init() { 30 30 $plugin_dir = basename( dirname( __FILE__ ) ); 31 load_plugin_textdomain( ' mastoshare', false, $plugin_dir . '/languages' );31 load_plugin_textdomain( 'wp-mastodon-share', false, $plugin_dir . '/languages' ); 32 32 } 33 33 … … 44 44 'Mastodon Share', 45 45 'install_plugins', 46 ' mastoshare',46 'wp-mastodon-share', 47 47 'mastoshare_show_configuration_page' 48 48 ); … … 118 118 echo '<div class="misc-pub-section misc-pub-section-last">' . 119 119 '<input ' . $checked . ' type="checkbox" name="toot_on_mastodon" id="toot_on_mastodon">' . 120 '<label for="toot_on_mastodon">' . __( 'Toot on Mastodon', ' mastoshare' ) . '</label>' .120 '<label for="toot_on_mastodon">' . __( 'Toot on Mastodon', 'wp-mastodon-share' ) . '</label>' . 121 121 '</div>'; 122 122 } … … 160 160 serialize( 161 161 array( 162 'message' => 'Mastodon Share: ' . __( 'Sorry, can\'t send toot !', ' mastoshare' ) .163 '<p><strong>' . __( 'Instance message', ' mastoshare' ) . '</strong> : ' . $toot['error'] . '</p>',162 'message' => 'Mastodon Share: ' . __( 'Sorry, can\'t send toot !', 'wp-mastodon-share' ) . 163 '<p><strong>' . __( 'Instance message', 'wp-mastodon-share' ) . '</strong> : ' . $toot['error'] . '</p>', 164 164 'class' => 'error', 165 165 ) … … 171 171 serialize( 172 172 array( 173 'message' => 'Mastodon Share: ' . __( 'Toot successfully sent !', ' mastoshare' ),173 'message' => 'Mastodon Share: ' . __( 'Toot successfully sent !', 'wp-mastodon-share' ), 174 174 'class' => 'success', 175 175 )
Note: See TracChangeset
for help on using the changeset viewer.