AnsPress_Profile_Hooks::init()
Description #
Initialize the plugin by setting localization and loading public scripts and styles.
Source #
File: addons/free/profile.php
public static function init() {
ap_add_default_options([
'user_page_slug_questions' => 'questions',
'user_page_slug_answers' => 'answers',
'user_page_title_questions' => __( 'Questions', 'anspress-question-answer' ),
'user_page_title_answers' => __( 'Answers', 'anspress-question-answer' ),
]);
anspress()->add_action( 'ap_form_addon-free_profile', __CLASS__, 'options' );
ap_register_page( 'user', __( 'User profile', 'anspress-question-answer' ), [ __CLASS__, 'user_page' ], true, true );
anspress()->add_action( 'ap_rewrites', __CLASS__, 'rewrite_rules', 10, 3 );
//anspress()->add_filter( 'ap_menu_link', __CLASS__, 'menu_link', 10, 2 );
anspress()->add_action( 'ap_ajax_user_more_answers', __CLASS__, 'load_more_answers', 10, 2 );
anspress()->add_filter( 'wp_title', __CLASS__, 'page_title' );
anspress()->add_action( 'the_post', __CLASS__, 'filter_page_title' );
anspress()->add_filter( 'ap_current_page', __CLASS__, 'ap_current_page' );
anspress()->add_filter( 'posts_pre_query', __CLASS__, 'modify_query_archive', 999, 2 );
}
Expand full source code Collapse full source code View on GitHub: addons/free/profile.php:35
Add your comment