- code review for reset password link;

This commit is contained in:
nikitasinelnikov
2019-05-05 23:01:07 +03:00
parent 8e3a42d453
commit e101bdbb39
8 changed files with 58 additions and 44 deletions
+13 -5
View File
@@ -1,14 +1,17 @@
<?php
namespace um\core;
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) exit;
if ( ! class_exists( 'um\core\Modal' ) ) {
/**
* Class Modal
*
* @package um\core
*/
class Modal {
@@ -18,17 +21,22 @@ if ( ! class_exists( 'um\core\Modal' ) ) {
* Modal constructor.
*/
function __construct() {
add_action('wp_footer', array(&$this, 'load_modal_content'), 9);
add_action( 'wp_footer', array(&$this, 'load_modal_content' ), 9 );
}
/**
* Load modal content
*/
function load_modal_content(){
if ( !is_admin() ) {
foreach( glob( um_path . 'templates/modal/*.php' ) as $modal_content) {
include_once $modal_content;
function load_modal_content() {
if ( ! is_admin() ) {
$modal_templates = glob( um_path . 'templates/modal/*.php' );
if ( ! empty( $modal_templates ) ) {
foreach ( $modal_templates as $modal_content ) {
include_once $modal_content;
}
}
}