[Branda] Auto-create page .

0

Hi . Sometimes on mutlisite we need to help user un just .

When user or superadmin create a website, the submission auto-create 2 pages: privacy ( the possibility to translate) and custom page.

Custom-page: Via Branda, the superadmin configure the custom-page ( title and content). you can add more custom page.

privacy page : a page whith the RGPD and the Terms & Privacy text . (possibility to translate the text). The plugin auto generate(like jetpack do) the content and personalize text with the title of the website , the site name, the site url …

So, the function auto create page is separate in two part privacy and custom-page.

Privacy section get this options:

– activate or desactivate privacy .

– enter the name of your multisite compagnie: (text field)

– enter the contact and adress of your multisite compagnie: (text field)

– enter the names of your host (text field)

– enter your host contact and adress (large text field)

– enter personalized text to add at the end ( or top) of ( large text fields)

  • Nithin Ramdas
    • Support Wizard

    Hi leroy,

    If I’m not wrong, instead of having the default Sample Page, and Hello World post for newly created subsites. A new feature to override those pages, and Auto-create privacy, and custom pages via the Branda side, right?

    I’m not sure how well this could be looked upon within Branda and what all aspects would fit within its existing workflow. However, a feature to Auto-create page does sound like a handy feature. I’ll make sure to bring your feedbacks, and suggestion regarding this to our team, and discussing further the possibilities.

    We really appreciate your feedback. Have a great weekend.

    Kind Regards,

    Nithin

  • leroy
    • Site Builder, Child of Zeus

    Hello yes . Auto-create privacy without override. i made a litlle test plugin . this is the code:

    first file :

    <?php

    /*
    Plugin Name: FCSF rgpd
    Plugin URI:
    Description: Auto creat privacy page for the new site , and add privacy to existant site . <code>My</code>privacy get RGPD customize by site info.
    Version:

    0.7

    Author: AlbertML-Xalone

    Author URI:

    License: GPL2

    License URI: https://www.gnu.org/licenses/gpl-2.0.html

    Text Domain: xalone

    Domain Path: /languages

    */

    add_action(‘wpmu_new_blog’, ‘wpb_create_fcsf_pages’, 10, 2);

    function wpb_create_fcsf_pages($blog_id, $user_id){

    switch_to_blog($blog_id);

    $site_title = get_bloginfo( ‘name’ );

    $site_url = network_site_url( ‘/’ );

    $site_description = get_bloginfo( ‘description’ );

    // create page privacy : rgpd content.

    //contenu de rgpd

    $rgpdinc = include( plugin_dir_path( __FILE__ ) . ‘inc/rgpd.php’:wink:;

    $rgpd = eval($rgpdinc);

    $page_id = wp_insert_post(array(

    ‘post_title’ => ‘Privacy’,

    ‘post_name’ => ‘privacy’,

    ‘post_content’ => $rgpd,

    ‘post_status’ => ‘publish’,

    ‘post_author’ => $user_id, // or “1” (super-admin?)

    ‘post_type’ => ‘page’,

    ‘menu_order’ => 1,

    ‘comment_status’ => ‘closed’,

    ‘ping_status’ => ‘closed’,

    ));

    restore_current_blog();

    }

    The second files is the rgpd content: rgpd.php

    <?php

    // texte de la rgpd qui se ra ajouté.

    // dans la V2 on va aller ici le Blog1 chercher le le post id 2 et fficher le content de ce post .

    // V1

    ?>

    <h2>Qui sommes-nous ?</h2>

    <p> Nom:’ <?php echo $site_title; ?>
    Adresse du site:<?php echo $site_url; ?>
    description:<?php echo $site_description; ?>
    </p>

    <p>Type de structure: associative – </p>

    <p>Adresse: </p>

    <h2>Utilisation des données personnelles collectées</h2>

    <h3>Commentaires</h3>

    <p> super ca fonctionne</p>

    `

    Hope that’s could help