The shape of your layout.

submit / Corisna information

Golovna

Allows you to use one WordPress installation for multiple sites at the same time.

In this case, the site retrieves the data from the table in the database with a unique prefix. Tables with registration data for merchants and partners for all sites in the network. This is an absolute plus: by registering once, you can deny access to up to many sites.

  • Moreover, on each site, the same account record may have different rights.
  • For example, on one site a contributor can be an editor, and on another an administrator.
  • U

initial installation

WordPress page for registration, authorization and password reset, display the file wp-login.php. wp-login.php - authorization wp-login.php?action=register - registration

wp-login.php?action=lostpassword - lost password

In Multisite mode, the WordPress core begins to behave much differently, and when you follow the instructions wp-login.php?action=register, you will be redirected to wp-signup.php.

This is the registration side of your website, as is the case with WordPress. Emergency registration procedure Koristuvak regional records

You can create a new site on it if the superadministrator has enabled this feature in the configured settings (Network Admin → Settings → Network Settings).

Here the registration page does not look very good.

We see it as a problem if all the content sites have one topic, but only one of them has a registration page.

The sites are separated by mine (English and Russian), so the registration page will be displayed on my “native” site.

Since the sites are dedicated to different topics, everything will be based on the same ones that they will go through with the new layout (there is a situation that can guide you to the unification of all your topics) Be sure to process the pages individually.

Alternative to functions.php

File order

MU plugins can accommodate as many files as you like in a structure that seems logical to you.

I would like to approximate this hierarchy:

|

mu-plugins |

|

load.php |

|

selena-network |

|

|

signup |

Function selena_network_signup_page($url) ( return home_url("signup"); ) add_filter("wp_signup_location", "selena_network_signup_page", 99);

selena_network - the prefix that I use in the names of all functions in the middle of MU-plugins on my site for unique collaboration, which should be replaced with your own unique prefix.

The priority of the added filter is 99, so that plugins, for example, bbPress and BuddyPress can rewrite this address to the master (MU plugins are used earlier, lower primary plugins, even more so).

Please note that home_url() is used as a substitute for network_site_url() which gives the address of the streaming site, not the main site of the network.

Functionality wp-signup.php

The wp-signup.php file contains a large number of functions and code.

To get a better idea of ​​the whole picture, you can quickly go through the code.

  • As a rule, in English it is called code folding.
  • On the very head of the file from rows 1 to 80 (in version 4.1.1), various checks are carried out and the “start” of the page is displayed using the help of get_header() .
  • Next, we are afraid of all the methods and before we start working with them, we need to be careful to improve the skin function.
  • In the middle of the pack, other functions with the wpmu_ prefix are often used, all of them can be found in the wp-includes/ms-functions.php file.
  • It is important to understand this section and do not modify the code on your own.
  • Below is a description of the main functions just in case you have any difficulties.
  • wpmu_signup_stylesheet() – display additional CSS on the registration page.
  • show_blog_form() - fields for registering the site (addresses, names of visibility for search engines).
  • validate_blog_form() - verification of the entered address for the site and call wpmu_validate_blog_signup() for help.
  • show_user_form() - fields for registering a customer (login and email address).
  • validate_user_form() - verification of the entered login and email address.

At the very bottom of the wp-signup.php file (number 646 in version 4.1.1) is the main logic of the registration side, which follows all described methods.

This part of the code is not included in the function.

For example, get_footer() is called.

We copy the functionality of wp-signup.php

Next, we will describe the procedure for copying wp-signup.php into the MU plugin and making changes to the fork.

Possibly, you may not be on the right path.

In fact, you can write your own functions from scratch to validate and display forms of the vikory class, rather than the original functions.

In my opinion, wp-signup.php already has all the necessary logic for our page, we just need to make some minor changes. When WordPress is updated, wp-signup.php is changed, but this does not mean that when it is released, you will have to synchronize your “fork”. The functions in the middle of wp-signup.php essentially deal with the output of HTML, the verification of data, the creation of cloud records and sites, which are dealt with by the methods with the wpmu_ prefix, which are declared in ms-functions.php.

Let's take a look at the creation functions, such as displaying the registration form on the page.

To do this, copy wp-signup.php from the WordPress root at mu-plugings/selena-network/signup/.

Let's connect it in mu-plugins/selena-network/signup/plugin.php).

Require WPMU_PLUGIN_DIR .

"/selena-network/signup/wp-signup.php";

We can see from the very beginning of the copied file all the necessary and unnecessary verifications. Version 4.1.1 does not have all the code from rows 1 to 80. Now we are ready to create

main function

Another option is to create a page-signup.php page template in a child topic folder.

Instead of the word "signup" you can use the unique ID provided on the page.

In the middle, add the required layout to the template and create the click selena_network_signup_main() at the required location.

As a result, my registration page began to look much better and cleaner. Activation page According to WordPress, it is smart to divide the registration process in Multisite into two steps - filling out the form on the site and activating the cloud account when you go to receive messages sent to

electronic sheet

.

After you fill out the form created in the previous section, WordPress will add a sheet with a few instructions and instructions for activating a cloud account.

The activation page is shown in the wp-activate.php file, which is located in the WordPress root directory.

wp-activate.php can also be changed completely. The process is similar to what we have already done for wp-signup.php. Let's create the page example.org/activate/ through the standard interface.

As for the address, choose the URL that suits you.

Copy the wp-activate.php file to your MU-plugin and connect it to mu-plugins/selena-network/signup/plugin.php.

Require WPMU_PLUGIN_DIR .

"/selena-network/signup/wp-activate.php";

In the middle there is not so much together, on the wp-signup.php admin.

The activation page is ready to go, but WordPress doesn’t know about it and, like before, the powerful activation page sent to wp-activate.php.

In wp-signup.php there is no filter that allows you to change the address. Then you need to write your function in order to supercharge the sheet with the correct instructions. At the moment of completing the form on the WordPress registration page, click wpmu_signup_ user() or wpmu_signup_ blog() depends on the registration type.

All functions are created Then you need to write your function in order to supercharge the sheet with the correct instructions. new entry user The wp_signups table contains all the necessary information, including the account activation key.

After which, in the function, wpmu_signup_ is called

_notification() or wpmu_signup_

_notification().

Both functions have similar functionality - they generate and enable lists sent for activation, but also accept different arguments.

Both have filters for collecting the liquid.

If (! apply_filters("wpmu_signup_user_notification", $user, $user_email, $key, $meta)) return false;

To activate cloud accounts on your blog:

If (! apply_filters("wpmu_signup_blog_notification", $domain, $path, $title, $user, $user_email, $key, $meta)) ( return false; )

You can solve both problems with one action by asking Apache to return a 404 every time you try to open these pages.

For this, you will also need to write a couple of additional RewriteRules in the configuration file or .htaccess .

RewriteEngine On RewriteBase / # Knowledge of regular expressions will never be missed :) RewriteRule END WordPress

Visnovok

For this and many other problems related to WordPress on the Internet, there is a painless solution.

For example, to create registration and activation pages, you should rewrite the original wp-signup.php and wp-activate.php.

It’s hard to work because when you update WordPress you will spend all the changes made to the files, and you won’t be able to check the integrity of the core for help.

If you develop any additional feature, you should spend a few hours getting to grips with everything that comes with WordPress.

27.03.2015 27.03.2015

For which there is no need for necessary tools.

  • P.S.

    To automatically assign different roles to new members, you can use the Multisite User Management plugin.

    Inspired by the architecture of Symfony components.

    You can create a new site on it if the superadministrator has enabled this feature in the configured settings (Network Admin → Settings → Network Settings).

    We create a custom registration page for a multisite instead of the standard wp-signup.php. For the default WordPress registration page (authorization, password reset), enter the file wp-login.php./wp-login.php - authorization

    /wp-login.php?action=register - registration

    No.

    In this file, it seems, you can guess from any article about WordPress.

    In our opinion, with the understanding that the functionality of registering insurance claims on a number of sites, it is possible to include it in MU-plugins, which will be involved in the creation of any site. Lyrical approach It is important to note that MU plugins will be used before the original plugins and before the WordPress core becomes more important, so clicking on these functions can lead to

    Since the sites are dedicated to different topics, everything will be based on the same ones that they will go through with the new layout (there is a situation that can guide you to the unification of all your topics) Be sure to process the pages individually.

    fatal mercy

    at PHP.

    This kind of “early” attraction has its advantages.

    Let's say, in the end, you can't worry about any actions that need to be done before the functions.php file is associated with them.

    An example of this can be actions with the Jetpack plugin in the form jetpack_module_loaded_related-posts (related-posts is the name of the module) to help you track the activity of modules in Jetpack.

    It is impossible for an action to “become attached” to a file with those, so if the action has already been created before being acquired by those, the plugins will be acquired earlier.

    You can marvel at the cool image of the WordPress site on the Action Reference page of the codex.

    MU plugins can accommodate any number of files or any structure that seems logical to you.

    I would like to approximate this hierarchy:

    |-mu-plugins |-|-load.php |-|-|-selena-network |-|-|-|-signup |-|-|-|-|-plugin.php |-|-|-|

    selena_network - the prefix that I use in the names of all functions in the middle of MU-plugins on my site for avoiding conflict, which should be replaced with your own unique prefix.

    The priority of the added filter is 99, so that plugins, such as bbPress and BuddyPress, can rewrite this address to their own domain (MU plugins are attracted earlier, lower primary plugins, even more so).

    Please note that home_url() is used instead of network_site_url() to disable the advertiser on the same domain. Like the address you can vikoristovat be-yak URL address. Creation of the side

    Now let’s create a page with the address site.com/signup/ through the main interface, and our daughter has a template for our

    new stories

    - page-signup.php.

    Instead of the word signup, you can use a unique ID.

    1. In the middle of the new template, you need to disable the selena_network_signup_main() function to display the registration form.
    2. Please note that the entire process using templates is not complicated, and instead of this you can create your own shortcode, which can also be used with the selena_network_signup_main() function.
    3. wp-signup.php and wp-activate.php
    4. Now let's move on to the creation function, which is to display the registration form.

    For this purpose, we copy the files wp-signup.php and wp-activate.php from the WordPress root at mu-plugings/selena-network/signup/ (and don’t forget to connect them in the middle mu-plugins/selena-network/signup/plugin.php) .

    1. Further manipulations with files are difficult to describe, so you will have to do them yourself.
    2. I’ll just describe what you need to produce and publish the output files of your project:

    On the top of the file, delete all the require , click functions and other code and functions.

    Rename all functions by adding unique prefixes to names.

    The registration page forces the submission of the request form to activate the cloud registration.

    This is handled by the wpmu_signup_user_notification() function from the ms-functions.php file.

    You can assign this functionality to your own function.

    RewriteEngine On RewriteBase / # Knowledge of regular expressions will never be missed :) RewriteRule END WordPress

    The reason why you need to be aware of this function is that it sends the activation message to the cloud account from wp-activate.php. You can “enable” this function using the additional filter wpmu_signup_user_notification, which will return false (as you can’t create one, the activation sheet will be sent to two, okay, actually two different sheets). Function armyofselenagomez_wpmu_signup_user_notification($user, $user_email, $key, $meta = array()) ( // ... // Function code wpmu_signup_user_notification() wp_mail($user_email, wp_specialchars_decode($subject), ; return false; ) add_filter ("wpmu_signup_user_notification", "armyofselenagomez_wpmu_signup_user_notification", 10, 4);

    As a result, the registration page in the Selena topic began to look much cleaner and neater.

    There are not many others on the Internet

    the right ways

    In addition, how to create the same - Apache redirects, AJAX forms, which do not work without Java Script, etc. All this did not work out for me, so I tried to earn it as correctly as possible on the website. I appreciate that you should edit the files carefully and don’t go too far out of the way, so in the future, if you change the files wp-signup.php and wp-activate.php in WordPress, it’s easier for them to match each other for fun n. Don't forget to look at the output code of all the function descriptions to fully understand what's going on in the middle of the code.

    Bonus.

    PS I try to describe in as much detail as possible the actions of third-party speeches, because when I started, there was no one to suggest and explain a lot of speeches.

    I also appreciate that such small points on other materials will help someone to learn something new and expand their knowledge.

    RewriteRule entries have regular expressions, they are not complicated at all, for example, the symbol means the head of a row.. 2000 .

    APOTHEOSIS APOTHEOSIS (from the Greek apotheosis - deification); 1) in Hellenistic Greece and Ancient Rome, the adoration of the sovereign figure, hero, emperor, creating divine essence.:

    In the Renaissance era, the name of the “appearance” was transferred to its image in painting and theater.

    (Knizhkovy.).

    It also developed in the theater of revolutionary eras - in France at the end of the 18th century, in Russia after the Yellow Revolution. 2) In broad terms, it means glorification, exaltation of any individual, appearance, appearance.

    add. (Greek: apotheosis deification).

    apotheotic, ah, oh. Tlumachny dictionary of Ozhegov.

    S.I. Ozhegov, N.Yu.

    Shvedova. 1949… … Tlumachny Dictionary of Ozhegov

    Shvedova.- (from the Greek apotheosis of deification) in ancient times, the ceremony of deification of ancient Greek sovereigns, including Roman emperors. In the theatrical world, apotheosis is called the conclusion of the local mass stage on display either...

    Political Science Dictionary. Jean Auguste Dominique Engr.

    Shvedova."The Apotheosis of Napoleon", 1853 Apotheosis, obsolete. apotheosis ... Wikipedia

    Shvedova. Books Apotheosis of irresponsibility

    (Knizhkovy.).

    --- Search warehouse --- Buffalo Grove IL 60089 USA (Buffalo Grove IL 60089 USA (USA)) 60035 P.O Box 723 No. 24 Istanbul(Istanbul,Gençturk Cad.15, Birlik Han. k-5.d. 55 No. 1) Istanbul Madrid 92200 Neuilly-sur-Seine Republica Moldova, Falesti(s.Fagadau) South Kensington(Bute street) Adler(Quiet lane 2, Kudepsta district) Aktobe(Aktyubinska street 47/2) Almetyevsk(metro station Almetyevsk , vul. 13, office 306) Anapa (Vul. Terska 88, 3 above) Astrakhan (vul. Komunistichna bud. 17, office 4) Atirau (m. Atirau, Azattik Ave. 42, office 206) Berdyansk (Zaporizhzhya region ) Bishkek (metro station Bishkek Ave. Chui 32B Shopping center "Izumrud" office C-5) Blagovishchensk (vul. 50 Rokiv Zhovtnya 15. "Amur Fair" office 575) Buguruslan (vul. Chervonopraporna 47/2) Veliky Ustyug (m. Chervona vul., bld. 61 (2 on top) city center) Vladivostok (Svitlanska vul. 147 office 2/4) Olgograd (Volgograd shosse Aviatorov 15 warehouse 23) Dyurtyuli (Agidel vul. 4 apt. 2) Yisk (vul. .Karla-Marxa 42/1) Yekaterinburg (56 Pershotravneva street, office 308) Yekaterinburg (10 Mamina-Sibiryaka street, office 3) Ivanovo (85G Sheremetyevsky Avenue, Business Center "Premium Plaza" 2 on top, 212) Izhevsk (Lenina 21, office 304). Novoslobidska, Mendelevska, Mayakovska, Biloruska (radial). Velika Girska, 359B, office No. 3) Sevastopol (Ochakovtsiv vul. 19, Plaza center, ground floor, office 29/2) Snizhinsk (Zababakhina vul. 19 a) Sochi (metro Sochi co. Donska Budinok 15.) Sochi (Vul. Radyanska 42, office 204) Stavropol (Vul. Lomonosova 21, office 18) Sterlitamak (Vul. Khudayberdina 85, 3 above) Surgut (Vul. 30 Rokiv Peremogi, no. 64) Tobolsk (metro Tobolsk, 6 microdistrict, 1 1, office 39 (entrance from the side of Komsomolsky Prospekt)) Togliatti (40 rokiv Peremogi, no. 50, office 212a, TD Veselka 1 on top) Tomsk (m. Tomsk vulitsa Radyanska 84) Tuymazi (vul. Michurina no. 15, office 2) Tyumen (72 Herzen street, office 214) Ulyanovsk (73 Ryabikova street) Ust-Kamenogorsk (57 Gorky street, office 213) Ufa (6 Verkhnetorgova square (NESTERIV business center)) Khabarovsk (16 Postisheva street) office z 108) Khanti-Mansiysk (Khanti-Mansiysk, Karl Marx street 15, 2 on top) Chelyabinsk (Peremogi Ave. 168, 3 on top, office 36.) Cherkessk (Lenina street 101) Chita (Babushkina street 104 office 425) Chishmi (Kiltseva 17) Chishmi (DRUZHB Ave., 1B) Switzerland (Arosio via Terra Sotto, 1 6939) Shymkent (Kolgospna st. 47) Pivdenno-Sakhalinsk (trans. Angarsky 21) Yakutsk (Dzerzhinsky vul. 8/3b) Yakutsk (Yakutsk) Yalta (Embankment im Lenina, 5a) Shopping center "Fontan, 4 on top) Yanaul (Radyanska vul., bld. 23, office No. 8 bdivlya Berizka) Yaroslavl (57 Showroom) Yaroslavl (vul. Chkalova bld. 2) m. Birsk Bashkortostan () ?>
  • The Windows 10 computer shutdown timer is a handy option for computer users who often idle robot processes.