Plugin Directory

Changeset 3103368


Ignore:
Timestamp:
06/17/2024 05:29:40 AM (22 months ago)
Author:
nikmelnik
Message:

Релиз версии 1.1.1 плагина Realbig

Изменения версии:

  • вернули поддержку старых версий Wordpress (4.5);
  • другие мелкие улучшения и правки.
Location:
realbig-media/trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • realbig-media/trunk/README.MD

    r3090592 r3103368  
    22Contributors: 101
    33Tags: AD, content filling
    4 Requires at least: 6.2
     4Requires at least: 4.5
    55Tested up to: 6.5.3
    66Stable tag: 0.1.26.56
     
    108108== Changelog ==
    109109
     110= 1.1.1 =
     111
     112Изменения версии:
     113
     114* вернули поддержку старых версий Wordpress (4.5);
     115* другие мелкие улучшения и правки.
     116
    110117= 1.1.0 =
    111118
  • realbig-media/trunk/README.txt

    r3090592 r3103368  
    22Contributors: 101
    33Tags: AD, content filling
    4 Requires at least: 6.2
     4Requires at least: 4.5
    55Tested up to: 6.5.3
    66Stable tag: 0.1.26.56
     
    108108== Changelog ==
    109109
     110= 1.1.1 =
     111
     112Изменения версии:
     113
     114* вернули поддержку старых версий Wordpress (4.5);
     115* другие мелкие улучшения и правки.
     116
    110117= 1.1.0 =
    111118
  • realbig-media/trunk/RFWP_AdminPage.php

    r3090592 r3103368  
    6767
    6868            // @codingStandardsIgnoreStart
    69             $res['getBlocks'] = $wpdb->get_results($wpdb->prepare('SELECT * FROM %i', "{$wpPrefix}realbig_plugin_settings"), ARRAY_A);
    70 
    71             $cached = $wpdb->get_results($wpdb->prepare('SELECT post_title, post_content, post_type FROM %i ' .
    72                 'WHERE post_type IN (%s, %s, %s)', "{$wpPrefix}posts", "rb_block_desktop_new", "rb_block_tablet_new", "rb_block_mobile_new"));
     69            $res['getBlocks'] = $wpdb->get_results("SELECT * FROM `{$wpPrefix}realbig_plugin_settings`", ARRAY_A);
     70
     71            $cached = $wpdb->get_results($wpdb->prepare("SELECT post_title, post_content, post_type FROM `{$wpPrefix}posts` " .
     72                "WHERE post_type IN (%s, %s, %s)", "rb_block_desktop_new", "rb_block_tablet_new", "rb_block_mobile_new"));
    7373            // @codingStandardsIgnoreEnd
    7474            $cacheKeys = ["rb_block_desktop_new" => "desktop", "rb_block_tablet_new" => "tablet", "rb_block_mobile_new" => "mobile"];
     
    8585            try {
    8686                // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    87                 $res['rbSettings'] = $wpdb->get_results($wpdb->prepare('SELECT optionName, optionValue, timeUpdate FROM %i ' .
    88                     'WHERE optionName IN ("deactError","domain","excludedMainPage","excludedPages","pushStatus",' .
    89                     '"excludedPageTypes","excludedIdAndClasses","kill_rb","pushUniversalStatus","pushUniversalDomain",' .
    90                     '"statusFor404","blockDuplicate","jsToHead","obligatoryMargin","tagsListForTextLength","usedTaxonomies",' .
    91                     '"enableLogs")', "{$GLOBALS['wpPrefix']}realbig_settings"), ARRAY_A);
     87                $res['rbSettings'] = $wpdb->get_results($wpdb->prepare("SELECT optionName, optionValue, timeUpdate " .
     88                    // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     89                    "FROM `{$GLOBALS['wpPrefix']}realbig_settings` " .
     90                    'WHERE optionName IN (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)',
     91                    "deactError", "domain", "excludedMainPage", "excludedPages", "pushStatus", "excludedPageTypes",
     92                    "excludedIdAndClasses", "kill_rb", "pushUniversalStatus", "pushUniversalDomain", "statusFor404",
     93                    "blockDuplicate", "jsToHead", "obligatoryMargin", "tagsListForTextLength", "usedTaxonomies",
     94                    "enableLogs"), ARRAY_A);
    9295//          $rbTransients = $wpdb->get_results('SELECT optionName, optionValue, timeUpdate FROM ' . $GLOBALS["wpPrefix"] . 'realbig_settings WHERE optionName IN ("deactError","domain","excludedMainPage","excludedPages","pushStatus","excludedPageTypes","kill_rb")', ARRAY_A);
    9396
  • realbig-media/trunk/RFWP_Amp.php

    r3062761 r3103368  
    6565                }
    6666                global $wpdb;
    67                 // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    68                 $ampAds = $wpdb->get_results($wpdb->prepare('SELECT * FROM %i WRAA', "{$GLOBALS['wpPrefix']}realbig_amp_ads"));
     67                // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     68                $ampAds = $wpdb->get_results("SELECT * FROM `{$GLOBALS['wpPrefix']}realbig_amp_ads` WRAA");
    6969                if (empty($ampAds)) {
    7070                    return $content;
  • realbig-media/trunk/RFWP_Cache.php

    r3062761 r3103368  
    111111            global $wpPrefix;
    112112            // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    113             $wpdb->query($wpdb->prepare('DELETE FROM %i WHERE post_type IN (%s, %s, %s)',
    114                 "{$wpPrefix}posts", "rb_block_desktop_new", "rb_block_tablet_new", "rb_block_mobile_new"));
     113            $wpdb->query($wpdb->prepare("DELETE FROM `{$wpPrefix}posts` WHERE post_type IN (%s, %s, %s)",
     114                "rb_block_desktop_new", "rb_block_tablet_new", "rb_block_mobile_new"));
    115115        }
    116116
  • realbig-media/trunk/RFWP_Utils.php

    r3062761 r3103368  
    5151
    5252                // @codingStandardsIgnoreStart
    53                 $getOption = $wpdb->query($wpdb->prepare("SELECT id FROM %i WHERE optionName = %s", "{$wpPrefix}realbig_settings", $optionName));
     53                $getOption = $wpdb->query($wpdb->prepare("SELECT id FROM `{$wpPrefix}realbig_settings` WHERE optionName = %s", $optionName));
    5454                if (empty($getOption)) {
    5555                    $res = $wpdb->insert($wpPrefix.'realbig_settings', ['optionName' => $optionName, 'optionValue' => $value]);
     
    7676            global $wpdb;
    7777            $wpPrefix = RFWP_getWpPrefix();
    78             // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    79             $getOption = $wpdb->get_var($wpdb->prepare("SELECT optionValue FROM %i WHERE optionName = %s", "{$wpPrefix}realbig_settings", $optionName));
     78            // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     79            $getOption = $wpdb->get_var($wpdb->prepare("SELECT optionValue FROM `{$wpPrefix}realbig_settings` WHERE optionName = %s",
     80                $optionName));
    8081
    8182            return $getOption;
  • realbig-media/trunk/assets/js/RFWP_BlockInserting.js

    r3090592 r3103368  
    1 class RFWP_BlockInserting {
     1window.RFWP_BlockInserting = class {
    22    _blockSettingArray;
    33
     
    10401040        return {array: tlArray, length: textLength};
    10411041    }
    1042 }
     1042};
  • realbig-media/trunk/realbigForWP.php

    r3090592 r3103368  
    66Plugin name:  Realbig Media
    77Description:  Плагин для монетизации от RealBig.media
    8 Version:      1.1.0
     8Version:      1.1.1
    99Author:       Realbig Team
    1010Author URI:   https://realbig.media
     
    8989        $GLOBALS['rb_variables']['localRotatorUrl'] = null;
    9090        $GLOBALS['rb_variables']['adWithStatic'] = null;
    91         // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    92         $getOV = $wpdb->get_results($wpdb->prepare("SELECT optionName, optionValue FROM %i" .
    93             " WHERE optionName IN ('domain','rotator','localRotatorUrl','adWithStatic')", "{$GLOBALS['wpPrefix']}realbig_settings"));
     91        // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     92        $getOV = $wpdb->get_results("SELECT optionName, optionValue FROM `{$GLOBALS['wpPrefix']}realbig_settings` " .
     93            "WHERE optionName IN ('domain','rotator','localRotatorUrl','adWithStatic')");
    9494        if (!empty($getOV)) {
    9595            foreach ($getOV AS $k => $item) {
     
    242242                $getRotator = 'f6ds8jhy56';
    243243
    244                 // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    245                 $getOV = $wpdb->get_results($wpdb->prepare("SELECT optionName, optionValue FROM %i WHERE optionName IN (%s, %s)",
    246                     "{$GLOBALS['wpPrefix']}realbig_settings", "domain", "rotator"));
     244                // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     245                $getOV = $wpdb->get_results($wpdb->prepare("SELECT optionName, optionValue FROM `{$GLOBALS['wpPrefix']}realbig_settings` " .
     246                    "WHERE optionName IN (%s, %s)", "domain", "rotator"));
    247247                foreach ($getOV AS $k => $item) {
    248248                    if (!empty($item->optionValue)) {
     
    285285                $getCode = '';
    286286
    287                 // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    288                 $array = $wpdb->get_results($wpdb->prepare("SELECT optionValue FROM %i WHERE optionName=%s",
    289                     "{$GLOBALS['wpPrefix']}realbig_settings", "rotatorCode"), ARRAY_A);
     287                // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     288                $array = $wpdb->get_results($wpdb->prepare("SELECT optionValue FROM `{$GLOBALS['wpPrefix']}realbig_settings` WHERE optionName=%s",
     289                    "rotatorCode"), ARRAY_A);
    290290
    291291                if (!empty($array[0]['optionValue'])) {
     
    325325                        $pushDomain = $GLOBALS['rb_push']['universalDomain'];
    326326                    } else {
    327                         // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    328                         $pushDomain = $wpdb->get_var($wpdb->prepare("SELECT optionValue FROM %i WHERE optionName = %s",
    329                             "{$GLOBALS['wpPrefix']}realbig_settings", "pushUniversalDomain"));
     327                        // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     328                        $pushDomain = $wpdb->get_var($wpdb->prepare("SELECT optionValue FROM `{$GLOBALS['wpPrefix']}realbig_settings` " .
     329                            "WHERE optionName = %s", "pushUniversalDomain"));
    330330                    }
    331331                    if (empty($pushDomain)) {
     
    437437                        $statusFor404 = 'show';
    438438                        // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    439                         $realbig_settings_info = $wpdb->get_results($wpdb->prepare("SELECT optionName, optionValue FROM %i WGPS " .
    440                             "WHERE optionName IN (%s, %s, %s)",
    441                             "{$GLOBALS['wpPrefix']}realbig_settings", 'excludedIdAndClasses', 'blockDuplicate', 'statusFor404'));
     439                        $realbig_settings_info = $wpdb->get_results($wpdb->prepare("SELECT optionName, optionValue " .
     440                            // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     441                            "FROM `{$GLOBALS['wpPrefix']}realbig_settings` WGPS WHERE optionName IN (%s, %s, %s)",
     442                            'excludedIdAndClasses', 'blockDuplicate', 'statusFor404'));
    442443                        if (!empty($realbig_settings_info)) {
    443444                            foreach ($realbig_settings_info AS $k => $item) {
     
    476477
    477478                        if ((!is_404())||$statusFor404!='disable') {
     479                            // @codingStandardsIgnoreStart
    478480                            if (!empty($content)) {
    479                                 // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    480                                 $fromDb = $wpdb->get_results($wpdb->prepare("SELECT * FROM %i WGPS",
    481                                     "{$GLOBALS['wpPrefix']}realbig_plugin_settings"));
     481                                $fromDb = $wpdb->get_results("SELECT * FROM `{$GLOBALS['wpPrefix']}realbig_plugin_settings` WGPS");
    482482                            } else {
    483                                 // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    484                                 $fromDb = $wpdb->get_results($wpdb->prepare("SELECT * FROM %i WGPS WHERE setting_type = 3",
    485                                     "{$GLOBALS['wpPrefix']}realbig_plugin_settings"));
     483                                $fromDb = $wpdb->get_results("SELECT * FROM `{$GLOBALS['wpPrefix']}realbig_plugin_settings` WGPS WHERE setting_type = 3");
    486484                            }
     485                            // @codingStandardsIgnoreEnd
    487486                        }
    488487
     
    580579                    echo  PHP_EOL . "</script>" . PHP_EOL;
    581580
    582                     $GLOBALS['rfwp_addedAlready']['asyncBlockInserting'] = true;
     581                    $GLOBALS['rfwp_addedAlready']['asyncBlockInserting'] = true;
    583582                    if (!is_admin()&&empty(apply_filters('wp_doing_cron',defined('DOING_CRON')&&DOING_CRON))&&empty(apply_filters('wp_doing_ajax',defined('DOING_AJAX')&&DOING_AJAX))) {
    584583                        RFWP_WorkProgressLog(false,'asyncBlockInserting file add');
     
    674673    if (empty(apply_filters('wp_doing_cron', defined('DOING_CRON') && DOING_CRON))) {
    675674        if ((!empty($curUserCan)&&!empty($_POST['statusRefresher']))||empty($tableForToken)||empty($tableForCurrentPluginChecker)) {
    676             // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    677             $wpdb->query($wpdb->prepare("DELETE FROM %i WHERE post_type IN (%s, %s, %s, %s, %s) AND post_author = 0",
    678                 "{$wpPrefix}posts", "rb_block_mobile", "rb_block_desktop", "rb_block_mobile_new", "rb_block_tablet_new", "rb_block_desktop_new"));
     675            // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     676            $wpdb->query($wpdb->prepare("DELETE FROM `{$wpPrefix}posts` WHERE post_type IN (%s, %s, %s, %s, %s) AND post_author = 0",
     677                "rb_block_mobile", "rb_block_desktop", "rb_block_mobile_new", "rb_block_tablet_new", "rb_block_desktop_new"));
    679678            RFWP_Cache::deleteCaches();
    680679            delete_option('realbig_status_gatherer_version');
     
    707706    /********** checking and creating tables ******************************************************************************/
    708707    if ((!empty($lastSuccessVersionGatherer)&&$lastSuccessVersionGatherer != $GLOBALS['realbigForWP_version'])||empty($lastSuccessVersionGatherer)) {
    709         // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    710         $wpdb->query($wpdb->prepare("DELETE FROM %i WHERE post_type IN (%s, %s, %s, %s, %s) AND post_author = 0",
    711             "{$wpPrefix}posts", "rb_block_mobile", "rb_block_desktop", "rb_block_mobile_new", "rb_block_tablet_new", "rb_block_desktop_new"));
     708        // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     709        $wpdb->query($wpdb->prepare("DELETE FROM `{$wpPrefix}posts` WHERE post_type IN (%s, %s, %s, %s, %s) AND post_author = 0",
     710            "rb_block_mobile", "rb_block_desktop", "rb_block_mobile_new", "rb_block_tablet_new", "rb_block_desktop_new"));
    712711        RFWP_Cache::deleteCaches();
    713712
     
    731730    }
    732731    if ($statusGatherer['realbig_plugin_settings_table'] == true && ($statusGatherer['realbig_plugin_settings_columns'] == false || $lastSuccessVersionGatherer != $GLOBALS['realbigForWP_version'])) {
    733         // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    734         $colCheck = $wpdb->get_col($wpdb->prepare("SHOW COLUMNS FROM %i", "{$wpPrefix}realbig_plugin_settings"));
     732        // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     733        $colCheck = $wpdb->get_col("SHOW COLUMNS FROM `{$wpPrefix}realbig_plugin_settings`");
    735734        if (!empty($colCheck)) {
    736735            $statusGatherer = RFWP_wpRealbigPluginSettingsColomnUpdateFunction($wpPrefix, $colCheck, $statusGatherer);
     
    752751
    753752    // @codingStandardsIgnoreStart
    754     $unmarkSuccessfulUpdate      = $wpdb->get_var($wpdb->prepare("SELECT optionValue FROM %i WHERE optionName = %s",
    755         "{$wpPrefix}realbig_settings", "successUpdateMark"));
    756     $jsAutoSynchronizationStatus = $wpdb->get_var($wpdb->prepare("SELECT optionValue FROM %i WHERE optionName = %s",
    757         "{$wpPrefix}realbig_settings", "jsAutoSyncFails"));
     753    $unmarkSuccessfulUpdate      = $wpdb->get_var($wpdb->prepare("SELECT optionValue FROM `{$wpPrefix}realbig_settings` " .
     754        "WHERE optionName = %s", "successUpdateMark"));
     755    $jsAutoSynchronizationStatus = $wpdb->get_var($wpdb->prepare("SELECT optionValue FROM `{$wpPrefix}realbig_settings` " .
     756        "WHERE optionName = %s", "jsAutoSyncFails"));
    758757    // @codingStandardsIgnoreEnd
    759758
     
    813812                $excludedPage = true;
    814813            } elseif (!empty($usedUrl)||!empty($usedUrl2)) {
    815                 // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    816                 $pageChecksDb = $wpdb->get_results($wpdb->prepare("SELECT optionValue, optionName FROM %i WHERE optionName IN (%s,%s,%s)",
    817                     "{$wpPrefix}realbig_settings", "excludedMainPage", "excludedPages", "excludedPageTypes"), ARRAY_A);
     814                // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     815                $pageChecksDb = $wpdb->get_results($wpdb->prepare("SELECT optionValue, optionName FROM `{$wpPrefix}realbig_settings` " .
     816                    "WHERE optionName IN (%s,%s,%s)", "excludedMainPage", "excludedPages", "excludedPageTypes"), ARRAY_A);
    818817                $pageChecks = [];
    819818                foreach ($pageChecksDb AS $k => $item) {
     
    969968        add_action('wp_head', 'RFWP_AD_header_add', 0);
    970969        $separatedStatuses = [];
    971         // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    972         $statuses = $wpdb->get_results($wpdb->prepare('SELECT optionName, optionValue FROM %i WHERE optionName IN (%s,%s,%s)',
    973             "{$wpPrefix}realbig_settings", "pushUniversalCode", "pushUniversalStatus", "pushUniversalDomain"), ARRAY_A);
     970        // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     971        $statuses = $wpdb->get_results($wpdb->prepare("SELECT optionName, optionValue FROM `{$wpPrefix}realbig_settings` " .
     972            "WHERE optionName IN (%s,%s,%s)", "pushUniversalCode", "pushUniversalStatus", "pushUniversalDomain"), ARRAY_A);
    974973        if (!empty($statuses)) {
    975974            foreach ($statuses AS $k => $item) {
  • realbig-media/trunk/rssGenerator.php

    r3062761 r3103368  
    7575                global $wpPrefix;
    7676
    77                 // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    78                 $rb_turboAds = $wpdb->get_results($wpdb->prepare("SELECT * FROM %i", "{$wpPrefix}realbig_turbo_ads"), ARRAY_A);
     77                // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     78                $rb_turboAds = $wpdb->get_results("SELECT * FROM `{$wpPrefix}realbig_turbo_ads`", ARRAY_A);
    7979                $GLOBALS['rb_turboAds'] = $rb_turboAds;
    8080            } else {
  • realbig-media/trunk/synchronising.php

    r3090592 r3103368  
    130130                                    $counter = 0;
    131131                                    // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    132                                     $wpdb->query($wpdb->prepare('DELETE FROM %i', "{$wpPrefix}realbig_plugin_settings"));
    133                                     $params = ["{$wpPrefix}realbig_plugin_settings"];
    134                                     $sqlTokenSave = "INSERT INTO %i (text, block_number, setting_type, element, directElement, elementPosition, " .
     132                                    $wpdb->query("DELETE FROM `{$wpPrefix}realbig_plugin_settings`");
     133                                    $params = [];
     134                                    $sqlTokenSave = "INSERT INTO `{$wpPrefix}realbig_plugin_settings` (text, block_number, setting_type, element, directElement, elementPosition, " .
    135135                                        "elementPlace, firstPlace, elementCount, elementStep, minSymbols, maxSymbols, minHeaders, maxHeaders, " .
    136136                                        "onCategories, offCategories, onTags, offTags, elementCss, showNoElement) VALUES ";
     
    170170                                } elseif (empty($decodedToken['data'])&&sanitize_text_field($decodedToken['status']) == "empty_success") {
    171171                                    // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    172                                     $wpdb->query($wpdb->prepare('DELETE FROM %i', "{$wpPrefix}realbig_plugin_settings"));
     172                                    $wpdb->query("DELETE FROM `{$wpPrefix}realbig_plugin_settings`");
    173173                                }
    174174
     
    349349                                /** Turbo rss ads */
    350350                                // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    351                                 $wpdb->query($wpdb->prepare('DELETE FROM %i', "{$wpPrefix}realbig_turbo_ads"));
     351                                $wpdb->query("DELETE FROM `{$wpPrefix}realbig_turbo_ads`");
    352352                                if (!empty($decodedToken['turboAdSettings'])) {
    353353                                    $counter = 0;
    354                                     $params = ["{$wpPrefix}realbig_turbo_ads"];
    355                                     $sqlTokenSave = "INSERT INTO %i (blockId, adNetwork, adNetworkYandex, adNetworkAdfox, settingType, element, " .
     354                                    $params = [];
     355                                    $sqlTokenSave = "INSERT INTO `{$wpPrefix}realbig_turbo_ads` (blockId, adNetwork, adNetworkYandex, adNetworkAdfox, settingType, element, " .
    356356                                        "elementPosition, elementPlace) VALUES ";
    357357                                    unset($k, $item);
     
    383383                                    $counter = 0;
    384384                                    // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    385                                     $wpdb->query($wpdb->prepare('DELETE FROM %i', "{$wpPrefix}realbig_amp_ads"));
    386                                     $params = ["{$wpPrefix}realbig_amp_ads"];
    387                                     $sqlTokenSave = "INSERT INTO %i (blockId, adField, settingType, element, elementPosition, elementPlace) VALUES ";
     385                                    $wpdb->query("DELETE FROM `{$wpPrefix}realbig_amp_ads`");
     386                                    $params = [];
     387                                    $sqlTokenSave = "INSERT INTO `{$wpPrefix}realbig_amp_ads` (blockId, adField, settingType, element, elementPosition, elementPlace) VALUES ";
    388388                                    foreach ($decodedToken['ampAdSettings'] AS $k => $item) {
    389389                                        $counter ++;
     
    572572                                                case 'mobile':
    573573                                                    $postCheckMobile  = $wpdb->get_var(
    574                                                             $wpdb->prepare('SELECT id FROM %i WHERE post_type = %s AND post_title = %s',
    575                                                                 "{$wpPrefix}posts", "rb_block_mobile_new", $ritem["blockId"]));
     574                                                            $wpdb->prepare("SELECT id FROM `{$wpPrefix}posts` WHERE post_type = %s AND post_title = %s",
     575                                                                "rb_block_mobile_new", $ritem["blockId"]));
    576576                                                    $resultTypes['mobile'] = true;
    577577                                                    break;
    578578                                                case 'tablet':
    579579                                                    $postCheckTablet = $wpdb->get_var(
    580                                                             $wpdb->prepare('SELECT id FROM %i WHERE post_type = %s AND post_title = %s',
    581                                                                 "{$wpPrefix}posts", "rb_block_tablet_new", $ritem["blockId"]));
     580                                                            $wpdb->prepare("SELECT id FROM `{$wpPrefix}posts` WHERE post_type = %s AND post_title = %s",
     581                                                                "rb_block_tablet_new", $ritem["blockId"]));
    582582                                                    $resultTypes['tablet'] = true;
    583583                                                    break;
    584584                                                case 'desktop':
    585585                                                    $postCheckDesktop = $wpdb->get_var(
    586                                                             $wpdb->prepare('SELECT id FROM %i WHERE post_type = %s AND post_title = %s',
    587                                                                 "{$wpPrefix}posts", "rb_block_desktop_new", $ritem["blockId"]));
     586                                                            $wpdb->prepare("SELECT id FROM `{$wpPrefix}posts` WHERE post_type = %s AND post_title = %s",
     587                                                                "rb_block_desktop_new", $ritem["blockId"]));
    588588                                                    $resultTypes['desktop'] = true;
    589589                                                    break;
     
    695695                    if (empty($GLOBALS['tokenTimeUpdate'])) {
    696696                        // @codingStandardsIgnoreStart
    697                         $timeUpdate = $wpdb->get_results($wpdb->prepare("SELECT optionValue FROM %i WHERE optionName = %s",
    698                             "{$wpPrefix}realbig_settings", "token_sync_time"));
     697                        $timeUpdate = $wpdb->get_results($wpdb->prepare("SELECT optionValue FROM `{$wpPrefix}realbig_settings` WHERE optionName = %s",
     698                            "token_sync_time"));
    699699                        if (empty($timeUpdate)) {
    700700                            $updateResult = RFWP_wpRealbigSettingsTableUpdateFunction($wpPrefix);
    701701                            if ($updateResult == true) {
    702                                 $timeUpdate = $wpdb->get_results($wpdb->prepare("SELECT optionValue FROM %i WHERE optionName = %s",
    703                                     "{$wpPrefix}realbig_settings", "token_sync_time"));
     702                                $timeUpdate = $wpdb->get_results($wpdb->prepare("SELECT optionValue FROM `{$wpPrefix}realbig_settings` WHERE optionName = %s",
     703                                    "token_sync_time"));
    704704                            }
    705705                        }
     
    739739                    global $wpdb;
    740740                    $GLOBALS['tokenStatusMessage'] = null;
    741                     // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    742                     $token = $wpdb->get_results($wpdb->prepare("SELECT optionValue FROM %i WHERE optionName = %s",
    743                         "{$wpPrefix}realbig_settings", "_wpRealbigPluginToken"));
     741                    // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     742                    $token = $wpdb->get_results($wpdb->prepare("SELECT optionValue FROM `{$wpPrefix}realbig_settings` WHERE optionName = %s",
     743                        "_wpRealbigPluginToken"));
    744744
    745745                    if (!empty($token)) {
     
    12941294
    12951295                // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    1296                 $syncDomain = $wpdb->get_var($wpdb->prepare('SELECT optionValue FROM %i WGPS WHERE optionName = %s',
    1297                     "{$wpPrefix}realbig_settings", "sync_domain"));
     1296                $syncDomain = $wpdb->get_var($wpdb->prepare("SELECT optionValue FROM `{$wpPrefix}realbig_settings` WGPS WHERE optionName = %s",
     1297                    "sync_domain"));
    12981298            }
    12991299
  • realbig-media/trunk/testFunctions.php

    r3062761 r3103368  
    33/** Kill rb connection emulation */
    44// 1 - ok connection; 2 - error connection;
    5 // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    6 $kill_rb_db = $wpdb->get_results($wpdb->prepare('SELECT id,optionValue FROM %i WHERE optionName = %s',
    7     "{$wpPrefix}realbig_settings", "kill_rb"), ARRAY_A);
     5// phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     6$kill_rb_db = $wpdb->get_results($wpdb->prepare("SELECT id,optionValue FROM `{$wpPrefix}realbig_settings` WHERE optionName = %s",
     7    "kill_rb"), ARRAY_A);
    88if (empty(apply_filters('wp_doing_cron', defined('DOING_CRON') && DOING_CRON)) && !empty(is_admin())
    99    && wp_get_raw_referer() && !wp_get_referer()) {
  • realbig-media/trunk/textEditing.php

    r3090592 r3103368  
    228228                    $checkExcluded = RFWP_checkPageType();
    229229                    if (!empty($checkExcluded)&&!empty($fromDb)&&!empty($fromDb['adBlocks'])&&count($fromDb['adBlocks']) > 0) {
    230                         // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    231                         $contentSelector = $wpdb->get_var($wpdb->prepare("SELECT optionValue FROM %i WHERE optionName = %s",
    232                             "{$wpPrefix}realbig_settings", "contentSelector"));
     230                        // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     231                        $contentSelector = $wpdb->get_var($wpdb->prepare("SELECT optionValue FROM `{$wpPrefix}realbig_settings` " .
     232                            "WHERE optionName = %s", "contentSelector"));
    233233                        if (empty($contentSelector)) {
    234234                            $contentSelector = null;
     
    290290            let deniedClasses = [\'.percentPointerClass\',\'.addedInserting\',\'#toc_container\'];
    291291            let deniedString = "";
    292             let contentSelector = \''.esc_attr(stripslashes($contentSelector)).'\';
     292            let contentSelector = \''.esc_attr(stripslashes((string)$contentSelector)).'\';
    293293            let contentsCheck = null;
    294294            if (contentSelector) {
     
    692692            $result['excIdClass'] = null;
    693693            $result['blockDuplicate'] = 'yes';
    694             // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    695             $realbig_settings_info = $wpdb->get_results($wpdb->prepare('SELECT optionName, optionValue FROM %i WGPS WHERE optionName IN (%s, %s)',
    696                 "{$GLOBALS['wpPrefix']}realbig_settings", "excludedIdAndClasses", "blockDuplicate"));
     694            // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     695            $realbig_settings_info = $wpdb->get_results($wpdb->prepare("SELECT optionName, optionValue FROM `{$GLOBALS['wpPrefix']}realbig_settings` WGPS " .
     696                "WHERE optionName IN (%s, %s)", "excludedIdAndClasses", "blockDuplicate"));
    697697            if (!empty($realbig_settings_info)) {
    698698                foreach ($realbig_settings_info AS $k => $item) {
     
    10591059                // @codingStandardsIgnoreStart
    10601060                if (isset($filter)&&in_array($filter, [0,1])) {
    1061                     $posts = $wpdb->get_results($wpdb->prepare('SELECT * FROM %i WHERE post_type = %s AND pinged = %s',
    1062                         "{$wpPrefix}posts", "rb_inserting", $filter));
     1061                    $posts = $wpdb->get_results($wpdb->prepare("SELECT * FROM `{$wpPrefix}posts` WHERE post_type = %s AND pinged = %s",
     1062                        "rb_inserting", $filter));
    10631063                } else {
    1064                     $posts = $wpdb->get_results($wpdb->prepare('SELECT * FROM %i WHERE post_type = %s',
    1065                         "{$wpPrefix}posts", "rb_inserting"));
     1064                    $posts = $wpdb->get_results($wpdb->prepare("SELECT * FROM `{$wpPrefix}posts` WHERE post_type = %s",
     1065                        "rb_inserting"));
    10661066                }
    10671067                // @codingStandardsIgnoreEnd
     
    13861386            // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    13871387            $realbig_settings_info = $wpdb->get_results($wpdb->prepare(
    1388                     'SELECT optionName, optionValue FROM %i WGPS WHERE optionName IN (%s, %s, %s, %s,%s,%s)',
    1389                     "{$wpPrefix}realbig_settings", "excludedIdAndClasses", "blockDuplicate", "obligatoryMargin",
     1388                    // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     1389                    "SELECT optionName, optionValue FROM `{$wpPrefix}realbig_settings` WGPS WHERE optionName IN (%s, %s, %s, %s,%s,%s)",
     1390                "excludedIdAndClasses", "blockDuplicate", "obligatoryMargin",
    13901391                "statusFor404", "showAdsNoElement", "tagsListForTextLength"));
    13911392            if (!empty($realbig_settings_info)) {
     
    14191420            }
    14201421            if ((!is_404())||$statusFor404!='disable') {
    1421                 // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    1422                 $adBlocks = $wpdb->get_results($wpdb->prepare('SELECT * FROM %i WGPS', "{$wpPrefix}realbig_plugin_settings"));
     1422                // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     1423                $adBlocks = $wpdb->get_results("SELECT * FROM `{$wpPrefix}realbig_plugin_settings` WGPS");
    14231424            }
    14241425
     
    16481649                $usedTaxonomies = [];
    16491650                // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    1650                 $array = $wpdb->get_results($wpdb->prepare('SELECT optionValue FROM %i WGPS WHERE optionName = %s',
    1651                     "{$wpPrefix}realbig_settings", "usedTaxonomies"));
     1651                $array = $wpdb->get_results($wpdb->prepare("SELECT optionValue FROM `{$wpPrefix}realbig_settings` WGPS WHERE optionName = %s",
     1652                    "usedTaxonomies"));
    16521653
    16531654                if (!empty($array[0]->optionValue)) {
     
    17161717                global $wpdb;
    17171718
    1718                 // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    1719                 $jsToHead = $wpdb->get_var($wpdb->prepare('SELECT optionValue FROM %i WHERE optionName = %s',
    1720                     "{$GLOBALS['wpPrefix']}realbig_settings", "jsToHead"));
     1719                // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     1720                $jsToHead = $wpdb->get_var($wpdb->prepare("SELECT optionValue FROM `{$GLOBALS['wpPrefix']}realbig_settings` " .
     1721                    "WHERE optionName = %s", "jsToHead"));
    17211722                if ($jsToHead!==null) {
    17221723                    $jsToHead = intval($jsToHead);
     
    17451746                    $wpPrefix = RFWP_getTablePrefix();
    17461747
    1747                     // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    1748                     $result = $wpdb->prepare($wpdb->get_var('SELECT optionValue FROM %i WHERE optionName = %s'),
    1749                         "{$wpPrefix}realbig_settings", $settingName);
     1748                    // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     1749                    $result = $wpdb->prepare($wpdb->get_var("SELECT optionValue FROM `{$wpPrefix}realbig_settings` " .
     1750                        "WHERE optionName = %s"), $settingName);
    17501751                    if (!empty($addToGlobal)) {
    17511752                        $GLOBALS['rb_variables'][$settingName] = $result;
  • realbig-media/trunk/uninstall.php

    r3062761 r3103368  
    2424        $GLOBALS['wpPrefix'] = $wpPrefix;
    2525
    26         // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    27         $wpdb->query($wpdb->prepare('DELETE FROM %i WHERE post_type IN (%s, %s, %s, %s, %s) AND post_author = 0',
    28             "{$wpPrefix}posts", "rb_block_mobile", "rb_block_desktop", "rb_block_mobile_new", "rb_block_desktop_new", "rb_inserting"));
     26        // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     27        $wpdb->query($wpdb->prepare("DELETE FROM `{$wpPrefix}posts` WHERE post_type IN (%s, %s, %s, %s, %s) AND post_author = 0",
     28            "rb_block_mobile", "rb_block_desktop", "rb_block_mobile_new", "rb_block_desktop_new", "rb_inserting"));
    2929
    3030        delete_option( 'realbig_status_gatherer' );
     
    3232
    3333        // @codingStandardsIgnoreStart
    34         $wpdb->query($wpdb->prepare("DROP TABLE IF EXISTS %i", "{$wpPrefix}realbig_plugin_settings"));
    35         $wpdb->query($wpdb->prepare("DROP TABLE IF EXISTS %i", "{$wpPrefix}realbig_settings"));
     34        $wpdb->query("DROP TABLE IF EXISTS `{$wpPrefix}realbig_plugin_settings`");
     35        $wpdb->query("DROP TABLE IF EXISTS `{$wpPrefix}realbig_settings`");
    3636        // @codingStandardsIgnoreEnd
    3737    }
  • realbig-media/trunk/update.php

    r3090592 r3103368  
    157157                    $localReturnValue = false;
    158158
    159                     // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    160                     $enumTypeQuery = $wpdb->get_results($wpdb->prepare('SHOW FIELDS FROM %i WHERE Field = %s',
    161                         "{$wpPrefix}realbig_plugin_settings", "element"));
     159                    // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     160                    $enumTypeQuery = $wpdb->get_results($wpdb->prepare("SHOW FIELDS FROM `{$wpPrefix}realbig_plugin_settings` WHERE Field = %s",
     161                        "element"));
    162162                    if (!empty($enumTypeQuery)) {
    163163                        $enumTypeQuery = get_object_vars($enumTypeQuery[0]);
    164164                        if ($enumTypeQuery['Type'] != $requiredElementColumnValues) {
    165                             // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange
    166                             $alterResult = $wpdb->query($wpdb->prepare("ALTER TABLE %i MODIFY `element` " .
     165                            // phpcs:ignore WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.SchemaChange, WordPress.DB.PreparedSQL.InterpolatedNotPrepared
     166                            $alterResult = $wpdb->query($wpdb->prepare("ALTER TABLE `{$wpPrefix}realbig_plugin_settings` MODIFY `element` " .
    167167                                "ENUM(%s, %s , %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) NULL DEFAULT NULL",
    168                                 "{$wpPrefix}realbig_plugin_settings", "p", "li", "ul", "ol", "blockquote", "img", "video",
     168                                "p", "li", "ul", "ol", "blockquote", "img", "video",
    169169                                "iframe", "h1", "h2", "h3", "h4", "h5", "h6", 'h2-4', "article"));
    170170                            if (!empty($alterResult)&&is_int($alterResult)&&$alterResult == 1) {
     
    199199            try {
    200200                // @codingStandardsIgnoreStart
    201                 $rez = $wpdb->query($wpdb->prepare('SHOW FIELDS FROM %i', "{$wpPrefix}realbig_settings"));
     201                $rez = $wpdb->query("SHOW FIELDS FROM `{$wpPrefix}realbig_settings`");
    202202
    203203                if ($rez != 4) {
    204                     $wpdb->query($wpdb->prepare('ALTER TABLE %i ADD `timeUpdate` TIMESTAMP NULL DEFAULT NULL ON ' .
    205                         'UPDATE CURRENT_TIMESTAMP AFTER optionValue', "{$wpPrefix}realbig_settings"));
     204                    $wpdb->query("ALTER TABLE `{$wpPrefix}realbig_settings` ADD `timeUpdate` TIMESTAMP NULL DEFAULT NULL ON " .
     205                        "UPDATE CURRENT_TIMESTAMP AFTER optionValue");
    206206                }
    207207                // @codingStandardsIgnoreEnd
     
    255255                        // @codingStandardsIgnoreStart
    256256                        if (in_array($item, ['text','directElement','onCategories','offCategories','onTags','offTags','elementCss'])) {
    257                             $wpdb->query($wpdb->prepare('ALTER TABLE %i ADD COLUMN %i TEXT NULL DEFAULT NULL',
    258                                 "{$wpPrefix}realbig_plugin_settings", $item));
     257                            $wpdb->query("ALTER TABLE `{$wpPrefix}realbig_plugin_settings` ADD COLUMN `{$item}` TEXT NULL DEFAULT NULL");
    259258                        } else {
    260                             $wpdb->query($wpdb->prepare('ALTER TABLE %i ADD COLUMN %i INT(11) NULL DEFAULT NULL',
    261                                 "{$wpPrefix}realbig_plugin_settings", $item));
     259                            $wpdb->query("ALTER TABLE `{$wpPrefix}realbig_plugin_settings` ADD COLUMN `{$item}` INT(11) NULL DEFAULT NULL");
    262260                        }
    263261                        // @codingStandardsIgnoreEnd
Note: See TracChangeset for help on using the changeset viewer.