Skip to content

Commit

Permalink
fix broken images, add [pl_parent_url] short code and add to js short…
Browse files Browse the repository at this point in the history
… code parser.

Signed-off-by: Simon Prosser <[email protected]>
  • Loading branch information
Simon Prosser committed Jul 4, 2013
1 parent 22330e2 commit d797f17
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions editor/editor.handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ function json_blob(){
, menus: '<?php echo admin_url( "nav-menus.php" );?>'
, widgets: '<?php echo $this->edit_post_link();?>'
, StyleSheetURL: '<?php echo get_stylesheet_directory_uri(); ?>'
, ParentStyleSheetURL: '<?php echo get_template_directory_uri(); ?>'
}
}

Expand Down
6 changes: 3 additions & 3 deletions editor/editor.settings.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ function basic(){
'imgsize' => '16',
'title' => __( 'Favicon Image', 'pagelines' ),
'help' => __( 'Enter the full URL location of your custom <strong>favicon</strong> which is visible in browser favorites and tabs.<br/> <strong>Must be .png or .ico file - 32px by 32px</strong>.', 'pagelines' ),
'default' => PL_EDITOR_URL . '/images/default-favicon.png'
'default' => '[pl_parent_url]/images/default-favicon.png'
),


Expand All @@ -215,7 +215,7 @@ function basic(){
'imgsize' => '80',
'sizemode' => 'height',
'title' => __( 'Login Page Image', 'pagelines' ),
'default' => PL_EDITOR_URL . '/images/default-login-image.png',
'default' => '[pl_parent_url]/images/default-login-image.png',
'help' => __( 'This image will be used on the login page to your admin. Use an image that is approximately <strong>80px</strong> in height.', 'pagelines' )
),

Expand All @@ -225,7 +225,7 @@ function basic(){
'type' => 'image_upload',
'imgsize' => '72',
'title' => __( 'Mobile Touch Image', 'pagelines' ),
'default' => PL_EDITOR_URL . '/images/default-touch-icon.png',
'default' => '[pl_parent_url]/images/default-touch-icon.png',
'help' => __( 'Enter the full URL location of your Apple Touch Icon which is visible when your users set your site as a <strong>webclip</strong> in Apple Iphone and Touch Products. It is an image approximately 144px by 144px in either .jpg, .gif or .png format.', 'pagelines' )
),

Expand Down
2 changes: 2 additions & 0 deletions editor/js/pl.library.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ function pl_do_shortcode(opt) {
switch(shortcode) {
case 'pl_child_url':
opt = opt.replace(/\[pl_child_url\]/g, jQuery.pl.config.urls.StyleSheetURL)
case 'pl_parent_url':
opt = opt.replace(/\[pl_parent_url\]/g, jQuery.pl.config.urls.ParentStyleSheetURL)
}
return opt
}
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
9 changes: 6 additions & 3 deletions includes/class.shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private function shortcodes_core() {
'pl_blockquote' => array( 'function' => 'pl_blockquote_shortcode' ),
'pl_alertbox' => array( 'function' => 'pl_alertbox_shortcode' ),
'show_authors' => array( 'function' => 'show_multiple_authors' ),
'pl_codebox' => array( 'function' => 'pl_codebox_shortcode' ),
'pl_codebox' => array( 'function' => 'pl_codebox_shortcode' ),
'pl_label' => array( 'function' => 'pl_label_shortcode' ),
'pl_badge' => array( 'function' => 'pl_badge_shortcode' ),
'googleplus' => array( 'function' => 'pl_googleplus_button' ),
Expand All @@ -120,7 +120,8 @@ private function shortcodes_core() {
'bookmark' => array( 'function' => 'bookmark_link' ),
'pl_raw' => array( 'function' => 'do_raw' ),
'pl_video' => array( 'function' => 'pl_video_shortcode' ),
'pl_child_url' => array( 'function' => 'pl_child_url' )
'pl_child_url' => array( 'function' => 'pl_child_url' ),
'pl_parent_url' => array( 'function' => 'get_themeurl' )
);

return $core;
Expand Down Expand Up @@ -184,7 +185,9 @@ function create_pagelink( $atts ) {

// 3. Function for getting template path
// USAGE: [themeurl]
function get_themeurl( $atts ){ return get_template_directory_uri(); }
function get_themeurl( $atts ) {
return get_template_directory_uri();
}

// 4. GOOGLE MAPS //////////////////////////////////////////////////

Expand Down

0 comments on commit d797f17

Please sign in to comment.