diff --git a/THEMES.md b/THEMES.md new file mode 100644 index 00000000..67e1a558 --- /dev/null +++ b/THEMES.md @@ -0,0 +1,7 @@ +# Friends Themes + +Here you can find themes that have been created for the Friends plugin. + +- [Mastodon-like interface](https://github.com/akirk/friends-mastodon-like-interface) + +If you want to create your own theme, take a look at the [wiki page on Writing Themes](https://github.com/akirk/friends/wiki/Writing-Themes). diff --git a/includes/class-frontend.php b/includes/class-frontend.php index eb4c36ab..ee4f9b15 100644 --- a/includes/class-frontend.php +++ b/includes/class-frontend.php @@ -111,7 +111,7 @@ private function register_hooks() { add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); add_action( 'template_redirect', array( $this, 'load_theme' ) ); add_action( 'customize_loaded_components', array( $this, 'ensure_widget_editing' ) ); - add_action( 'friends_activate_theme_default', array( $this, 'default_theme' ) ); + add_action( 'friends_load_theme_default', array( $this, 'default_theme' ) ); add_action( 'friends_template_paths', array( $this, 'friends_template_paths' ) ); add_action( 'wp_enqueue_scripts', array( $this, 'dequeue_scripts' ), 99999 ); add_action( 'wp_footer', array( $this, 'dequeue_scripts' ) ); @@ -253,17 +253,17 @@ public function load_theme() { $theme = $post_type_theme; } } - if ( ! has_action( 'friends_activate_theme_' . $theme ) ) { + if ( ! has_action( 'friends_load_theme_' . $theme ) ) { $theme = 'default'; } $this->theme = $theme; - do_action( 'friends_activate_theme_' . $theme ); + do_action( 'friends_load_theme_' . $theme ); } public function friends_template_paths( $file_paths ) { $backup_file_paths = $file_paths; - if ( has_filter( 'friends_theme_template_paths_' . $this->theme ) ) { - $file_paths = apply_filters( 'friends_theme_template_paths_' . $this->theme, $file_paths ); + if ( has_filter( 'friends_template_paths_theme_' . $this->theme ) ) { + $file_paths = apply_filters( 'friends_template_paths_theme_' . $this->theme, $file_paths ); } if ( empty( $file_paths ) ) { return $backup_file_paths; diff --git a/templates/admin/settings.php b/templates/admin/settings.php index 7eebcec6..4b937431 100644 --- a/templates/admin/settings.php +++ b/templates/admin/settings.php @@ -263,7 +263,7 @@