Plugin Directory

Changeset 1400655


Ignore:
Timestamp:
04/20/2016 06:26:48 PM (10 years ago)
Author:
ItayXD
Message:

tagging version 1.6.2

Location:
responsive-mobile-friendly-tooltip
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • responsive-mobile-friendly-tooltip/tags/1.6.2/responsive-tooltip-admin-page.php

    r713515 r1400655  
    3838    global $RMFtooltip_style_settings;
    3939    $RMFtooltip_style_settings = get_option('RMFtooltip_style_settings'); //Gets old options
    40     $RMFtooltip_style_settings[chkbx_use_custom_css] = $RMFtooltip_style_settings[chkbx_use_custom_css] ? 'on' : 'off';
     40    $RMFtooltip_style_settings['chkbx_use_custom_css'] = $RMFtooltip_style_settings['chkbx_use_custom_css'] ? 'on' : 'off';
    4141    register_setting( 'RMFtooltip_style_settings', 'RMFtooltip_style_settings', 'RMFtooltip_input_processor' ); //Does all the saving =D
    4242        function RMFtooltip_input_processor ($input) { //Process user data
    4343            global $RMFtooltip_style_settings;
    44             if ( $input[chkbx_use_custom_css] == 'on' && empty($input[textarea_css])) { //Makes sure the textarea isn't empty if it suppose to be full
     44            if ( $input['chkbx_use_custom_css'] == 'on' && empty($input['textarea_css'])) { //Makes sure the textarea isn't empty if it suppose to be full
    4545                add_settings_error( 'textarea_css', 'textarea_css_empty', "You haven't entered any CSS code, either enter some code or uncheck the use custom CSS box. Your settings will NOT be saved." ); //Output an error
    4646                return $RMFtooltip_style_settings; //Save the old settings again since invalid settings has been entred
    4747            }
    4848            /*----------Save css to file------------*/
    49             if ($input[chkbx_use_custom_css] == 'on') {
    50                if ($input[chkbx_replace_css] == 'on') {
    51                     $css_file = $input[textarea_css]; //Writes only the new changes
     49            if ($input['chkbx_use_custom_css'] == 'on') {
     50               if ($input['chkbx_replace_css'] == 'on') {
     51                    $css_file = $input['textarea_css']; //Writes only the new changes
    5252                } else {
    5353                    $css_file = file_get_contents(plugin_dir_path(__FILE__) . 'responsive-tooltip.org.css');
    54                     $css_file .= "\n{$input[textarea_css]}"; //Adds the entered code at the end of the original code
     54                    $css_file .= "\n{$input['textarea_css']}"; //Adds the entered code at the end of the original code
    5555                }
    5656            } else { //Else writes the original file
     
    8686                    </th>
    8787                    <td>
    88                         <input type="checkbox" id="chkbx_use_custom_css" onclick="chkchng()" name="RMFtooltip_style_settings[chkbx_use_custom_css]" <?php checked( $RMFtooltip_style_settings[chkbx_use_custom_css], 'on' ); ?> />
     88                        <input type="checkbox" id="chkbx_use_custom_css" onclick="chkchng()" name="RMFtooltip_style_settings['chkbx_use_custom_css']" <?php checked( $RMFtooltip_style_settings['chkbx_use_custom_css'], 'on' ); ?> />
    8989                        <p class="description">Check if you want to use your own custom stylesheet for the tooltip.</p>
    9090                    </td>
     
    100100                    </th>
    101101                    <td>
    102                         <input type="checkbox" id="chkbx_replace_css" name="RMFtooltip_style_settings[chkbx_replace_css]" <?php checked( $RMFtooltip_style_settings[chkbx_replace_css], 'on' ); ?> <?php disabled( $RMFtooltip_style_settings[chkbx_use_custom_css], 'off'); ?> />
     102                        <input type="checkbox" id="chkbx_replace_css" name="RMFtooltip_style_settings['chkbx_replace_css']" <?php checked( $RMFtooltip_style_settings['chkbx_replace_css'], 'on' ); ?> <?php disabled( $RMFtooltip_style_settings['chkbx_use_custom_css'], 'off'); ?> />
    103103                        <p class="description">Check if want to replace the default CSS rules rather than add to them</p>
    104104                    </td>
     
    114114                    </th>
    115115                    <td>
    116                         <textarea id="textarea_css" class="large-text" name="RMFtooltip_style_settings[textarea_css]" cols="50" rows="15" placeholder="Enter your css code here" <?php disabled( $RMFtooltip_style_settings[chkbx_use_custom_css], 'off'); ?> ><?php echo esc_textarea( $RMFtooltip_style_settings[textarea_css] ); ?></textarea>
     116                        <textarea id="textarea_css" class="large-text" name="RMFtooltip_style_settings['textarea_css']" cols="50" rows="15" placeholder="Enter your css code here" <?php disabled( $RMFtooltip_style_settings['chkbx_use_custom_css'], 'off'); ?> ><?php echo esc_textarea( $RMFtooltip_style_settings['textarea_css'] ); ?></textarea>
    117117                    </td>
    118118                </tr>
  • responsive-mobile-friendly-tooltip/tags/1.6.2/responsive-tooltip.php

    r1303287 r1400655  
    8686/*-------------------- Version Handling --------------------*/
    8787$c_version = 1.62; // Current version
    88 $o_version = get_option(RMFtooltip_version); //Gets old version
     88$o_version = get_option('RMFtooltip_version'); //Gets old version
    8989if ( $c_version > $o_version ) {
    9090   update_option('RMFtooltip_version', $c_version);
    9191   $RMFtooltip_style_settings = get_option('RMFtooltip_style_settings'); //Genrate user's custom CSS file
    92    if ($RMFtooltip_style_settings[chkbx_use_custom_css] == 'on') {
    93       if ($RMFtooltip_style_settings[chkbx_replace_css] == 'on') {
    94          $css_file = $RMFtooltip_style_settings[textarea_css]; //Writes only the new changes
     92   if ($RMFtooltip_style_settings['chkbx_use_custom_css'] == 'on') {
     93      if ($RMFtooltip_style_settings['chkbx_replace_css'] == 'on') {
     94         $css_file = $RMFtooltip_style_settings['textarea_css']; //Writes only the new changes
    9595       } else {
    9696         $css_file = file_get_contents(plugin_dir_path(__FILE__) . 'responsive-tooltip.org.css');
    97           $css_file .= "\n{$RMFtooltip_style_settings[textarea_css]}"; //Adds the entered code at the end of the original code
     97          $css_file .= "\n{$RMFtooltip_style_settings['textarea_css']}"; //Adds the entered code at the end of the original code
    9898       }
    9999   } else { //Else writes the original file
  • responsive-mobile-friendly-tooltip/trunk/responsive-tooltip-admin-page.php

    r713515 r1400655  
    3838    global $RMFtooltip_style_settings;
    3939    $RMFtooltip_style_settings = get_option('RMFtooltip_style_settings'); //Gets old options
    40     $RMFtooltip_style_settings[chkbx_use_custom_css] = $RMFtooltip_style_settings[chkbx_use_custom_css] ? 'on' : 'off';
     40    $RMFtooltip_style_settings['chkbx_use_custom_css'] = $RMFtooltip_style_settings['chkbx_use_custom_css'] ? 'on' : 'off';
    4141    register_setting( 'RMFtooltip_style_settings', 'RMFtooltip_style_settings', 'RMFtooltip_input_processor' ); //Does all the saving =D
    4242        function RMFtooltip_input_processor ($input) { //Process user data
    4343            global $RMFtooltip_style_settings;
    44             if ( $input[chkbx_use_custom_css] == 'on' && empty($input[textarea_css])) { //Makes sure the textarea isn't empty if it suppose to be full
     44            if ( $input['chkbx_use_custom_css'] == 'on' && empty($input['textarea_css'])) { //Makes sure the textarea isn't empty if it suppose to be full
    4545                add_settings_error( 'textarea_css', 'textarea_css_empty', "You haven't entered any CSS code, either enter some code or uncheck the use custom CSS box. Your settings will NOT be saved." ); //Output an error
    4646                return $RMFtooltip_style_settings; //Save the old settings again since invalid settings has been entred
    4747            }
    4848            /*----------Save css to file------------*/
    49             if ($input[chkbx_use_custom_css] == 'on') {
    50                if ($input[chkbx_replace_css] == 'on') {
    51                     $css_file = $input[textarea_css]; //Writes only the new changes
     49            if ($input['chkbx_use_custom_css'] == 'on') {
     50               if ($input['chkbx_replace_css'] == 'on') {
     51                    $css_file = $input['textarea_css']; //Writes only the new changes
    5252                } else {
    5353                    $css_file = file_get_contents(plugin_dir_path(__FILE__) . 'responsive-tooltip.org.css');
    54                     $css_file .= "\n{$input[textarea_css]}"; //Adds the entered code at the end of the original code
     54                    $css_file .= "\n{$input['textarea_css']}"; //Adds the entered code at the end of the original code
    5555                }
    5656            } else { //Else writes the original file
     
    8686                    </th>
    8787                    <td>
    88                         <input type="checkbox" id="chkbx_use_custom_css" onclick="chkchng()" name="RMFtooltip_style_settings[chkbx_use_custom_css]" <?php checked( $RMFtooltip_style_settings[chkbx_use_custom_css], 'on' ); ?> />
     88                        <input type="checkbox" id="chkbx_use_custom_css" onclick="chkchng()" name="RMFtooltip_style_settings['chkbx_use_custom_css']" <?php checked( $RMFtooltip_style_settings['chkbx_use_custom_css'], 'on' ); ?> />
    8989                        <p class="description">Check if you want to use your own custom stylesheet for the tooltip.</p>
    9090                    </td>
     
    100100                    </th>
    101101                    <td>
    102                         <input type="checkbox" id="chkbx_replace_css" name="RMFtooltip_style_settings[chkbx_replace_css]" <?php checked( $RMFtooltip_style_settings[chkbx_replace_css], 'on' ); ?> <?php disabled( $RMFtooltip_style_settings[chkbx_use_custom_css], 'off'); ?> />
     102                        <input type="checkbox" id="chkbx_replace_css" name="RMFtooltip_style_settings['chkbx_replace_css']" <?php checked( $RMFtooltip_style_settings['chkbx_replace_css'], 'on' ); ?> <?php disabled( $RMFtooltip_style_settings['chkbx_use_custom_css'], 'off'); ?> />
    103103                        <p class="description">Check if want to replace the default CSS rules rather than add to them</p>
    104104                    </td>
     
    114114                    </th>
    115115                    <td>
    116                         <textarea id="textarea_css" class="large-text" name="RMFtooltip_style_settings[textarea_css]" cols="50" rows="15" placeholder="Enter your css code here" <?php disabled( $RMFtooltip_style_settings[chkbx_use_custom_css], 'off'); ?> ><?php echo esc_textarea( $RMFtooltip_style_settings[textarea_css] ); ?></textarea>
     116                        <textarea id="textarea_css" class="large-text" name="RMFtooltip_style_settings['textarea_css']" cols="50" rows="15" placeholder="Enter your css code here" <?php disabled( $RMFtooltip_style_settings['chkbx_use_custom_css'], 'off'); ?> ><?php echo esc_textarea( $RMFtooltip_style_settings['textarea_css'] ); ?></textarea>
    117117                    </td>
    118118                </tr>
  • responsive-mobile-friendly-tooltip/trunk/responsive-tooltip.php

    r1303287 r1400655  
    8686/*-------------------- Version Handling --------------------*/
    8787$c_version = 1.62; // Current version
    88 $o_version = get_option(RMFtooltip_version); //Gets old version
     88$o_version = get_option('RMFtooltip_version'); //Gets old version
    8989if ( $c_version > $o_version ) {
    9090   update_option('RMFtooltip_version', $c_version);
    9191   $RMFtooltip_style_settings = get_option('RMFtooltip_style_settings'); //Genrate user's custom CSS file
    92    if ($RMFtooltip_style_settings[chkbx_use_custom_css] == 'on') {
    93       if ($RMFtooltip_style_settings[chkbx_replace_css] == 'on') {
    94          $css_file = $RMFtooltip_style_settings[textarea_css]; //Writes only the new changes
     92   if ($RMFtooltip_style_settings['chkbx_use_custom_css'] == 'on') {
     93      if ($RMFtooltip_style_settings['chkbx_replace_css'] == 'on') {
     94         $css_file = $RMFtooltip_style_settings['textarea_css']; //Writes only the new changes
    9595       } else {
    9696         $css_file = file_get_contents(plugin_dir_path(__FILE__) . 'responsive-tooltip.org.css');
    97           $css_file .= "\n{$RMFtooltip_style_settings[textarea_css]}"; //Adds the entered code at the end of the original code
     97          $css_file .= "\n{$RMFtooltip_style_settings['textarea_css']}"; //Adds the entered code at the end of the original code
    9898       }
    9999   } else { //Else writes the original file
Note: See TracChangeset for help on using the changeset viewer.