Home > AI > Backend > Wordpress >

plugins_loaded

Example:

/**
 * Include relevant files
 *
 * @since 0.1.0
 */
function _wp_user_profiles() {

	// Get the plugin path
	$plugin_path = plugin_dir_path( __FILE__ ) . 'wp-user-profiles/';

	// Sections
	require_once $plugin_path . 'includes/sections/base.php';
	require_once $plugin_path . 'includes/sections/profile.php';
	require_once $plugin_path . 'includes/sections/account.php';
	require_once $plugin_path . 'includes/sections/options.php';
	require_once $plugin_path . 'includes/sections/other.php';
	require_once $plugin_path . 'includes/sections/permissions.php';
	require_once $plugin_path . 'includes/sections/sites.php';

	// Meta Boxes
	require_once $plugin_path . 'includes/metaboxes/all-status.php';
	require_once $plugin_path . 'includes/metaboxes/account-email.php';
	require_once $plugin_path . 'includes/metaboxes/account-language.php';
	require_once $plugin_path . 'includes/metaboxes/account-password.php';
	require_once $plugin_path . 'includes/metaboxes/account-applications.php';
	require_once $plugin_path . 'includes/metaboxes/account-sessions.php';
	require_once $plugin_path . 'includes/metaboxes/options-color-scheme.php';
	require_once $plugin_path . 'includes/metaboxes/options-contact.php';
	require_once $plugin_path . 'includes/metaboxes/options-personal.php';
	require_once $plugin_path . 'includes/metaboxes/other-all.php';
	require_once $plugin_path . 'includes/metaboxes/permissions-capabilities.php';
	require_once $plugin_path . 'includes/metaboxes/permissions-roles.php';
	require_once $plugin_path . 'includes/metaboxes/profile-about.php';
	require_once $plugin_path . 'includes/metaboxes/profile-name.php';
	require_once $plugin_path . 'includes/metaboxes/sites-list.php';
	require_once $plugin_path . 'includes/metaboxes/sites-primary.php';

	// Required Files
	require_once $plugin_path . 'includes/admin.php';
	require_once $plugin_path . 'includes/capabilities.php';
	require_once $plugin_path . 'includes/dependencies.php';
	require_once $plugin_path . 'includes/common.php';
	require_once $plugin_path . 'includes/help.php';
	require_once $plugin_path . 'includes/metaboxes.php';
	require_once $plugin_path . 'includes/screen-options.php';
	require_once $plugin_path . 'includes/sections.php';
	require_once $plugin_path . 'includes/status.php';
	require_once $plugin_path . 'includes/hooks.php';

	// Load translations
	load_plugin_textdomain( 'wp-user-profiles' );
}
add_action( 'plugins_loaded', '_wp_user_profiles' );

Leave a Reply