Permalink
Browse files

Move settings to Discussion page. Close #57

  • Loading branch information...
yoren committed Feb 10, 2014
1 parent 34e58f7 commit e09bcf458ed6cbdb729e2bb65888fe5d3526a45b
Showing with 30 additions and 7 deletions.
  1. +28 −5 classes/class-admin.php
  2. +2 −2 readme.txt
@@ -106,17 +106,24 @@ public function enqueue_admin_scripts( $hook ) {
*/
public function register_settings() {
add_settings_section(
'hello-emoji',
__( 'Hello Emoji', 'hello-emoji' ),
array( $this, 'section' ),
'discussion'
);
register_setting(
'writing', // settings page
'discussion', // settings page
'wpcollab_hello_emoji_settings' // option name
);
add_settings_field(
'comment', // ID
__( 'Emojis', 'hello-emoji' ), // Label
array( $this, 'comments' ), // Callback
'writing', // Page on which to display
'default', // Section
'discussion', // Page on which to display
'hello-emoji', // Section
array(
'label_for' => 'wpcollab_hello_emoji_comment'
)
@@ -139,13 +146,30 @@ public function add_action_links( $links ) {
return array_merge(
array(
'settings' => '<a href="' . admin_url( 'options-writing.php' ) . '">' . __( 'Settings', 'hello-emoji' ) . '</a>'
'settings' => '<a href="' . admin_url( 'options-discussion.php' ) . '#hello-emoji-settings">' . __( 'Settings', 'hello-emoji' ) . '</a>'
),
$links
);
} // END add_action_links()
/**
* Add settings action link to the plugins page.
*
* @since 0.1.0
* @access public
*
* @see _e()
*
* @return string HTML of setting section
*/
public function section() {
?>
<p><a name="hello-emoji-settings"></a><?php _e( 'Activate to process emojis in comments in addition to post content.', 'hello-emoji' ); ?></p>
<?php
} // END section()
/**
* Print the HTML of comments setting.
*
@@ -169,7 +193,6 @@ public function comments() {
<input type='checkbox' id='wpcollab_hello_emoji_comment' name='wpcollab_hello_emoji_settings[comment]' value='1' <?php echo $checked; ?>/>
<?php _e( 'Enable emojis in comments', 'hello-emoji' ); ?>
</label>
<p class="description"><?php _e( 'Activate to process emojis in comments in addition to post content.', 'hello-emoji' ); ?></p>
<?php
} // END comments()
@@ -15,7 +15,7 @@ This plugin lets you use emoji in WordPress. Get an auto-complete list of emoji

Hello Emoji is more than an a plugin, it represents the hopes of a generation. It is going to be proof of the idea that WordPress represents: that free software can bring people together to accomplish something that they couldn't do themselves, while adding something of value to the commons for all to share.

With Hello Emoji, by typing a ":" in the editor, you'll get an auto-complete list of emoji suggestions. Using emojis in the GitHub style saves you from remembering the emoticons or shortcodes (many plugins use shortcodes to insert the emoji). You could enable or disable emojis in comments in the Writing Settings.
With Hello Emoji, by typing a ":" in the editor, you'll get an auto-complete list of emoji suggestions. Using emojis in the GitHub style saves you from remembering the emoticons or shortcodes (many plugins use shortcodes to insert the emoji). You could enable or disable emojis in comments in the Discussion Settings.

== Installation ==

@@ -57,7 +57,7 @@ Of course! Please come to [our P2](http://make.wpcollab.co) and tell us more!

== Screenshots ==

1. Enable emojis in comments on the Writing Settings page.
1. Enable emojis in comments on the Discussion Settings page.
2. Type a ":" in the editor, you'll get an auto-complete list of emoji suggestions.

== Changelog ==

0 comments on commit e09bcf4

Please sign in to comment.