File tree Expand file tree Collapse file tree 3 files changed +22
-4
lines changed
Expand file tree Collapse file tree 3 files changed +22
-4
lines changed Original file line number Diff line number Diff line change 7878// deprecated, don't use anymore
7979if ( ! \defined ( 'IMPRESSUM_BASE ' ) ) \define ( 'IMPRESSUM_BASE ' , \plugin_basename ( __FILE__ ) );
8080
81- Impressum::get_instance ()->set_plugin_file ( __FILE__ );
8281Impressum::get_instance ()->init ();
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class Admin {
2424 /**
2525 * @var string The full path to the main plugin file
2626 */
27- public $ plugin_file = '' ;
27+ public $ plugin_file = \ EPI_IMPRESSUM_FILE ;
2828
2929 /**
3030 * Initialize the admin functions.
@@ -616,6 +616,16 @@ public function register_plus_tab( $tabs ) {
616616 * @param string $file The path to the file
617617 */
618618 public function set_plugin_file ( $ file ) {
619+ \_doing_it_wrong (
620+ __METHOD__ ,
621+ \sprintf (
622+ /* translators: alternative method */
623+ \esc_html__ ( 'Use %s instead ' , 'impressum ' ),
624+ 'EPI_IMPRESSUM_FILE '
625+ ),
626+ '2.1.0 '
627+ );
628+
619629 if ( \file_exists ( $ file ) ) {
620630 $ this ->plugin_file = $ file ;
621631 }
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class Impressum {
3434 /**
3535 * @var string The full path to the main plugin file
3636 */
37- public $ plugin_file = '' ;
37+ public $ plugin_file = \ EPI_IMPRESSUM_FILE ;
3838
3939 /**
4040 * @var array All settings fields.
@@ -668,9 +668,18 @@ public function load_textdomain() {
668668 * @param string $file The path to the file
669669 */
670670 public function set_plugin_file ( $ file ) {
671+ \_doing_it_wrong (
672+ __METHOD__ ,
673+ \sprintf (
674+ /* translators: alternative method */
675+ \esc_html__ ( 'Use %s instead ' , 'impressum ' ),
676+ 'EPI_IMPRESSUM_FILE '
677+ ),
678+ '2.1.0 '
679+ );
680+
671681 if ( \file_exists ( $ file ) ) {
672682 $ this ->plugin_file = $ file ;
673- $ this ->admin ->set_plugin_file ( $ this ->plugin_file );
674683 }
675684 }
676685
You can’t perform that action at this time.
0 commit comments