Plugin Directory

Changeset 1198558


Ignore:
Timestamp:
07/14/2015 07:28:53 AM (11 years ago)
Author:
ronshe
Message:

Asaf's changes: defaults + move styling settings to pixter.me script.

Location:
pixterme/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pixterme/trunk/admin.php

    r1196847 r1198558  
    1414        "id" => "button_text",
    1515        "desc" => __("The text which will appear on the button which is displayed while hovering an image", 'pixter-me'),
    16         "default" => __("Print Image", 'pixter-me')
     16        "default" => __("Get Prints >>", 'pixter-me')
    1717        ),
    1818    array(
     
    2121        "id" => "button_bg_color",
    2222        "desc" => __("Bacground color of the print button.", 'pixter-me'),
    23         "default" => "#3333CC"
     23        "default" => "#00B22D"
    2424        ),
    2525    array(
     
    4343        "id" => "selector",
    4444        "desc" => __("Selector for containers including relevant images. Comma separates multiple selectors.", 'pixter-me'),
    45         "default" => "#primary, .entry-content"
     45        "default" => "img"
    4646        ),
    4747    );
    4848
    4949$pixter_me_user = get_option('pixter_me_user');
     50
    5051if (empty($pixter_me_user))
    5152{
  • pixterme/trunk/pixter-me.php

    r1196853 r1198558  
    6868        }
    6969
    70         $selector = explode(',', $options->selector);
    71         foreach ($selector as &$sel)
    72             $sel = trim($sel).' img';
    73 
    74         $selector = implode(', ', $selector);
    75 
    7670        echo <<<InlineScript
    77 <style>
    78     .pixter_wrapper
    79     {
    80         position: relative;
    81         display: inline-block;
    82     }
    83     .pixter_button
    84     {
    85         $cssPos
    86         padding: 7px 12px!important;
    87         height: auto!important;
    88         width: auto!important;
    89         border-radius: 5px!important;
    90         line-height: 1!important;
    91         color: $button_text_color!important;
    92         background-color: $button_bg_color!important;
    93         display: none;
    94     }
    95     .pixter_button, .pixter_button:hover
    96     {
    97         text-decoration: none;
    98     }
    99     .pixter_wrapper:hover .pixter_button
    100     {
    101         display: inline-block;
    102     }
    103 </style>
    10471<script>
    10572function onInitComplete()
    10673{
    10774    pLoader.initOnDemand({
    108         "selectors":"$selector", "minHeight":150, "minWidth":150, "position":"$button_position",
     75        "selectors":"{$options->selector}", "minHeight":150, "minWidth":150, "position":"$button_position",
    10976        "text":"$button_text", "textColor":"$button_text_color", "buttonColor":"$button_bg_color"
    11077    });
     
    11784        $wp_scripts->done[] = 'pixter_me_inline';
    11885    }
     86
    11987}
    12088add_action( 'wp_footer', 'pixter_me_inline_script', 99999 );
Note: See TracChangeset for help on using the changeset viewer.