Plugin Directory

Changeset 3294206


Ignore:
Timestamp:
05/15/2025 01:54:09 PM (7 months ago)
Author:
seedprod
Message:

Staging 1.0.3

Location:
404-page/trunk
Files:
28 edited

Legend:

Unmodified
Added
Removed
  • 404-page/trunk/404-page.php

    r1909873 r3294206  
    44Plugin URI: http://www.seedprod.com/wordpress-404-page-plugin/
    55Description: The Ultimate 404 Page Plugin
    6 Version:  1.0.1
     6Version:  1.0.2
    77Author: SeedProd
    88Author URI: http://www.seedprod.com
    9 TextDomain: seedprod
     9TextDomain: 404-page
    1010License: GPLv2
    1111*/
     
    1919define( 'SEED_S404F_SHORTNAME', 'seed_s404f' ); // Used to reference namespace functions.
    2020define( 'SEED_S404F_SLUG', '404-page-seedprod/404-page-seedprod.php' ); // Used for settings link.
    21 define( 'SEED_S404F_TEXTDOMAIN', 'seedprod' ); // i18 for reference only
    22 define( 'SEED_S404F_PLUGIN_NAME', __( '404 Page by SeedProd', 'seedprod' ) ); // Plugin Name shows up on the admin settings screen.
    23 define( 'SEED_S404F_VERSION', '1.0.1' ); // Plugin Version Number. Recommend you use Semantic Versioning http://semver.org/
     21define( 'SEED_S404F_TEXTDOMAIN', '404-page' ); // i18 for reference only
     22define( 'SEED_S404F_PLUGIN_NAME', __( '404 Page by SeedProd', '404-page' ) ); // Plugin Name shows up on the admin settings screen.
     23define( 'SEED_S404F_VERSION', '1.0.2' ); // Plugin Version Number. Recommend you use Semantic Versioning http://semver.org/
    2424define( 'SEED_S404F_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); // Example output: /Applications/MAMP/htdocs/wordpress/wp-content/plugins/seed_csp3/
    2525define( 'SEED_S404F_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); // Example output: http://localhost:8888/wordpress/wp-content/plugins/seed_csp3/
     
    3030 */
    3131function seed_s404f_load_textdomain() {
    32     load_plugin_textdomain( 'seedprod', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
     32    load_plugin_textdomain( '404-page', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
    3333}
    3434add_action('plugins_loaded', 'seed_s404f_load_textdomain');
  • 404-page/trunk/changelog.txt

    r1909873 r3294206  
    1 1.0.1
     11.0.3
     2* Fixed security bugs
     3
     41.0.2
    25* Fixed php warning notification errors
    36
  • 404-page/trunk/framework/field-types/checkbox.php

    r1163541 r3294206  
    1010}
    1111foreach ( $option_values as $k => $v ) {
    12     echo "<input class='$id' type='checkbox' name='{$setting_id}[$id][]' value='$k' " . ( in_array( $k, ( empty( $options[ $id ] ) ? array( ) : $options[ $id ] ) ) ? 'checked' : '' ) . "  /> $v<br/>";
     12    echo "<input class='" . esc_attr($id) . "' type='checkbox' name='" . esc_attr($setting_id) . "[" . esc_attr($id) . "][]' value='" . esc_attr($k) . "' " . ( in_array( $k, ( empty( $options[ $id ] ) ? array( ) : $options[ $id ] ) ) ? 'checked' : '' ) . "  /> " . esc_html($v) . "<br/>";
    1313    $c++;
    1414}
  • 404-page/trunk/framework/field-types/color.php

    r1163541 r3294206  
    88}
    99
    10 echo "<input id='$id' class='pickcolor-field' type='text' name='{$setting_id}[$id]' value='" . esc_attr( $options[ $id ] ) . "' style='background-color:" . ( empty( $options[ $id ] ) ? $default_value : $options[ $id ] ) . ";' />";
     10$style_value = empty( $options[ $id ] ) ? $default_value : $options[ $id ];
     11echo "<input id='" . esc_attr($id) . "' class='pickcolor-field' type='text' name='" . esc_attr($setting_id) . "[" . esc_attr($id) . "]' value='" . esc_attr( $options[ $id ] ) . "' style='background-color:" . esc_attr( $style_value ) . ";' />";
    1112
    1213wp_enqueue_script( 'seed_s404f-color-js', SEED_S404F_PLUGIN_URL . 'framework/field-types/js/color.js', array(
  • 404-page/trunk/framework/field-types/customsocialfollow.php

    r1163541 r3294206  
    2121
    2222?>
    23 <small class='description'><?php _e("Enter your social profile url's. Drag &amp; Drop the icons to reorder. Remember to save your changes. <a href='https://seedprod.zendesk.com/entries/21778652-adding-custom-icons' target='_blank'>Learn how to add your own custom icons</a>.",'seedprod'); ?></small>
     23<small class='description'><?php esc_html_e("Enter your social profile url's. Drag &amp; Drop the icons to reorder. Remember to save your changes. <a href='https://seedprod.zendesk.com/entries/21778652-adding-custom-icons' target='_blank'>Learn how to add your own custom icons</a>.",'404-page'); ?></small>
    2424<ul id="seed-csp4-social-profiles">
    25     <?php foreach($profiles as $k=>$v){ ?>
    26     <li class="ui-state-default"><img style="width:24px;vertical-align:middle;cursor:move" src="<?php echo SEED_S404F_PLUGIN_URL.'themes/default/images/icons1/'.strtolower($v).'.png'; ?>"> <?php echo "<input autocomplete='off' placeholder='$v'  class='regular-text' name='{$setting_id}[$id][$v]' type='text' value='" . esc_attr( $options[ $id ][$v] ) . "' />"; ?></li>
     25    <?php foreach($profiles as $k=>$v){
     26    $icon_url = SEED_S404F_PLUGIN_URL . 'themes/default/images/icons1/' . strtolower($v) . '.png';
     27    $input_name = $setting_id . "[" . esc_attr($id) . "][" . esc_attr($v) . "]";
     28    $input_value = isset($options[$id][$v]) ? $options[$id][$v] : '';
     29    ?>
     30    <li class="ui-state-default"><img style="width:24px;vertical-align:middle;cursor:move" src="<?php echo esc_url($icon_url); ?>"> <?php echo "<input autocomplete='off' placeholder='" . esc_attr($v) . "'  class='regular-text' name='" . esc_attr($input_name) . "' type='text' value='" . esc_attr($input_value) . "' />"; ?></li>
    2731    <?php } ?>
    2832</ul>
  • 404-page/trunk/framework/field-types/date.php

    r1163541 r3294206  
    55// $options[$id] value from the db
    66
     7$value = $options[$id];
     8
    79$option_values = array(
    8     '01'=>__('01-Jan','seedprod'),
    9     '02'=>__('02-Feb','seedprod'),
    10     '03'=>__('03-Mar','seedprod'),
    11     '04'=>__('04-Apr','seedprod'),
    12     '05'=>__('05-May','seedprod'),
    13     '06'=>__('06-Jun','seedprod'),
    14     '07'=>__('07-Jul','seedprod'),
    15     '08'=>__('08-Aug','seedprod'),
    16     '09'=>__('09-Sep','seedprod'),
    17     '10'=>__('10-Oct','seedprod'),
    18     '11'=>__('11-Nov','seedprod'),
    19     '12'=>__('12-Dec','seedprod'),
     10    '01'=>__('01-Jan','404-page'),
     11    '02'=>__('02-Feb','404-page'),
     12    '03'=>__('03-Mar','404-page'),
     13    '04'=>__('04-Apr','404-page'),
     14    '05'=>__('05-May','404-page'),
     15    '06'=>__('06-Jun','404-page'),
     16    '07'=>__('07-Jul','404-page'),
     17    '08'=>__('08-Aug','404-page'),
     18    '09'=>__('09-Sep','404-page'),
     19    '10'=>__('10-Oct','404-page'),
     20    '11'=>__('11-Nov','404-page'),
     21    '12'=>__('12-Dec','404-page'),
    2022    );
    2123
     24$mm = substr($value,0,2);
    2225
    23 echo "<select id='mm' name='{$setting_id}[$id][month]'>";
     26echo "<select id='mm' name='" . esc_attr($setting_id) . "[" . esc_attr($id) . "][month]'>";
    2427foreach ( $option_values as $k => $v ) {
    25     echo "<option value='$k' " . selected( $options[ $id ]['month'], $k, false ) . ">$v</option>";
     28    echo "<option value='" . esc_attr($k) . "' " . selected( $options[ $id ]['month'], $k, false ) . ">" . esc_html($v) . "</option>";
    2629}
    2730echo "</select>";
    2831
    29 echo "<input id='jj' class='small-text' name='{$setting_id}[$id][day]' placeholder='".__('day','seedprod')."' type='text' value='" . esc_attr( $options[ $id ]['day'] ) . "' />";
     32echo "<input id='jj' class='small-text' name='" . esc_attr($setting_id) . "[" . esc_attr($id) . "][day]' placeholder='".esc_attr__('day','404-page')."' type='text' value='" . esc_attr( $options[ $id ]['day'] ) . "' />";
    3033
    3134echo ',';
    32 echo "<input id='aa' class='small-text' name='{$setting_id}[$id][year]' placeholder='".__('year','seedprod')."'  type='text' value='" . esc_attr( $options[ $id ]['year'] ) . "' /><br>";
     35echo "<input id='aa' class='small-text' name='" . esc_attr($setting_id) . "[" . esc_attr($id) . "][year]' placeholder='".esc_attr__('year','404-page')."'  type='text' value='" . esc_attr( $options[ $id ]['year'] ) . "' /><br>";
  • 404-page/trunk/framework/field-types/daterange.php

    r1163541 r3294206  
    66
    77$option_values = array(
    8     '01'=>__('01-Jan','seedprod'),
    9     '02'=>__('02-Feb','seedprod'),
    10     '03'=>__('03-Mar','seedprod'),
    11     '04'=>__('04-Apr','seedprod'),
    12     '05'=>__('05-May','seedprod'),
    13     '06'=>__('06-Jun','seedprod'),
    14     '07'=>__('07-Jul','seedprod'),
    15     '08'=>__('08-Aug','seedprod'),
    16     '09'=>__('09-Sep','seedprod'),
    17     '10'=>__('10-Oct','seedprod'),
    18     '11'=>__('11-Nov','seedprod'),
    19     '12'=>__('12-Dec','seedprod'),
     8    '01'=>__('01-Jan','404-page'),
     9    '02'=>__('02-Feb','404-page'),
     10    '03'=>__('03-Mar','404-page'),
     11    '04'=>__('04-Apr','404-page'),
     12    '05'=>__('05-May','404-page'),
     13    '06'=>__('06-Jun','404-page'),
     14    '07'=>__('07-Jul','404-page'),
     15    '08'=>__('08-Aug','404-page'),
     16    '09'=>__('09-Sep','404-page'),
     17    '10'=>__('10-Oct','404-page'),
     18    '11'=>__('11-Nov','404-page'),
     19    '12'=>__('12-Dec','404-page'),
    2020    );
    2121
    22 _e('Start Date', 'seedprod');
    23 echo "<select id='mm' name='{$setting_id}[$id][start_month]'>";
     22esc_html_e('Start Date', '404-page');
     23echo "<select id='mm' name='" . esc_attr($setting_id) . "[" . esc_attr($id) . "][start_month]'>";
    2424foreach ( $option_values as $k => $v ) {
    25     echo "<option value='$k' " . selected( $options[ $id ]['start_month'], $k, false ) . ">$v</option>";
     25    echo "<option value='" . esc_attr($k) . "' " . selected( $options[ $id ]['start_month'], $k, false ) . ">" . esc_html($v) . "</option>";
    2626}
    2727echo "</select>";
    2828
    29 echo "<input id='jj' class='small-text' placeholder='".__('day','seedprod')."' name='{$setting_id}[$id][start_day]' type='text' value='" . esc_attr( $options[ $id ]['start_day'] ) . "' />";
     29echo "<input id='jj' class='small-text' placeholder='".esc_attr__('day','404-page')."' name='" . esc_attr($setting_id) . "[" . esc_attr($id) . "][start_day]' type='text' value='" . esc_attr( $options[ $id ]['start_day'] ) . "' />";
    3030
    3131echo ',';
    32 echo "<input id='aa' class='small-text' placeholder='".__('year','seedprod')."' name='{$setting_id}[$id][start_year]' type='text' value='" . esc_attr( $options[ $id ]['start_year'] ) . "' />";
     32echo "<input id='aa' class='small-text' placeholder='".esc_attr__('year','404-page')."' name='" . esc_attr($setting_id) . "[" . esc_attr($id) . "][start_year]' type='text' value='" . esc_attr( $options[ $id ]['start_year'] ) . "' />";
    3333
    3434echo '&nbsp;&nbsp;&nbsp;&nbsp;';
    35 _e('End Date', 'seedprod');
    36 echo "<select id='mm' name='{$setting_id}[$id][end_month]'>";
     35esc_html_e('End Date', '404-page');
     36echo "<select id='mm' name='" . esc_attr($setting_id) . "[" . esc_attr($id) . "][end_month]'>";
    3737foreach ( $option_values as $k => $v ) {
    38     echo "<option value='$k' " . selected( $options[ $id ]['end_month'], $k, false ) . ">$v</option>";
     38    echo "<option value='" . esc_attr($k) . "' " . selected( $options[ $id ]['end_month'], $k, false ) . ">" . esc_html($v) . "</option>";
    3939}
    4040echo "</select>";
    4141
    42 echo "<input id='jj' class='small-text' placeholder='".__('day','seedprod')."' name='{$setting_id}[$id][end_day]' type='text' value='" . esc_attr( $options[ $id ]['end_day'] ) . "' />";
     42echo "<input id='jj' class='small-text' placeholder='".esc_attr__('day','404-page')."' name='" . esc_attr($setting_id) . "[" . esc_attr($id) . "][end_day]' type='text' value='" . esc_attr( $options[ $id ]['end_day'] ) . "' />";
    4343
    4444echo ',';
    45 echo "<input id='aa' class='small-text' placeholder='".__('year','seedprod')."' name='{$setting_id}[$id][end_year]' type='text' value='" . esc_attr( $options[ $id ]['end_year'] ) . "' /><br>";
     45echo "<input id='aa' class='small-text' placeholder='".esc_attr__('year','404-page')."' name='" . esc_attr($setting_id) . "[" . esc_attr($id) . "][end_year]' type='text' value='" . esc_attr( $options[ $id ]['end_year'] ) . "' /><br>";
    4646
  • 404-page/trunk/framework/field-types/export.php

    r1163541 r3294206  
    2222$export = json_encode($settings);
    2323
    24 echo "<textarea id='$id' class='large-text'>" . $export . "</textarea><br>";
     24echo "<textarea id='" . esc_attr($id) . "' class='large-text'>" . esc_textarea($export) . "</textarea><br>";
    2525
    2626echo '
  • 404-page/trunk/framework/field-types/import.php

    r1163541 r3294206  
    1414            if(confirm(seed_s404f_msgs.import_confirm)){
    1515                var settings = $('#import_settings').val();
    16                 $.post('{$ajax_url}',{settings: settings}, function(data) {
     16                $.post('" . esc_url($ajax_url) . "',{settings: settings}, function(data) {
    1717                    if(data == '1'){
    1818                        $('#import-settings-btn').html('Import Successful').attr('disabled','disabled');
  • 404-page/trunk/framework/field-types/multiselect.php

    r1163541 r3294206  
    99}
    1010
    11 echo "<select multiple='multiple' id='$id' class='" . ( empty( $class ) ? 'all-options' : $class ) . "' name='{$setting_id}[$id][]'>";
     11echo "<select multiple='multiple' id='" . esc_attr($id) . "' class='" . esc_attr(empty( $class ) ? 'all-options' : $class) . "' name='" . esc_attr($setting_id) . "[" . esc_attr($id) . "][]'>";
    1212
    1313foreach ( $option_values as $k => $v ) {
    1414
    1515
    16     echo "<option value='$k' " .  (in_array($k,$options[$id],true)?'selected':'')  . ">$v</option>";
     16    echo "<option value='" . esc_attr($k) . "' " .  (in_array($k,$options[$id],true)?'selected':'')  . ">" . esc_html($v) . "</option>";
    1717}
    1818echo "</select><br>";
  • 404-page/trunk/framework/field-types/password.php

    r1163541 r3294206  
    77    $options[ $id ] = '';
    88}
    9 echo "<input id='$id' class='" . ( empty( $class ) ? 'regular-text' : $class ) . "' name='{$setting_id}[$id]' type='password' value='" . esc_attr( $options[ $id ] ) . "' /><br>";
     9echo "<input id='" . esc_attr($id) . "' class='" . esc_attr(empty( $class ) ? 'regular-text' : $class) . "' name='" . esc_attr($setting_id) . "[" . esc_attr($id) . "]' type='password' value='" . esc_attr( $options[ $id ] ) . "' /><br>";
  • 404-page/trunk/framework/field-types/radio.php

    r1163541 r3294206  
    66
    77foreach ( $option_values as $k => $v ) {
    8     echo "<input class='$id' type='radio' name='{$setting_id}[$id]' value='$k' " . checked( $options[ $id ], $k, false ) . "  /> $v<br/>";
     8    echo "<input class='" . esc_attr($id) . "' type='radio' name='" . esc_attr($setting_id) . "[" . esc_attr($id) . "]' value='" . esc_attr($k) . "' " . checked( $options[ $id ], $k, false ) . "  /> " . esc_html($v) . "<br/>";
    99}
  • 404-page/trunk/framework/field-types/select.php

    r1163541 r3294206  
    55// $options[$id] value from the db
    66
    7 echo "<select id='$id' class='" . ( empty( $class ) ? '' : $class ) . "' name='{$setting_id}[$id]'>";
     7echo "<select id='" . esc_attr($id) . "' class='" . esc_attr(empty( $class ) ? '' : $class) . "' name='" . esc_attr($setting_id) . "[" . esc_attr($id) . "]'>";
    88foreach ( $option_values as $k => $v ) {
    99    if(is_array($v)){
    10         echo '<optgroup label="'.ucwords($k).'">';
     10        echo '<optgroup label="'.esc_attr(ucwords($k)).'">';
    1111        foreach ( $v as $k1=>$v1 ) {
    12             echo "<option value='$k1' " . selected( $options[ $id ], $k1, false ) . ">$v1</option>";
     12            echo "<option value='" . esc_attr($k1) . "' " . selected( $options[ $id ], $k1, false ) . ">" . esc_html($v1) . "</option>";
    1313        }
    1414        echo '</optgroup>';
    1515    }else{
    16             if(!isset($options[ $id ])){
    17                 $options[ $id ] = '';
    18             }
    19             echo "<option value='$k' " . selected( $options[ $id ], $k, false ) . ">$v</option>";
     16        if(!isset($options[ $id ])){
     17            $options[ $id ] = '';
     18        }
     19            echo "<option value='" . esc_attr($k) . "' " . selected( $options[ $id ], $k, false ) . ">" . esc_html($v) . "</option>";
    2020    }
    2121}
  • 404-page/trunk/framework/field-types/text.php

    r1163541 r3294206  
    55// $options[$id] value from the db
    66if(!empty($options[ $id ]))
    7     echo "<p id='$id' class='" . ( empty( $class ) ? '' : $class ) . "' >".$options[ $id ] ."</p>";
     7    echo "<p id='" . esc_attr($id) . "' class='" . esc_attr(empty( $class ) ? '' : $class) . "' >".esc_html($options[ $id ]) ."</p>";
  • 404-page/trunk/framework/field-types/textarea.php

    r1163541 r3294206  
    77    $options[ $id ] = '';
    88}
    9 echo "<textarea id='$id' class='" . ( empty( $class ) ? '' : $class ) . "' name='{$setting_id}[$id]'>" . $options[ $id ] . "</textarea><br>";
     9echo "<textarea id='" . esc_attr($id) . "' class='" . esc_attr(empty( $class ) ? '' : $class) . "' name='" . esc_attr($setting_id) . "[" . esc_attr($id) . "]'>" . esc_textarea( $options[ $id ] ) . "</textarea><br>";
  • 404-page/trunk/framework/field-types/textbox.php

    r1163541 r3294206  
    77    $options[ $id ] = '';
    88}
    9 echo "<input id='$id' class='" . ( empty( $class ) ? 'regular-text' : $class ) . "' name='{$setting_id}[$id]' type='text' value='" . esc_attr( $options[ $id ] ) . "' /><br>";
     9echo "<input id='" . esc_attr($id) . "' class='" . esc_attr(empty( $class ) ? 'regular-text' : $class) . "' name='".esc_attr($setting_id) . "[" . esc_attr($id) . "]' type='text' value='" . esc_attr( $options[ $id ] ) . "' /><br>";
  • 404-page/trunk/framework/field-types/upload.php

    r1163541 r3294206  
    99
    1010
    11 echo "<input id='$id' class='" . ( empty( $class ) ? 'regular-text' : $class ) . "' name='{$setting_id}[$id]' type='text' value='" . esc_attr( $options[ $id ] ) . "' />";
    12 echo "<input id='{$id}_upload_image_button' class='button-secondary upload-button' type='button' value='" . __( 'Media Image Library', 'seedprod' ) . "' /><br>";
     11echo "<input id='" . esc_attr($id) . "' class='" . esc_attr(empty( $class ) ? 'regular-text' : $class) . "' name='" . esc_attr($setting_id) . "[" . esc_attr($id) . "]' type='text' value='" . esc_attr( $options[ $id ] ) . "' />";
     12echo "<input id='" . esc_attr($id) . "_upload_image_button' class='button-secondary upload-button' type='button' value='" . esc_attr__( 'Media Image Library', '404-page' ) . "' /><br>";
    1313
    1414wp_enqueue_script( 'seed_s404f-upload-js', SEED_S404F_PLUGIN_URL . 'framework/field-types/js/upload.js', array() );
  • 404-page/trunk/framework/framework.php

    r1909873 r3294206  
    7575
    7676            $_POST[ $_POST[ 'option_page' ] ] = $seed_s404f_settings_deafults[$_POST[ 'option_page' ]];
    77             add_settings_error( 'general', 'seed_s404f-settings-reset', __( "Settings reset." ), 'updated' );
     77            add_settings_error( 'general', 'seed_s404f-settings-reset', __( "Settings reset.", '404-page' ), 'updated' );
    7878        }
    7979    }
     
    114114    {
    115115      $this->plugin_screen_hook_suffix = add_options_page(
    116             __( "404 Page by SeedProd", 'seedprod' ),
    117             __( "404 Page by SeedProd", 'seedprod' ),
     116            __( "404 Page by SeedProd", '404-page' ),
     117            __( "404 Page by SeedProd", '404-page' ),
    118118            'manage_options',
    119119            'seed_s404f',
     
    171171                            $active = 'nav-tab-active';
    172172                        }
    173                         echo '<a class="nav-tab ' . $active . '" href="?page=' . $menu_slug . '&tab=' . $v[ 'id' ] . '">' . $v[ 'label' ] . '</a>';
     173                        echo '<a class="nav-tab ' . esc_attr($active) . '" href="?page=' . esc_attr($menu_slug) . '&tab=' . esc_attr($v[ 'id' ]) . '">' . esc_html($v[ 'label' ]) . '</a>';
    174174                        $c++;
    175175                    }
    176176            }
    177             echo '<a class="nav-tab seed_s404f-preview thickbox-preview" href="'.home_url().'?seed_s404f_preview=true" title="'.__('&larr; Close Window','seedprod').'">'.__('Live Preview','seedprod').'</a>';
     177            echo '<a class="nav-tab seed_s404f-preview thickbox-preview" href="'.esc_url(home_url('/?seed_s404f_preview=true')).'" title="'.esc_attr__('&larr; Close Window','404-page').'">'.esc_html__('Live Preview','404-page').'</a>';
    178178            if(defined('SEED_CSP_API_KEY') === false){
    179                 echo '<a class="nav-tab seed_s404f-support" style="background-color: #fcf8e3;" href="http://www.seedprod.com/wordpress-404-page-pro/?utm_source=404-page-plugin&utm_medium=banner&utm_campaign=404-page-in-plugin" target="_blank"><i class="fa fa-star"></i> '.__('Upgrade to Pro for more Professional Features','seedprod').'</a>';
     179                echo '<a class="nav-tab seed_s404f-support" style="background-color: #fcf8e3;" href="http://www.seedprod.com/wordpress-404-page-pro/?utm_source=404-page-plugin&utm_medium=banner&utm_campaign=404-page-in-plugin" target="_blank"><i class="fa fa-star"></i> '.esc_html__('Upgrade to Pro for more Professional Features','404-page').'</a>';
    180180            }
    181181            echo '</h2>';
     
    219219        <div class="wrap columns-2 seed-csp4">
    220220       
    221             <h2><?php echo $this->plugin_name; ?> <span class="seed_s404f-version"> <?php echo SEED_S404F_VERSION; ?></span></h2>
     221            <h2><?php echo esc_html($this->plugin_name); ?> <span class="seed_s404f-version"> <?php echo esc_html(SEED_S404F_VERSION); ?></span></h2>
    222222            <?php //settings_errors() ?>
    223223            <?php $this->plugin_options_tabs(); ?>
     
    232232                    <form action="options.php" method="post">
    233233
    234                     <!-- <input name="submit" type="submit" value="<?php _e( 'Save All Changes', 'seedprod' ); ?>" class="button-primary"/> -->
     234                    <!-- <input name="submit" type="submit" value="<?php esc_html_e( 'Save All Changes', '404-page' ); ?>" class="button-primary"/> -->
    235235                    <?php if(!empty($_GET['tab']) && $_GET['tab'] != 'seed_s404f_tab_3') { ?>
    236                     <!-- <input id="reset" name="reset" type="submit" value="<?php _e( 'Reset Settings', 'seedprod' ); ?>" class="button-secondary"/>     -->
     236                    <!-- <input id="reset" name="reset" type="submit" value="<?php esc_html_e( 'Reset Settings', '404-page' ); ?>" class="button-secondary"/>     -->
    237237                    <?php } ?>
    238238
     
    264264                                                if ( $current_tab == $tab[ 'id' ] or $current_tab === false ) {
    265265                                                    if ( $layout == '2-col' ) {
    266                                                         echo '<div id="'.$v[ 'id' ].'" class="postbox seedprod-postbox">';
    267                                                         $this->do_settings_sections( $v[ 'id' ],$show_submit );
     266                                                        echo '<div id="'.esc_attr($v['id']).'" class="postbox seedprod-postbox">';
     267                                                        $this->do_settings_sections( $v['id'],$show_submit );
    268268                                                        echo '</div>';
    269269                                                    } else {
    270                                                         do_settings_sections( $v[ 'id' ] );
     270                                                        do_settings_sections( $v['id'] );
    271271                                                    }
    272272
     
    281281                    <?php if($show_submit): ?>
    282282                    <p>
    283                     <!-- <input name="submit" type="submit" value="<?php _e( 'Save All Changes', 'seedprod' ); ?>" class="button-primary"/> -->
    284                     <!-- <input id="reset" name="reset" type="submit" value="<?php _e( 'Reset Settings', 'seedprod' ); ?>" class="button-secondary"/> -->
     283                    <!-- <input name="submit" type="submit" value="<?php esc_html_e( 'Save All Changes', '404-page' ); ?>" class="button-primary"/> -->
     284                    <!-- <input id="reset" name="reset" type="submit" value="<?php esc_html_e( 'Reset Settings', '404-page' ); ?>" class="button-secondary"/> -->
    285285                    </p>
    286286                    <?php endif; ?>
     
    294294            jQuery(document).ready(function($) {
    295295                $('#reset').click(function(e){
    296                     if(!confirm('<?php _e( 'This tabs settings be deleted and reset to the defaults. Are you sure you want to reset?', 'seedprod' ); ?>')){
     296                    if(!confirm( '<?php echo esc_js( __( 'This tabs settings be deleted and reset to the defaults. Are you sure you want to reset?', '404-page' ) ); ?>' )){
    297297                        e.preventDefault();
    298298                    }
     
    398398            // Show description
    399399            if ( !empty( $desc ) ) {
    400                 echo "<small class='description'>{$desc}</small>";
     400                echo "<small class='description'>".wp_kses_post($desc)."</small>";
    401401            }
    402402        }
     
    480480
    481481        foreach ( (array) $wp_settings_sections[ $page ] as $section ) {
    482             echo "<h3 class='hndle'>{$section['title']}</h3>\n";
     482            echo "<h3 class='hndle'>".esc_html($section['title'])."</h3>\n";
    483483            echo '<div class="inside">';
    484484            call_user_func( $section[ 'callback' ], $section );
     
    490490            if($show_submit): ?>
    491491                <p>
    492                 <input name="submit" type="submit" value="<?php _e( 'Save All Changes', 'seedprod' ); ?>" class="button-primary"/>
     492                <input name="submit" type="submit" value="<?php esc_attr_e( 'Save All Changes', '404-page' ); ?>" class="button-primary"/>
    493493                </p>
    494494            <?php endif;
     
    506506              echo '<tr valign="top">';
    507507              if ( !empty($field['args']['label_for']) )
    508                   echo '<th scope="row"><label for="' . $field['args']['label_for'] . '">' . $field['title'] . '</label></th>';
     508                  echo '<th scope="row"><label for="' . esc_attr($field['args']['label_for']) . '">' . esc_html($field['title']) . '</label></th>';
    509509              else
    510                   echo '<th scope="row"><strong>' . $field['title'] . '</strong><!--<br>'.$field['args']['desc'].'--></th>';
     510                  echo '<th scope="row"><strong>' . esc_html($field['title']) . '</strong><!--<br>'.esc_html($field['args']['desc']).'--></th>';
    511511              echo '<td>';
    512512              call_user_func($field['callback'], $field['args']);
  • 404-page/trunk/framework/validations/color.php

    r1163541 r3294206  
    1111    if ( !preg_match( '/^#[a-f0-9]{6}$/i', $input[ $k[ 'id' ] ] ) ) {
    1212        $is_valid  = false;
    13         $error_msg = $k[ 'label' ] . ': ' . __( 'Please enter a valid color value.', 'seedprod' );
     13        $error_msg = $k[ 'label' ] . ': ' . __( 'Please enter a valid color value.', '404-page' );
    1414    }
    1515}
  • 404-page/trunk/framework/validations/email.php

    r1163541 r3294206  
    88if ( !empty( $input[ $k[ 'id' ] ] ) ) {
    99    $is_valid  = is_email( $input[ $k[ 'id' ] ] );
    10     $error_msg = $k[ 'label' ] . ': ' . __( 'Please enter a valid email.', 'seedprod' );
     10    $error_msg = $k[ 'label' ] . ': ' . __( 'Please enter a valid email.', '404-page' );
    1111}
  • 404-page/trunk/framework/validations/escurlraw.php

    r1163541 r3294206  
    99    $input[ $k[ 'id' ] ]= esc_url_raw($input[ $k[ 'id' ] ]);
    1010    $is_valid  = true;
    11     $error_msg = $k[ 'label' ] . ': ' . __( 'Please enter a valid email.', 'seedprod' );
     11    $error_msg = $k[ 'label' ] . ': ' . __( 'Please enter a valid email.', '404-page' );
    1212}
  • 404-page/trunk/framework/validations/number.php

    r1163541 r3294206  
    99    if ( !is_numeric( $input[ $k[ 'id' ] ] ) ) {
    1010        $is_valid  = false;
    11         $error_msg = $k[ 'label' ] . ': ' . __( 'Please enter a valid number.', 'seedprod' );
     11        $error_msg = $k[ 'label' ] . ': ' . __( 'Please enter a valid number.', '404-page' );
    1212    }
    1313}
  • 404-page/trunk/framework/validations/required.php

    r1163541 r3294206  
    88if ( empty( $input[ $k[ 'id' ] ] ) ) {
    99    $is_valid  = false;
    10     $error_msg = $k[ 'label' ] . ' ' . __( 'is required.', 'seedprod' );
     10    $error_msg = $k[ 'label' ] . ' ' . __( 'is required.', '404-page' );
    1111}
  • 404-page/trunk/includes/class-s404f.php

    r1163541 r3294206  
    7575       }
    7676
    77        echo $font_family;
     77       echo esc_attr($font_family);
    7878   }
    7979
     
    156156                }
    157157        } else {
    158             echo do_shortcode($template);
     158            echo wp_kses_post(do_shortcode($template));
    159159            exit();
    160160        }
  • 404-page/trunk/includes/config-settings.php

    r1163541 r3294206  
    2020        "type" => "menu",
    2121        "menu_type" => "add_options_page",
    22         "page_name" => __( "404 Page by SeedProd", 'seedprod' ),
     22        "page_name" => __( "404 Page by SeedProd", '404-page' ),
    2323        "menu_slug" => "seed_s404f",
    2424        "layout" => "2-col"
     
    3131        "type" => "tab",
    3232        "id" => "seed_s404f_setting",
    33         "label" => __( "Page Settings", 'seedprod' ),
     33        "label" => __( "Page Settings", '404-page' ),
    3434    );
    3535
     
    4242        "type" => "section",
    4343        "id" => "seed_s404f_section_general",
    44         "label" => __( "General", 'seedprod' ),
     44        "label" => __( "General", '404-page' ),
    4545    );
    4646
     
    4848        "type" => "radio",
    4949        "id" => "status",
    50         "label" => __( "Status", 'seedprod' ),
    51         "option_values" => array(
    52             '0' => __( 'Disabled', 'seedprod' ),
    53             '1' => __( 'Enable 404 Page', 'seedprod' ),
    54         ),
    55         "desc" => __( "This will replace your theme's 404 page with a custom 404 page.", 'seedprod' ),
     50        "label" => __( "Status", '404-page' ),
     51        "option_values" => array(
     52            '0' => __( 'Disabled', '404-page' ),
     53            '1' => __( 'Enable 404 Page', '404-page' ),
     54        ),
     55        "desc" => __( "This will replace your theme's 404 page with a custom 404 page.", '404-page' ),
    5656        "default_value" => "0"
    5757    );
     
    6161        "type" => "section",
    6262        "id" => "seed_s404f_section_page_settings",
    63         "label" => __( "Page Settings", 'seedprod' )
     63        "label" => __( "Page Settings", '404-page' )
    6464    );
    6565
     
    6767        "type" => "upload",
    6868        "id" => "logo",
    69         "label" => __( "Logo", 'seedprod' ),
    70         "desc" => __('Upload a logo or other image.', 'seedprod'),
     69        "label" => __( "Logo", '404-page' ),
     70        "desc" => __('Upload a logo or other image.', '404-page'),
    7171    );
    7272
     
    7575        "id" => "headline",
    7676        "class" => "large-text",
    77         "label" => __( "Headline", 'seedprod' ),
    78         "desc" => __( "Enter a headline for your page.", 'seedprod' ),
    79         'default'   => __( "404 Page by SeedProd", 'seedprod' ),
     77        "label" => __( "Headline", '404-page' ),
     78        "desc" => __( "Enter a headline for your page.", '404-page' ),
     79        'default'   => __( "404 Page by SeedProd", '404-page' ),
    8080    );
    8181
     
    8383        "type" => "wpeditor",
    8484        "id" => "description",
    85         "label" => __( "Message", 'seedprod' ),
    86         "desc" => __( "Enter your 404 page message.", 'seedprod' ),
     85        "label" => __( "Message", '404-page' ),
     86        "desc" => __( "Enter your 404 page message.", '404-page' ),
    8787        "class" => "large-text"
    8888    );
     
    9191        "type" => "checkbox",
    9292        "id" => "search_form",
    93         "label" => __( "Enable WordPress Search Form", 'seedprod' ),
    94         "desc" => __("This will enable the WordPress Search Form", 'seedprod'),
    95         "option_values" => array(
    96              '1' => __( 'Yes', 'seedprod' ),
     93        "label" => __( "Enable WordPress Search Form", '404-page' ),
     94        "desc" => __("This will enable the WordPress Search Form", '404-page'),
     95        "option_values" => array(
     96             '1' => __( 'Yes', '404-page' ),
    9797        ),
    9898        "default" => "1",
     
    103103        "id" => "twitter_url",
    104104        "class" => "large-text",
    105         "label" => __( "Twitter Social Profile", 'seedprod' ),
    106         "desc" => __( "Enter your Twitter url to display a social icon.", 'seedprod' ),
     105        "label" => __( "Twitter Social Profile", '404-page' ),
     106        "desc" => __( "Enter your Twitter url to display a social icon.", '404-page' ),
    107107    );
    108108
     
    111111        "id" => "facebook_url",
    112112        "class" => "large-text",
    113         "label" => __( "Facebook Social Profile", 'seedprod' ),
    114         "desc" => __( "Enter your Facebook url to display a social icon.", 'seedprod' ),
     113        "label" => __( "Facebook Social Profile", '404-page' ),
     114        "desc" => __( "Enter your Facebook url to display a social icon.", '404-page' ),
    115115    );
    116116
    117117     $seed_s404f_options[ ] = array( "type" => "radio",
    118118        "id" => "footer_credit",
    119         "label" => __("Powered By SeedProd", 'seedprod'),
    120         "option_values" => array('0'=>__('Nope - Got No Love', 'seedprod'),'1'=>__('Yep - I Love You Man', 'seedprod')),
    121         "desc" => __("Can we show a <strong>cool stylish</strong> footer credit at the bottom the page.", 'seedprod'),
     119        "label" => __("Powered By SeedProd", '404-page'),
     120        "option_values" => array('0'=>__('Nope - Got No Love', '404-page'),'1'=>__('Yep - I Love You Man', '404-page')),
     121        "desc" => __("Can we show a <strong>cool stylish</strong> footer credit at the bottom the page.", '404-page'),
    122122        "default_value" => "0",
    123123    );
     
    131131        "type" => "tab",
    132132        "id" => "seed_s404f_design",
    133         "label" => __( "Design Settings", 'seedprod' )
     133        "label" => __( "Design Settings", '404-page' )
    134134    );
    135135
     
    144144        "type" => "section",
    145145        "id" => "seed_s404f_section_background",
    146         "label" => __( "Background", 'seedprod' )
     146        "label" => __( "Background", '404-page' )
    147147    );
    148148
     
    152152        "type" => "checkbox",
    153153        "id" => "bg_screenshot",
    154         "label" => __( "Background Screenshot", 'seedprod' ),
    155         "desc" => __("This will capture a screenshot of your home page and use it as the background. Note: It may take a few minutes for the initial screenshot to be generated.", 'seedprod'),
    156         "option_values" => array(
    157              '1' => __( 'Yes', 'seedprod' ),
     154        "label" => __( "Background Screenshot", '404-page' ),
     155        "desc" => __("This will capture a screenshot of your home page and use it as the background. Note: It may take a few minutes for the initial screenshot to be generated.", '404-page'),
     156        "option_values" => array(
     157             '1' => __( 'Yes', '404-page' ),
    158158        ),
    159159    );
     
    163163        "type" => "upload",
    164164        "id" => "bg_image",
    165         "desc" => __('This will override the screenshot image if set.', 'seedprod'),
    166         "label" => __( "Background Image", 'seedprod' ),
     165        "desc" => __('This will override the screenshot image if set.', '404-page'),
     166        "label" => __( "Background Image", '404-page' ),
    167167    );
    168168
     
    171171        "type" => "color",
    172172        "id" => "bg_color",
    173         "label" => __( "Background Color", 'seedprod' ),
     173        "label" => __( "Background Color", '404-page' ),
    174174        "default_value" => "#fafafa",
    175175        "validate" => 'color',
     
    180180        "type" => "checkbox",
    181181        "id" => "bg_cover",
    182         "label" => __( "Responsive Background", 'seedprod' ),
    183         "desc" => __("Scale the background image to be as large as possible so that the background area is completely covered by the background image. Some parts of the background image may not be in view within the background positioning area.", 'seedprod'),
    184         "option_values" => array(
    185              '1' => __( 'Yes', 'seedprod' ),
     182        "label" => __( "Responsive Background", '404-page' ),
     183        "desc" => __("Scale the background image to be as large as possible so that the background area is completely covered by the background image. Some parts of the background image may not be in view within the background positioning area.", '404-page'),
     184        "option_values" => array(
     185             '1' => __( 'Yes', '404-page' ),
    186186        ),
    187187        "default" => "1",
     
    191191        "type" => "select",
    192192        "id" => "bg_repeat",
    193         "desc" => __('This setting is not applied if Responsive Background is checked', 'seedprod' ),
    194         "label" => __( "Background Repeat", 'seedprod' ),
    195         "option_values" => array(
    196             'no-repeat' => __( 'No-Repeat', 'seedprod' ),
    197             'repeat' => __( 'Tile', 'seedprod' ),
    198             'repeat-x' => __( 'Tile Horizontally', 'seedprod' ),
    199             'repeat-y' => __( 'Tile Vertically', 'seedprod' ),
     193        "desc" => __('This setting is not applied if Responsive Background is checked', '404-page' ),
     194        "label" => __( "Background Repeat", '404-page' ),
     195        "option_values" => array(
     196            'no-repeat' => __( 'No-Repeat', '404-page' ),
     197            'repeat' => __( 'Tile', '404-page' ),
     198            'repeat-x' => __( 'Tile Horizontally', '404-page' ),
     199            'repeat-y' => __( 'Tile Vertically', '404-page' ),
    200200        )
    201201    );
     
    205205        "type" => "select",
    206206        "id" => "bg_position",
    207         "desc" => __('This setting is not applied if Responsive Background is checked', 'seedprod' ),
    208         "label" => __( "Background Position", 'seedprod' ),
    209         "option_values" => array(
    210             'left top' => __( 'Left Top', 'seedprod' ),
    211             'left center' => __( 'Left Center', 'seedprod' ),
    212             'left bottom' => __( 'Left Bottom', 'seedprod' ),
    213             'right top' => __( 'Right Top', 'seedprod' ),
    214             'right center' => __( 'Right Center', 'seedprod' ),
    215             'right bottom' => __( 'Right Bottom', 'seedprod' ),
    216             'center top' => __( 'Center Top', 'seedprod' ),
    217             'center center' => __( 'Center Center', 'seedprod' ),
    218             'center bottom' => __( 'Center Bottom', 'seedprod' ),
     207        "desc" => __('This setting is not applied if Responsive Background is checked', '404-page' ),
     208        "label" => __( "Background Position", '404-page' ),
     209        "option_values" => array(
     210            'left top' => __( 'Left Top', '404-page' ),
     211            'left center' => __( 'Left Center', '404-page' ),
     212            'left bottom' => __( 'Left Bottom', '404-page' ),
     213            'right top' => __( 'Right Top', '404-page' ),
     214            'right center' => __( 'Right Center', '404-page' ),
     215            'right bottom' => __( 'Right Bottom', '404-page' ),
     216            'center top' => __( 'Center Top', '404-page' ),
     217            'center center' => __( 'Center Center', '404-page' ),
     218            'center bottom' => __( 'Center Bottom', '404-page' ),
    219219        )
    220220    );
     
    223223        "type" => "select",
    224224        "id" => "bg_attahcment",
    225         "desc" => __('This setting is not applied if Responsive Background is checked', 'seedprod' ),
    226         "label" => __( "Background Attachment", 'seedprod' ),
    227         "option_values" => array(
    228             'fixed' => __( 'Fixed', 'seedprod' ),
    229             'scroll' => __( 'Scroll', 'seedprod' ),
     225        "desc" => __('This setting is not applied if Responsive Background is checked', '404-page' ),
     226        "label" => __( "Background Attachment", '404-page' ),
     227        "option_values" => array(
     228            'fixed' => __( 'Fixed', '404-page' ),
     229            'scroll' => __( 'Scroll', '404-page' ),
    230230        )
    231231    );
     
    236236        "type" => "section",
    237237        "id" => "seed_s404f_section_text",
    238         "label" => __( "Text", 'seedprod' )
     238        "label" => __( "Text", '404-page' )
    239239    );
    240240
     
    243243        "type" => "color",
    244244        "id" => "link_color",
    245         "label" => __( "Link Color", 'seedprod' ),
     245        "label" => __( "Link Color", '404-page' ),
    246246        "default_value" => "#27AE60",
    247247        "validate" => 'required,color',
     
    254254        "type" => "select",
    255255        "id" => "text_font",
    256         "label" => __( "Text Font", 'seedprod' ),
     256        "label" => __( "Text Font", '404-page' ),
    257257        "option_values" => apply_filters('seed_s404f_fonts',array(
    258258            '_arial'     => 'Arial',
     
    278278        "type" => "section",
    279279        "id" => "seed_s404f_section_template",
    280         "label" => __( "Template", 'seedprod' )
     280        "label" => __( "Template", '404-page' )
    281281    );
    282282
     
    286286        "id" => "custom_css",
    287287        "class" => "large-text",
    288         "label" => __( "Custom CSS", 'seedprod' ),
    289         "desc" => __('Need to tweaks the styles? Add your custom CSS here.','seedprod'),
     288        "label" => __( "Custom CSS", '404-page' ),
     289        "desc" => __('Need to tweaks the styles? Add your custom CSS here.','404-page'),
    290290    );
    291291
     
    297297        "type" => "tab",
    298298        "id" => "seed_s404f_advanced",
    299         "label" => __( "Advanced", 'seedprod' )
     299        "label" => __( "Advanced", '404-page' )
    300300    );
    301301
     
    310310        "type" => "section",
    311311        "id" => "seed_s404f_section_scripts",
    312         "label" => __( "Scripts", 'seedprod' )
     312        "label" => __( "Scripts", '404-page' )
    313313    );
    314314
     
    316316        "type" => "checkbox",
    317317        "id" => "enable_wp_head_footer",
    318         "label" => __( "Enable 3rd Party Plugins", 'seedprod' ),
    319         "desc" => __("Turn off 3rd party plugins if you are having diplay issues on the 404 page. No other plugins will run on the 404 page when unchecked.", 'seedprod'),
    320         "option_values" => array(
    321              '1' => __( 'Disable', 'seedprod' ),
     318        "label" => __( "Enable 3rd Party Plugins", '404-page' ),
     319        "desc" => __("Turn off 3rd party plugins if you are having diplay issues on the 404 page. No other plugins will run on the 404 page when unchecked.", '404-page'),
     320        "option_values" => array(
     321             '1' => __( 'Disable', '404-page' ),
    322322        ),
    323323        "default" => "1",
     
    327327        "type" => "textarea",
    328328        "id" => "header_scripts",
    329         "label" => __( "Header Scripts", 'seedprod' ),
    330         "desc" => __('Enter any custom scripts. You can enter Javascript or CSS. This will be rendered before the closing head tag.', 'seedprod'),
     329        "label" => __( "Header Scripts", '404-page' ),
     330        "desc" => __('Enter any custom scripts. You can enter Javascript or CSS. This will be rendered before the closing head tag.', '404-page'),
    331331        "class" => "large-text"
    332332    );
     
    335335        "type" => "textarea",
    336336        "id" => "footer_scripts",
    337         "label" => __( "Footer Scripts", 'seedprod' ),
    338         "desc" => __('Enter any custom scripts. This will be rendered before the closing body tag.', 'seedprod'),
     337        "label" => __( "Footer Scripts", '404-page' ),
     338        "desc" => __('Enter any custom scripts. This will be rendered before the closing body tag.', '404-page'),
    339339        "class" => "large-text"
    340340    );
  • 404-page/trunk/includes/template-tags.php

    r1909873 r3294206  
    5353    $output = '';
    5454    if(!empty($custom_css)){
    55         $output = '<style type="text/css">'.$custom_css.'</style>';
     55        $output = '<style type="text/css">'.wp_strip_all_tags($custom_css).'</style>';
    5656    }
    5757
     
    124124        <?php if ( !empty( $bg_image ) ): ;?>
    125125            <?php if ( isset( $bg_cover ) && in_array( '1', $bg_cover ) ) : ?>
    126                 background: <?php echo $bg_color;?> url('<?php echo $bg_image; ?>') no-repeat top center fixed;
     126                background: <?php echo esc_attr($bg_color);?> url('<?php echo esc_url($bg_image); ?>') no-repeat top center fixed;
    127127                -webkit-background-size: cover;
    128128                -moz-background-size: cover;
     
    130130                background-size: cover;
    131131            <?php else: ?>
    132                 background: <?php echo $bg_color;?> url('<?php echo $bg_image; ?>') <?php echo $bg_repeat;?> <?php echo $bg_position;?> <?php echo $bg_attahcment;?>;
     132                background: <?php echo esc_attr($bg_color);?> url('<?php echo esc_url($bg_image); ?>') <?php echo esc_attr($bg_repeat);?> <?php echo esc_attr($bg_position);?> <?php echo esc_attr($bg_attahcment);?>;
    133133            <?php endif ?>
    134134        <?php else:
    135135            if(!empty($bg_color)):
    136136        ?>
    137             background: <?php echo $bg_color;?>;
     137            background: <?php echo esc_attr($bg_color);?>;
    138138        <?php endif;endif; ?>
    139139
     
    141141        <?php if(empty($bg_image) && !empty($bg_screenshot)): ;?>
    142142            <?php $mshot = 'http://s.wordpress.com/mshots/v1/'. urlencode(home_url()) .'?w=1600'; ?>
    143             background: <?php echo $bg_color; ?> url('<?php echo $mshot ?>') <?php echo $bg_repeat ?> <?php echo $bg_position ?> <?php echo $bg_attahcment ?> ;
     143            background: <?php echo esc_attr($bg_color); ?> url('<?php echo esc_url($mshot); ?>') <?php echo esc_attr($bg_repeat); ?> <?php echo esc_attr($bg_position); ?> <?php echo esc_attr($bg_attahcment); ?> ;
    144144            -webkit-background-size: cover;
    145145            -moz-background-size: cover;
     
    156156    <?php if ( !empty( $text_font ) ):?>
    157157        .seed-csp4 body{
    158             font-family: <?php echo SEED_S404F::get_font_family($text_font); ?>
     158            font-family: <?php SEED_S404F::get_font_family($text_font); ?>
    159159        }
    160160
    161161        .seed-csp4 h1, .seed-csp4 h2, .seed-csp4 h3, .seed-csp4 h4, .seed-csp4 h5, .seed-csp4 h6{
    162             font-family: <?php echo SEED_S404F::get_font_family($text_font); ?>
     162            font-family: <?php SEED_S404F::get_font_family($text_font); ?>
    163163        }
    164164    <?php endif;?>
     
    166166    <?php if ( !empty( $text_color ) ) { ?>
    167167        .seed-csp4 body{
    168             color:<?php echo $text_color;?>;
     168            color:<?php echo esc_attr($text_color);?>;
    169169        }
    170170    <?php } ?>
     
    177177    <?php if ( !empty( $headline_color ) ) { ?>
    178178        .seed-csp4 h1, .seed-csp4 h2, .seed-csp4 h3, .seed-csp4 h4, .seed-csp4 h5, .seed-csp4 h6{
    179             color:<?php echo $headline_color;?>;
     179            color:<?php echo esc_attr($headline_color);?>;
    180180        }
    181181    <?php }?>
     
    184184    <?php if ( !empty( $link_color ) ) { ?>
    185185        .seed-csp4 a, .seed-csp4 a:visited, .seed-csp4 a:hover, .seed-csp4 a:active{
    186             color:<?php echo $link_color;?>;
     186            color:<?php echo esc_attr($link_color);?>;
    187187        }
    188188
     
    194194    <?php if(!empty($button_font['color'])){ ?>
    195195        .seed-csp4 a, .seed-csp4 a:visited, .seed-csp4 a:hover, .seed-csp4 a:active{
    196             color:<?php echo $button_font['color'];?>;
     196            color:<?php echo esc_attr($button_font['color']);?>;
    197197        }
    198198
    199199        #goog-wm-sb, #wp-search-btn{
    200             background: <?php echo $button_font['color'];?>;
     200            background: <?php echo esc_attr($button_font['color']);?>;
    201201        }
    202202
    203203        <?php
    204204
     205        $css_button_color_val = esc_attr($button_font['color']);
     206
    205207        $css = "
    206208
    207209           #s404f-socialprofiles a{
    208             color: {$button_font['color']};
     210            color: {$css_button_color_val};
    209211          }
    210212
     
    259261            text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
    260262        }
    261         @btnColor: {$button_font['color']};
     263        @btnColor: {$css_button_color_val};
    262264        @btnDarkColor: darken(@btnColor, 15%);
    263265        #wp-search-btn, #goog-wm-sb, .seed-csp4 .btn-primary, .seed-csp4 .btn-primary:focus, .gform_button, #mc-embedded-subscribe, .mymail-wrapper .submit-button {
     
    296298
    297299    } catch (Exception $e) {
    298         _e('An error has occured. Please make sure you have entered the Text Color correctly.','seedprod');
     300        esc_html_e('An error has occured. Please make sure you have entered the Text Color correctly.','404-page');
    299301        die();
    300302    }
     
    313315    if(!empty($theme) && $theme != 'default' ){
    314316
    315         $output .= '<link rel="stylesheet" href="'.apply_filters('seed_s404f_themes_url',SEED_S404F_PLUGIN_URL).'style.css">'."\n";
     317        $output .= '<link rel="stylesheet" href="'.esc_url(apply_filters('seed_s404f_themes_url',SEED_S404F_PLUGIN_URL)).'style.css">'."\\n";
    316318    }
    317319
     
    325327        $output .= '<script src="'.$include_url.'js/jquery/jquery.js"></script>'."\n";
    326328    }
    327     $output .= '<script src="'.SEED_S404F_PLUGIN_URL.'themes/default/bootstrap/js/bootstrap.js"></script>'."\n";
     329    $output .= '<script src="'.esc_url(SEED_S404F_PLUGIN_URL.'themes/default/bootstrap/js/bootstrap.js').'"></script>'."\\n";
    328330
    329331    // Scripts
    330     $output .= "<!-- Scripts -->\n";
    331     $output .= '<script src="'.SEED_S404F_PLUGIN_URL.'themes/default/js/script.js"></script>'."\n";
     332    $output .= "<!-- Scripts -->\\n";
     333    $output .= '<script src="'.esc_url(SEED_S404F_PLUGIN_URL.'themes/default/js/script.js').'"></script>'."\\n";
    332334
    333335    // Header Scripts
     
    337339    }
    338340
    339     $output .= "<!-- Modernizr -->\n";
    340     $output .= '<script src="'.SEED_S404F_PLUGIN_URL.'themes/default/js/modernizr.min.js"></script>'."\n";
     341    $output .= "<!-- Modernizr -->\\n";
     342    $output .= '<script src="'.esc_url(SEED_S404F_PLUGIN_URL.'themes/default/js/modernizr.min.js').'"></script>'."\\n";
    341343
    342344    $output = apply_filters('seed_s404f_head', $output);
     
    422424    $output = '';
    423425
    424     if(!empty($logo['url'])){
    425         $output .= "<img id='s404f-logo' src='".esc_attr($logo)."'>";
     426    if(!empty($logo)){
     427        $output .= "<img id='s404f-logo' src='".esc_url($logo)."'>";
    426428    }
    427429
     
    444446
    445447    if(!empty($headline)){
    446         $output .= '<h1 id="s404f-headline">'.$headline.'</h1>';
     448        $output .= '<h1 id="s404f-headline">'.esc_html($headline).'</h1>';
    447449    }
    448450
     
    470472
    471473    if(!empty($description) && $is_post === false){
    472         $content = $description;
     474        $content = wp_kses_post($description);
    473475        if(!empty($enable_wp_head_footer)){
    474476            $content = apply_filters('the_content', $content);
     
    510512        <form role='search' method='get' id='searchform' class='searchform' action='$home_url'>
    511513        <div>
    512         <input type='text' value='".get_search_query() ."' name='s' id='s' />
     514        <input type='text' value='".esc_attr(get_search_query()) ."' name='s' id='s' />
    513515        <input type='submit' id='wp-search-btn' value='Search' />
    514516        </div>
     
    522524
    523525    if ( $echo )
    524     echo $output;
     526        echo $output;
    525527    else {
    526528        return $output;
     
    540542    $output .= '<div id="s404f-socialprofiles">';
    541543    if(!empty($twitter_url)){
    542         $output .= '<a href="'.$twitter_url.'" target="_blank"><i class="fa fa-twitter fa-2x"></i></a>';
     544        $output .= '<a href="'.esc_url($twitter_url).'" target="_blank"><i class="fa fa-twitter fa-2x"></i></a>';
    543545    }
    544546    if(!empty($facebook_url)){
    545         $output .= '<a href="'.$facebook_url.'" target="_blank"><i class="fa fa-facebook fa-2x"></i></a>';
     547        $output .= '<a href="'.esc_url($facebook_url).'" target="_blank"><i class="fa fa-facebook fa-2x"></i></a>';
    546548    }
    547549
  • 404-page/trunk/lib/seed_s404f_lessc.inc.php

    r1163541 r3294206  
    652652                        $subProp[0] == "assign" &&
    653653                        is_string($subProp[1]) &&
    654                         $subProp[1]{0} != $this->vPrefix)
     654                        $subProp[1][0] != $this->vPrefix)
    655655                    {
    656656                        $subProp[2] = array(
     
    15461546        $parser = new seed_s404f_lessc_parser($this, __METHOD__);
    15471547        foreach ($args as $name => $strValue) {
    1548             if ($name{0} != '@') $name = '@'.$name;
     1548            if ($name[0] != '@') $name = '@'.$name;
    15491549            $parser->count = 0;
    15501550            $parser->buffer = (string)$strValue;
     
    22022202                if (!isset($block->args)) {
    22032203                    foreach ($block->tags as $tag) {
    2204                         if (!is_string($tag) || $tag{0} != $this->seed_s404f_lessc->mPrefix) {
     2204                        if (!is_string($tag) || $tag[0] != $this->seed_s404f_lessc->mPrefix) {
    22052205                            $hidden = false;
    22062206                            break;
     
    22562256        // move @ tags out of variable namespace
    22572257        foreach ($tags as &$tag) {
    2258             if ($tag{0} == $this->seed_s404f_lessc->vPrefix)
     2258            if ($tag[0] == $this->seed_s404f_lessc->vPrefix)
    22592259                $tag[0] = $this->seed_s404f_lessc->mPrefix;
    22602260        }
     
    29492949        if ($this->literal(';')) {
    29502950            return true;
    2951         } elseif ($this->count == strlen($this->buffer) || $this->buffer{$this->count} == '}') {
     2951        } elseif ($this->count == strlen($this->buffer) || $this->buffer[$this->count] == '}') {
    29522952            // if there is end of file or a closing block next then we don't need a ;
    29532953            return true;
  • 404-page/trunk/readme.txt

    r1671022 r3294206  
    55Requires at least: 3
    66Tested up to: 4.8.0
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.3
    88
    99Creates a Custom 404 Page for your WordPress Site.
Note: See TracChangeset for help on using the changeset viewer.