Skip to content
This repository was archived by the owner on Nov 9, 2020. It is now read-only.

Commit 9df7681

Browse files
committed
Use ap_option_groups for registering options
1 parent 9a133c9 commit 9df7681

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

anspress_email.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function __construct() {
7474

7575
// internationalization
7676
add_action( 'init', array( $this, 'textdomain' ) );
77-
add_action( 'init', array( $this, 'register_option' ), 100 );
77+
add_action( 'ap_option_groups', array( $this, 'register_option' ), 100 );
7878

7979
add_action( 'ap_after_new_question', array( $this, 'ap_after_new_question' ) );
8080
add_action( 'ap_after_new_answer', array( $this, 'ap_after_new_answer' ) );
@@ -189,10 +189,6 @@ public function value($name) {
189189
* Register options
190190
*/
191191
public function register_option() {
192-
if ( ! is_admin() ) {
193-
return;
194-
}
195-
196192
// Register general settings.
197193
ap_register_option_group('email', __( 'Email', 'AnsPress_Email' ) , array(
198194
array(

readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?business=rah12@live.com&cmd=_
44
Tags: anspress, question, answer, q&a, forum, stackoverflow, quora
55
Requires at least: 3.5.1
66
Tested up to: 4.4
7-
Stable tag: 1.3
7+
Stable tag: 2.0.0
88
License: GPLv2 or later
99
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1010

0 commit comments

Comments
 (0)