9 Commits

Author SHA1 Message Date
Braad Martin 7ec25a1c8d Bump the version number to 2.0.1 2015-05-19 20:25:55 -07:00
Braad ea717c00ff Include Lato in the editor 2015-05-14 00:58:14 -07:00
Braad 7ffeb0c85f Fix margins on content in the editor 2015-05-14 00:47:36 -07:00
Braad 9d30ddbed5 Fix BFA paths
- Introduce setup_root_url() from latest version of the Better Font Awesome Library
- Switch to using new root_url var in place of plugins_url()
- This fixes issue #13
2015-05-14 00:32:22 -07:00
MickeyKay 94f2276f7e Remove test comment. 2015-05-12 13:57:21 -07:00
MickeyKay 7e994c85e8 Merge branch 'master' of https://github.com/MIGHTYminnow/trestle 2015-05-12 13:56:44 -07:00
MickeyKay 86e64b007c Test comment 2015-05-12 13:56:17 -07:00
Mickey Kay 00be1d2046 Merge pull request #12 from BraadMartin/master
Fix for jQuery UI datepicker CSS issue
2015-05-12 13:34:46 -07:00
Braad f24364e114 Fix for jQuery UI datepicker CSS issue 2015-05-12 12:38:03 -07:00
4 changed files with 72 additions and 10 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ function trestle_theme_setup() {
// Child theme definitions (do not remove).
define( 'TRESTLE_THEME_NAME', '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' );
// Setup default theme settings.
+6 -2
View File
@@ -85,7 +85,11 @@ add_action( 'admin_enqueue_scripts', '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() );
}
@@ -293,4 +297,4 @@ function trestle_register_required_plugins() {
);
tgmpa( $plugins, $config );
}
}
@@ -308,6 +308,9 @@ class Better_Font_Awesome_Library {
// Parse the initialization args with the defaults.
$this->parse_args( $args );
// Setup root URL, which differs for plugins vs. themes.
$this->setup_root_url();
// Set fallback stylesheet directory URL and path.
$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.
*
@@ -366,7 +408,7 @@ class Better_Font_Awesome_Library {
// Set fallback path and URL.
$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.
$fallback_json_file_path = $directory_path . 'package.json';
@@ -965,9 +1007,9 @@ class Better_Font_Awesome_Library {
* being used.
*/
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 {
$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;
@@ -1013,7 +1055,7 @@ class Better_Font_Awesome_Library {
* @since 1.0.0
*/
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' );
}
/**
+19 -3
View File
@@ -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.
Author: MIGHTYminnow
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
Text Domain: trestle
GitHub Theme URI: mickeykay/trestle
GitHub Theme URI: MIGHTYminnow/trestle
*/
/* Table of Contents
@@ -151,8 +151,11 @@ body {
line-height: 1.625;
}
/* Used in the editor */
body.mce-content-body {
width: 100%; /* Used in the editor */
width: auto;
margin: 10px;
float: none;
}
body.bubble {
@@ -2023,6 +2026,19 @@ Site Footer
General Components
---------------------------------------------------------------------------------------------------- */
/* jQuery UI
--------------------------------------------- */
/* Datepicker */
table.ui-datepicker-calendar {
line-height: 1;
}
.ui-datepicker select {
width: auto;
}
/* Search Form
--------------------------------------------- */