Skip to content

Commit

Permalink
Typekit plugin working
Browse files Browse the repository at this point in the history
  • Loading branch information
danielchatfield committed Oct 29, 2012
1 parent 076eeb5 commit de644a9
Show file tree
Hide file tree
Showing 6 changed files with 227 additions and 12 deletions.
2 changes: 1 addition & 1 deletion lofty.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
test_server: D:\Projects\_res_\Private Blog Dev\wp-content\plugins\wp-typekit
test_server: D:\Projects\_res_\Volcanic Pixels\wp-content\plugins\wp-typekit
2 changes: 2 additions & 0 deletions meta/todo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Integrate with Typekit api to provide font choosing capabilities.
Add Font choosing to tinymce and live previewing.
5 changes: 3 additions & 2 deletions src/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ class Lava extends Lava_Plugin {
# Auto Hooks
#####################

function wp_head() {
function _wp_head() {
$enabled = $this->_settings()->_get_value_for('enabled');
$typekit = $this->_settings()->_get_value_for('typekit_id');
if( !empty( $typekit ) ) {
if( !empty( $typekit ) and $enabled == 'on' ) {
?>
<script type="text/javascript" src="//use.typekit.net/<?php echo $typekit ?>.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
Expand Down
2 changes: 1 addition & 1 deletion src/plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: VP Typekit
name: Volcanic Pixels Typekit
version: "1.0"
description: Advanced Typekit integration for your WordPress blog
author: Daniel Chatfield
Expand Down
226 changes: 219 additions & 7 deletions typekit.sublime-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
{
"selected_items":
[
[
"type",
"typekit"
],
[
"function",
"function_name"
Expand Down Expand Up @@ -287,6 +291,54 @@
},
"buffers":
[
{
"file": "src/plugin.yaml",
"settings":
{
"buffer_size": 223,
"line_ending": "Windows"
}
},
{
"file": "/G/Projects/Private-Blog/lofty.yaml",
"settings":
{
"buffer_size": 79,
"line_ending": "Windows"
}
},
{
"file": "src/settings.yaml",
"settings":
{
"buffer_size": 196,
"line_ending": "Windows"
}
},
{
"file": "src/admin_pages.yaml",
"settings":
{
"buffer_size": 26,
"line_ending": "Windows"
}
},
{
"file": "src/plugin.php",
"settings":
{
"buffer_size": 1048,
"line_ending": "Windows"
}
},
{
"file": "lofty.yaml",
"settings":
{
"buffer_size": 76,
"line_ending": "Windows"
}
}
],
"build_system": "Packages/User/lofty.sublime-build",
"command_palette":
Expand Down Expand Up @@ -328,6 +380,12 @@
},
"file_history":
[
"/G/Projects/wp-typekit/libs/lava/classes/Functions.php",
"/G/Projects/wp-typekit/libs/lava/classes/Page.php",
"/G/Projects/wp-typekit/libs/lava/classes/Page/Controller.php",
"/G/Projects/wp-typekit/lofty.yaml",
"/G/Projects/Private-Blog/src/settings.yaml",
"/G/Projects/Private-Blog/src/admin_pages.yaml",
"/G/Projects/canvas/src/less/global.less",
"/G/Projects/canvas/src/footer.php",
"/G/Projects/canvas/src/header.php",
Expand Down Expand Up @@ -449,13 +507,7 @@
"/D/Projects/Private-Blog/build/classes/Widget/Controller.php",
"/D/Projects/Private-Blog/build/classes/Extension/Controller.php",
"/D/Projects/Blank-Plugin/src/plugin.php",
"/D/Projects/Private-Blog/build/classes/Base.php",
"/D/Projects/Privacy-Plugin/plugin.php",
"/C/Users/Daniel/Documents/My Web Sites/WordPress Dev/wp-content/plugins/private-blog/assets/css/lava.css",
"/C/Users/Daniel/Documents/My Web Sites/WordPress Dev/wp-content/plugins/private-blog/plugin.php",
"/D/Projects/Private-Blog/build/classes/Skin/Controller.php",
"/D/Projects/Private-Blog/libs/lava/templates/default/Scene/default.twig",
"/D/Projects/Private-Blog/libs/lava/templates/default/Programme.twig"
"/D/Projects/Private-Blog/build/classes/Base.php"
],
"find":
{
Expand Down Expand Up @@ -543,8 +595,168 @@
"groups":
[
{
"selected": 2,
"sheets":
[
{
"buffer": 0,
"file": "src/plugin.yaml",
"settings":
{
"buffer_size": 223,
"regions":
{
},
"selection":
[
[
55,
55
]
],
"settings":
{
"syntax": "Packages/YAML/YAML.tmLanguage"
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"type": "text"
},
{
"buffer": 1,
"file": "/G/Projects/Private-Blog/lofty.yaml",
"settings":
{
"buffer_size": 79,
"regions":
{
},
"selection":
[
[
79,
79
]
],
"settings":
{
"syntax": "Packages/YAML/YAML.tmLanguage"
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"type": "text"
},
{
"buffer": 2,
"file": "src/settings.yaml",
"settings":
{
"buffer_size": 196,
"regions":
{
},
"selection":
[
[
158,
158
]
],
"settings":
{
"syntax": "Packages/YAML/YAML.tmLanguage",
"tab_size": 2,
"translate_tabs_to_spaces": true
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"type": "text"
},
{
"buffer": 3,
"file": "src/admin_pages.yaml",
"settings":
{
"buffer_size": 26,
"regions":
{
},
"selection":
[
[
26,
26
]
],
"settings":
{
"syntax": "Packages/YAML/YAML.tmLanguage"
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"type": "text"
},
{
"buffer": 4,
"file": "src/plugin.php",
"settings":
{
"buffer_size": 1048,
"regions":
{
},
"selection":
[
[
564,
564
]
],
"settings":
{
"syntax": "Packages/PHP/PHP.tmLanguage",
"translate_tabs_to_spaces": false
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"type": "text"
},
{
"buffer": 5,
"file": "lofty.yaml",
"settings":
{
"buffer_size": 76,
"regions":
{
},
"selection":
[
[
13,
13
]
],
"settings":
{
"syntax": "Packages/YAML/YAML.tmLanguage"
},
"translation.x": 0.0,
"translation.y": 0.0,
"zoom_level": 1.0
},
"type": "text"
}
]
},
{
Expand Down

0 comments on commit de644a9

Please sign in to comment.