Code Duplication    Length = 13-13 lines in 2 locations

includes/class-sensei-emails.php 2 locations

@@ 89-101 (lines=13) @@
86
	 * @access public
87
	 * @return string
88
	 */
89
	function get_from_name() {
90
91
92
		if ( ! $this->_from_name ) {
93
			if( isset( Sensei()->settings->settings['email_from_name'] ) && '' != Sensei()->settings->settings['email_from_name'] ) {
94
				$this->_from_name = Sensei()->settings->settings['email_from_name'];
95
			} else {
96
				$this->_from_name = get_bloginfo( 'name' );
97
			}
98
		}
99
100
		return wp_specialchars_decode( $this->_from_name );
101
	}
102
103
	/**
104
	 * Get from email address.
@@ 109-121 (lines=13) @@
106
	 * @access public
107
	 * @return string
108
	 */
109
	function get_from_address() {
110
111
112
		if ( ! $this->_from_address ) {
113
			if( isset( Sensei()->settings->settings['email_from_address'] ) && '' != Sensei()->settings->settings['email_from_address'] ) {
114
				$this->_from_address = Sensei()->settings->settings['email_from_address'];
115
			} else {
116
				$this->_from_address = get_bloginfo( 'admin_email' );
117
			}
118
		}
119
120
		return $this->_from_address;
121
	}
122
123
	/**
124
	 * Get the content type for the email.