mirror of
https://github.com/10h30/trestle.git
synced 2026-07-14 04:06:25 +09:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7ec25a1c8d | |||
| ea717c00ff | |||
| 7ffeb0c85f | |||
| 9d30ddbed5 | |||
| 94f2276f7e | |||
| 7e994c85e8 | |||
| 86e64b007c | |||
| 00be1d2046 | |||
| f24364e114 |
+1
-1
@@ -49,7 +49,7 @@ function trestle_theme_setup() {
|
|||||||
// Child theme definitions (do not remove).
|
// Child theme definitions (do not remove).
|
||||||
define( 'TRESTLE_THEME_NAME', 'Trestle' );
|
define( 'TRESTLE_THEME_NAME', 'Trestle' );
|
||||||
define( 'TRESTLE_THEME_URL', 'http://demo.mightyminnow.com/theme/trestle/' );
|
define( 'TRESTLE_THEME_URL', 'http://demo.mightyminnow.com/theme/trestle/' );
|
||||||
define( 'TRESTLE_THEME_VERSION', '2.0.0' );
|
define( 'TRESTLE_THEME_VERSION', '2.0.1' );
|
||||||
define( 'TRESTLE_SETTINGS_FIELD', 'trestle-settings' );
|
define( 'TRESTLE_SETTINGS_FIELD', 'trestle-settings' );
|
||||||
|
|
||||||
// Setup default theme settings.
|
// Setup default theme settings.
|
||||||
|
|||||||
@@ -85,7 +85,11 @@ add_action( 'admin_enqueue_scripts', 'trestle_admin_actions' );
|
|||||||
*/
|
*/
|
||||||
function trestle_admin_actions() {
|
function trestle_admin_actions() {
|
||||||
|
|
||||||
// Include the main stylesheet in the editor
|
// Google fonts.
|
||||||
|
$font_url = str_replace( ',', '%2C', '//fonts.googleapis.com/css?family=Lato:300,400,700' );
|
||||||
|
add_editor_style( $font_url );
|
||||||
|
|
||||||
|
// Include the main stylesheet in the editor.
|
||||||
add_editor_style( get_stylesheet_uri() );
|
add_editor_style( get_stylesheet_uri() );
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -293,4 +297,4 @@ function trestle_register_required_plugins() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
tgmpa( $plugins, $config );
|
tgmpa( $plugins, $config );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -308,6 +308,9 @@ class Better_Font_Awesome_Library {
|
|||||||
// Parse the initialization args with the defaults.
|
// Parse the initialization args with the defaults.
|
||||||
$this->parse_args( $args );
|
$this->parse_args( $args );
|
||||||
|
|
||||||
|
// Setup root URL, which differs for plugins vs. themes.
|
||||||
|
$this->setup_root_url();
|
||||||
|
|
||||||
// Set fallback stylesheet directory URL and path.
|
// Set fallback stylesheet directory URL and path.
|
||||||
$this->setup_fallback_data();
|
$this->setup_fallback_data();
|
||||||
|
|
||||||
@@ -345,6 +348,45 @@ class Better_Font_Awesome_Library {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set up root URL for library, which differs for plugins vs. themes.
|
||||||
|
*
|
||||||
|
* @since 1.0.4
|
||||||
|
*/
|
||||||
|
function setup_root_url() {
|
||||||
|
|
||||||
|
// Get BFA directory and theme root directory paths.
|
||||||
|
$bfa_directory = dirname(__FILE__);
|
||||||
|
$theme_directory = get_stylesheet_directory();
|
||||||
|
$plugin_dir = plugin_dir_url( __FILE__ );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if we're inside a theme or plugin.
|
||||||
|
*
|
||||||
|
* If we're in a theme, than plugin_dir_url() will return a
|
||||||
|
* funky URL that includes the actual file path (e.g.
|
||||||
|
* /srv/www/site_name/wp-content/...)
|
||||||
|
*/
|
||||||
|
$is_theme = false;
|
||||||
|
if ( strpos( $plugin_dir, $bfa_directory ) !== false ) {
|
||||||
|
$is_theme = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// First check if we're inside a theme.
|
||||||
|
if ( $is_theme ) {
|
||||||
|
|
||||||
|
// Get relative BFA directory by removing theme root directory path.
|
||||||
|
$bfa_rel_path = str_replace( $theme_directory, '', $bfa_directory );
|
||||||
|
$this->root_url = trailingslashit( get_stylesheet_directory_uri() . $bfa_rel_path );
|
||||||
|
|
||||||
|
} else { // Otherwise we're inside a plugin.
|
||||||
|
|
||||||
|
$this->root_url = trailingslashit( plugin_dir_url( __FILE__ ) );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set up data for the local fallback version of Font Awesome.
|
* Set up data for the local fallback version of Font Awesome.
|
||||||
*
|
*
|
||||||
@@ -366,7 +408,7 @@ class Better_Font_Awesome_Library {
|
|||||||
|
|
||||||
// Set fallback path and URL.
|
// Set fallback path and URL.
|
||||||
$this->fallback_data['path'] = $directory_path . 'css/font-awesome' . $this->get_min_suffix() . '.css';
|
$this->fallback_data['path'] = $directory_path . 'css/font-awesome' . $this->get_min_suffix() . '.css';
|
||||||
$this->fallback_data['url'] = plugins_url( $this->fallback_data['directory'] . 'css/font-awesome' . $this->get_min_suffix() . '.css', dirname( $directory_path ) );
|
$this->fallback_data['url'] = $this->root_url . $this->fallback_data['directory'] . 'css/font-awesome' . $this->get_min_suffix() . '.css';
|
||||||
|
|
||||||
// Get the fallback version based on package.json.
|
// Get the fallback version based on package.json.
|
||||||
$fallback_json_file_path = $directory_path . 'package.json';
|
$fallback_json_file_path = $directory_path . 'package.json';
|
||||||
@@ -965,9 +1007,9 @@ class Better_Font_Awesome_Library {
|
|||||||
* being used.
|
* being used.
|
||||||
*/
|
*/
|
||||||
if ( version_compare( $tinymce_version, '4000', '>=' ) ) {
|
if ( version_compare( $tinymce_version, '4000', '>=' ) ) {
|
||||||
$plugin_array['bfa_plugin'] = plugins_url( 'js/tinymce-icons.js', __FILE__ );
|
$plugin_array['bfa_plugin'] = $this->root_url . 'js/tinymce-icons.js';
|
||||||
} else {
|
} else {
|
||||||
$plugin_array['bfa_plugin'] = plugins_url( 'js/tinymce-icons-old.js', __FILE__ );
|
$plugin_array['bfa_plugin'] = $this->root_url . 'js/tinymce-icons-old.js';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $plugin_array;
|
return $plugin_array;
|
||||||
@@ -1013,7 +1055,7 @@ class Better_Font_Awesome_Library {
|
|||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function register_custom_admin_css() {
|
public function register_custom_admin_css() {
|
||||||
wp_enqueue_style( self::SLUG . '-admin-styles', plugins_url( 'css/admin-styles.css', __FILE__ ) );
|
wp_enqueue_style( self::SLUG . '-admin-styles', $this->root_url . 'css/admin-styles.css' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -5,10 +5,10 @@
|
|||||||
Description: Trestle is a Genesis child theme for developers based on the default <a href="http://www.genesisframework.com/">Genesis 2.0 Sample Theme</a>. It features mobile first CSS, helpful theme options, and lots more tools to support your development process.
|
Description: Trestle is a Genesis child theme for developers based on the default <a href="http://www.genesisframework.com/">Genesis 2.0 Sample Theme</a>. It features mobile first CSS, helpful theme options, and lots more tools to support your development process.
|
||||||
Author: MIGHTYminnow
|
Author: MIGHTYminnow
|
||||||
Author URI: http://www.mightyminnow.com/
|
Author URI: http://www.mightyminnow.com/
|
||||||
Version: 1.1.0
|
Version: 2.0.1
|
||||||
Tags: black, gray, red, white, light, one-column, two-columns, three-columns, left-sidebar, right-sidebar, fluid-layout, responsive-layout, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, flexible-header, front-page-post-form, full-width-template, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, genesis, mobile-first, responsive, clean
|
Tags: black, gray, red, white, light, one-column, two-columns, three-columns, left-sidebar, right-sidebar, fluid-layout, responsive-layout, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, flexible-header, front-page-post-form, full-width-template, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, genesis, mobile-first, responsive, clean
|
||||||
Text Domain: trestle
|
Text Domain: trestle
|
||||||
GitHub Theme URI: mickeykay/trestle
|
GitHub Theme URI: MIGHTYminnow/trestle
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Table of Contents
|
/* Table of Contents
|
||||||
@@ -151,8 +151,11 @@ body {
|
|||||||
line-height: 1.625;
|
line-height: 1.625;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Used in the editor */
|
||||||
body.mce-content-body {
|
body.mce-content-body {
|
||||||
width: 100%; /* Used in the editor */
|
width: auto;
|
||||||
|
margin: 10px;
|
||||||
|
float: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.bubble {
|
body.bubble {
|
||||||
@@ -2023,6 +2026,19 @@ Site Footer
|
|||||||
General Components
|
General Components
|
||||||
---------------------------------------------------------------------------------------------------- */
|
---------------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
/* jQuery UI
|
||||||
|
--------------------------------------------- */
|
||||||
|
|
||||||
|
/* Datepicker */
|
||||||
|
|
||||||
|
table.ui-datepicker-calendar {
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-datepicker select {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
/* Search Form
|
/* Search Form
|
||||||
--------------------------------------------- */
|
--------------------------------------------- */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user