summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYury German <blueknight@gentoo.org>2019-05-22 01:01:36 -0400
committerYury German <blueknight@gentoo.org>2019-05-22 01:01:36 -0400
commit0914c92da22824025992c368c745546e41fbeb84 (patch)
tree965f6adf3b725e56d559fe4a93eff02281499dcc /plugins/jetpack/modules/theme-tools/site-logo.php
parentDeleting plugins for update (diff)
downloadblogs-gentoo-0914c92da22824025992c368c745546e41fbeb84.tar.gz
blogs-gentoo-0914c92da22824025992c368c745546e41fbeb84.tar.bz2
blogs-gentoo-0914c92da22824025992c368c745546e41fbeb84.zip
Adding Plugins
Updating the following akismet.4.1.2, google-authenticator.0.52, jetpack.7.3.1 Signed-off-by: Yury German <blueknight@gentoo.org>
Diffstat (limited to 'plugins/jetpack/modules/theme-tools/site-logo.php')
-rw-r--r--plugins/jetpack/modules/theme-tools/site-logo.php46
1 files changed, 46 insertions, 0 deletions
diff --git a/plugins/jetpack/modules/theme-tools/site-logo.php b/plugins/jetpack/modules/theme-tools/site-logo.php
new file mode 100644
index 00000000..04f16b71
--- /dev/null
+++ b/plugins/jetpack/modules/theme-tools/site-logo.php
@@ -0,0 +1,46 @@
+<?php
+/*
+ * Site Logo.
+ * @see http://jetpack.com/support/site-logo/
+ *
+ * This feature will only be activated for themes that declare their support.
+ * This can be done by adding code similar to the following during the
+ * 'after_setup_theme' action:
+ *
+ * $args = array(
+ * 'header-text' => array(
+ * 'site-title',
+ * 'site-description',
+ * ),
+ * 'size' => 'medium',
+ * );
+ * add_theme_support( 'site-logo', $args );
+ *
+ */
+
+/**
+ * Activate the Site Logo plugin.
+ *
+ * @uses current_theme_supports()
+ * @since 3.2
+ */
+function site_logo_init() {
+ // For transferring existing site logo from Jetpack -> Core
+ if ( current_theme_supports( 'custom-logo' ) && ! get_theme_mod( 'custom_logo' ) && $jp_logo = get_option( 'site_logo' ) ) {
+ set_theme_mod( 'custom_logo', $jp_logo['id'] );
+ delete_option( 'site_logo' );
+ }
+
+ // Only load our code if our theme declares support, and the standalone plugin is not activated.
+ if ( current_theme_supports( 'site-logo' ) && ! class_exists( 'Site_Logo', false ) ) {
+ // Load our class for namespacing.
+ require dirname( __FILE__ ) . '/site-logo/inc/class-site-logo.php';
+
+ // Load template tags.
+ require dirname( __FILE__ ) . '/site-logo/inc/functions.php';
+
+ // Load backwards-compatible template tags.
+ require dirname( __FILE__ ) . '/site-logo/inc/compat.php';
+ }
+}
+add_action( 'init', 'site_logo_init' );