Skip to content

Commit

Permalink
Jetpack: Rearrange some of the theme-tools files, and move them into …
Browse files Browse the repository at this point in the history
…the theme-tools sub-folder. This will resolve the glitch where random-redirect.php also showed as a plugin being

deleted if you were deleting Jetpack.  And results in a tidier modules folder.
  • Loading branch information
georgestephanis committed Nov 26, 2013
1 parent 14b8b55 commit 7a3e6bf
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 31 deletions.
10 changes: 0 additions & 10 deletions modules/social-links.php

This file was deleted.

33 changes: 22 additions & 11 deletions modules/theme-tools.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
<?php
/*
* Load code specific to themes or theme tools
* This file is special, and is not an actual `module` as such.
* It is included by ./module-extras.php
*/


function jetpack_load_theme_tools() {
if ( current_theme_supports( 'social-links' ) ) {
require_once( JETPACK__PLUGIN_DIR . 'modules/theme-tools/social-links.php' );
}

if ( current_theme_supports( 'tonesque' ) ) {
jetpack_require_lib( 'tonesque' );
}

require_once( JETPACK__PLUGIN_DIR . 'modules/theme-tools/random-redirect.php' );
}
add_action( 'init', 'jetpack_load_theme_tools', 30 );

// Featured Content has an internal check for theme support in the constructor.
require_once( JETPACK__PLUGIN_DIR . 'modules/theme-tools/featured-content.php' );

/**
* INFINITE SCROLL
*/
Expand Down Expand Up @@ -51,15 +69,8 @@ function jetpack_can_activate_infinite_scroll( $can_activate ) {
}
add_filter( 'jetpack_can_activate_infinite-scroll', 'jetpack_can_activate_infinite_scroll' );

require_once( dirname( __FILE__ ) . '/featured-content/featured-content.php' );

require_once( dirname( __FILE__ ) . '/social-links.php' );

require_once( dirname( __FILE__ ) . '/tonesque.php' );

// Custom Post Types - we don't want a module card for these (yet)
require_once( dirname( __FILE__ ) . '/custom-post-types/comics.php' );
require_once( dirname( __FILE__ ) . '/custom-post-types/testimonial.php' );
require_once( dirname( __FILE__ ) . '/custom-post-types/nova.php' );
require_once( JETPACK__PLUGIN_DIR . 'modules/custom-post-types/comics.php' );
require_once( JETPACK__PLUGIN_DIR . 'modules/custom-post-types/testimonial.php' );
require_once( JETPACK__PLUGIN_DIR . 'modules/custom-post-types/nova.php' );

require_once( dirname( __FILE__ ) . '/random-redirect.php' );
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 0 additions & 10 deletions modules/tonesque.php

This file was deleted.

0 comments on commit 7a3e6bf

Please sign in to comment.