some problem with plugin

Hello everyone i need some help with end my plugin, all work but i dont know
How to make static texts translated and how to remove html tags for everything to work i work on this all code 1 week so please tell me how i can end it :D.


add_action( 'admin_menu', 'Terms_and_conditions_menu' );

// Add to WordPress admin menu
if( !function_exists("Terms_and_conditions_menu") )
function Terms_and_conditions_menu(){

  $page_title = 'WordPress Extra Post Info';
  $menu_title = 'Terms And Conditions';
  $capability = 'manage_options';
  $menu_slug  = 'terms-post-info';
  $function   = 'terms_post_info_page';
  $icon_url   = 'dashicons-media-code';
  $position   = 4;

  add_menu_page( $page_title,
                 $position );

  // update_terms_condition_info update database
  add_action( 'admin_init', 'update_terms_condition_info' );


// This function register on database
if( !function_exists("update_terms_condition_info") )
function update_terms_condition_info() {
  register_setting( 'terms-conditions-info-settings', 'terms_post_info' );

// Page our plugin
if( !function_exists("terms_post_info_page") )
function terms_post_info_page(){
  <h1>Terms And Condition</h1>
  <form method="post" action="options.php">
    <?php settings_fields( 'terms-conditions-info-settings' ); ?>
    <?php do_settings_sections( 'terms-conditions-info-settings' ); ?>
    <table class="form-table">
      <tr valign="top">
      <th scope="row">Terms and condition link:</th>
      <td><input type="text" name="terms_post_info" value="<?php echo get_option('terms_post_info'); ?>"/></td>
  <?php submit_button(); ?>

add_filter("wpjb_form_init_company", "mod_wpjb_tos_field");
add_filter("wpjr_form_init_register", "mod_wpjb_tos_field");

function mod_wpjb_tos_field($form) {

    if(is_admin() || $form instanceof Daq_Form_ObjectAbstract && !$form->isNew()) {
        return $form;

    // change terms-and-conditions to your ToS page slug,
    // or create a Page with slug terms-and-conditions
    $page = get_page_by_path("terms-and-conditions");

    if($page) {
        $url = get_permalink($page->ID);
    } else {
        $url = get_option__('terms_post_info');

    $form->addGroup("tos", "Terms and Conditions");

    $e = $form->create("uterms", "checkbox");
    $e->setLabel(__("Terms And Conditions", "wpjobboard"));
    $e->addOption(1, 1, "I have read and agree to the <a href="$url">Terms and Conditions</a>.");
    $e->addFilter(new Daq_Filter_Int());
    $form->addElement($e, "tos");

    return $form;


Read more here: some problem with plugin

Leave a Reply

Your email address will not be published. Required fields are marked *