.htaccess remove .php from routing
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
Flutter Add Camera Permission Request for IOS

Find the info.plist file
And add the following :

<key>NSPhotoLibraryUsageDescription</key>
<string>App needs access to photo lib for profile images</string>

<key>NSCameraUsageDescription</key>
<string>To capture profile photo please grant camera access</string>
Metabox – Starter Profile Form
############################################################################
// Registration Form Custom Fields Configured Here
add_filter( 'rwmb_meta_boxes', 'registration' );
function registration( $meta_boxes ) {
    $meta_boxes[] = [
        'title'  => 'Registration',
        'id'     => 'registration',
        'type'   => 'user',
        'fields' => [],
    ];
    return $meta_boxes;
}
############################################################################
function register_user_profile_fields($meta_boxes) {
    $prefix = 'user_profile_';
    // fields
    $meta_boxes[] = [
        'id'     => $prefix . 'edit_form_basic',
        'title'  => 'Your basic information',
        'type'   => 'user',
        'fields' => [
            [
                'id'   => 'first_name', // THIS
                'name' => 'First Name',
                'type' => 'text',
            ],
            [
                'id'   => 'last_name', // THIS
                'name' => 'Last Name',
                'type' => 'text',
            ],
            [
              'id'       => 'user_email',
              'type'     => 'email',
              'name'     => 'Email address',
              'readonly' => ( wp_get_current_user()->user_email ) ? true : false,
              'required' => true
            ],
            [
              'name' => 'Country Code',
              'id'   => 'mobile_country_code',
              'type' => 'text',
              'required' => true,
            ],
            [
              'name' => 'Contact Number',
              'id'   => 'user_mobile',
              'type' => 'tel',
              'required' => true,
            ],
            [
              'name' => 'Title (Job Role/Position)',
              'id'   => 'user_job_title',
              'type' => 'text',
            ],
        ],
      ];
    return $meta_boxes;
}
add_action( 'rwmb_meta_boxes', 'register_user_profile_fields',2, 1);
############################################################################
//////////////////////////////////////
//  [shortcode_avatar]  //
//////////////////////////////////////
function shortcode_avatar(){
    ob_start();
    include 'avatar.php';
    return ob_get_clean();
}
add_shortcode( 'shortcode_avatar', 'shortcode_avatar');
############################################################################
Vue / Axios Post
axios.post('/your-url-or-api-destination', payload)
.then((response) => {
  // Show Success Message
  this.$bvToast.toast('Terms and Conditions Saved', {
    title: 'Success',
    variant: 'success',
    solid: true
  });
})
.catch((error) => {
  // Show Error Message
  this.$bvToast.toast('Terms and Conditions Not Saved', {
    title: 'Error',
    variant: 'danger',
    solid: true
  });
});

Search

Your Favourite Posts

  • Your favorites will be here.

Latest Content

© Garth Baker 2024 All rights reserved.

Pin It on Pinterest

Share This