Advertisement
Guest User

Untitled

a guest
Dec 30th, 2024
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.16 KB | None | 0 0
  1. add_action( 'mainwp_manage_sites_edit', 'jkws_mainwp_manage_sites_edit', 10, 1 );
  2. function jkws_mainwp_manage_sites_edit( $website ) {
  3.     $webhost  = apply_filters( 'mainwp_getwebsiteoptions', false, $website, 'webhost' );
  4.     ?>
  5.     <h3 class="ui dividing header">Additional information (Optional)</h3>
  6.     <div class="ui grid field mainwp_addition_fields_addsite">
  7.         <label class="six wide column middle aligned"><?php esc_html_e( 'Webhost', 'mainwp' ); ?></label>
  8.         <div class="ui six wide column" data-tooltip="<?php esc_attr_e( 'Webhost', 'mainwp' ); ?>" data-inverted="" data-position="top left">
  9.             <div class="ui left labeled input">
  10.                 <input type="text" id="mainwp_managesites_edit_webhost" name="mainwp_managesites_edit_webhost" value="<?php echo esc_html($webhost); ?>"/>
  11.             </div>
  12.         </div>
  13.     </div>
  14.     <?php
  15. }
  16.  
  17. //  Update the Webhost field in the database of the edited site
  18. add_action( 'mainwp_site_added', 'jkws_mainwp_site_added', 10, 2 );
  19. function jkws_mainwp_site_added( $website, $information ) {
  20. // do addition process with custom $_POST fields, for example: mainwp_managesites_edit_webhost
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement