This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<scrip> | |
$.ajax({ | |
type:'post', | |
url : ajax_url, | |
data: { | |
action:'hello_ajax' | |
}, | |
success: function (response) { | |
consloe.log(responce); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// register javascripts | |
qw_apply_filter('enqueue_scripts','qw_admin_enqueue_scripts'); | |
function qw_admin_enqueue_scripts($src){ | |
if (qa_request() == 'themeoptions') { | |
$src['qw_admin'] = QW_CONTROL_URL . '/js/admin.js'; | |
} | |
$src['jquery'] = QW_CONTROL_URL. '/js/jquery-1.11.0.min.js'; | |
return $src; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//like you want to override form_field($field, $style), then do this: | |
qw_add_action('form_field', 'my_form_field_override'); | |
function my_form_field_override($themeclass, $field, $style){ | |
if (@$field['type'] == 'qw_qaads_multi_text') { | |
$themeclasss->form_prefix($field, $style); | |
$themeclass->qw_qaads_form_multi_text($field, $style); | |
$themeclass->form_suffix($field, $style); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// register position name | |
qw_apply_filter('widget_positions', 'qw_register_widget_positions'); | |
function qw_register_widget_positions($positions){ | |
$new_positions = array( | |
'My Custom Position' => 'Below header', | |
'My Custom Footer' => 'Custom footer position', | |
); | |
return array_merge($positions, $new_positions); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Short version: you can simply use below line | |
add_filter('ap_user_profile_active', '__return_false'); | |
//Long version: if you dont understand what above code is for then this code will will tell you | |
function my_disable_anspres_profile(){ | |
return false; | |
} | |
add_filter('ap_user_profile_active', 'my_disable_anspres_profile'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Filter for altering link from question list tab | |
* @param array $nav contain link of tab in array | |
* @return array | |
*/ | |
function my_alter_ap_tab_item($nav){ | |
$nav['newest']['title'] = __('Latst'); | |
return $nav; | |
} | |
add_filter('ap_questions_tab', 'my_alter_ap_tab_item'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Short version: you can simply use below line | |
add_filter('ap_user_profile_active', '__return_false'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php the_widget( 'AnsPress_Subscribe_Widget' ); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* add category field in ask form | |
* @param array $validate | |
* @return void | |
*/ | |
function ask_from_category_field($args, $editing){ | |
if(wp_count_terms('question_category') == 0) | |
return $args; | |
global $editing_post; |
OlderNewer