Security
Headlines
HeadlinesLatestCVEs

Headline

CVE-2023-2351: Changeset 2917413 for wpdirectorykit – WordPress Plugin Repository

The WP Directory Kit plugin for WordPress is vulnerable to unauthorized modification of data and loss of data due to a missing capability check on the ‘ajax_admin’ function in versions up to, and including, 1.2.3. This makes it possible for authenticated attackers with subscriber-level permissions or above to delete or change plugin settings, import demo data, delete Directory Kit related posts and terms, and install arbitrary plugins. A partial patch was introduced in version 1.2.0.

CVE
#sql#google#js#git#wordpress#php#auth
  • wpdirectorykit/trunk/README.txt

    r2912424

    r2917413

153

153

154

154

\== Changelog ==

 

155

 

156

\= 1.2.4 =

 

157

\* Small security improvement

 

158

\* Custom filters for listings

155

159

156

160

\= 1.2.3 =
  • wpdirectorykit/trunk/admin/class-wpdirectorykit-admin.php

    r2904689

    r2917413

88

88

        wp\_register\_style('jquery-confirm',   WPDIRECTORYKIT\_URL. 'public/js/jquery-confirm/css/jquery-confirm.css', array(), '3.3.4', 'all');

89

89

 

90

        wp\_register\_style( 'wdk-treefield-dropdown', WPDIRECTORYKIT\_URL. 'public/js/wdk\_treefield\_dropdown/wdk\_treefield\_dropdown.css', array(), '1.0', 'all' );

 

91

90

92

        wp\_enqueue\_style( $this->plugin\_name, plugin\_dir\_url( \_\_FILE\_\_ ) . 'css/wpdirectorykit-admin.css', array(), $this->version, 'all' );

91

93

        wp\_enqueue\_style( $this->plugin\_name.'-responsive', plugin\_dir\_url( \_\_FILE\_\_ ) . 'css/wpdirectorykit-admin-responsive.css', array(), $this->version, 'all' );

…

…

 

127

129

        wp\_register\_script('jquery-confirm',  WPDIRECTORYKIT\_URL. 'public/js/jquery-confirm/js/jquery-confirm.js', array( 'jquery' ), '3.3.4', false );

128

130

        wp\_register\_script( 'wdk-dependfields-submitform',  WPDIRECTORYKIT\_URL. 'public/js/wdk-dependfields-submitform.js', array( 'jquery' ), false, false );

 

131

 

132

        $params = array(

 

133

            'ajax\_url' => admin\_url( 'admin-ajax.php' )

 

134

        );

 

135

        wp\_register\_script('wdk-treefield-dropdown', WPDIRECTORYKIT\_URL. 'public/js/wdk\_treefield\_dropdown/wdk\_treefield\_dropdown.js', array( 'jquery' ), '1.0', false );

 

136

        wp\_localize\_script( 'wdk-treefield-dropdown', 'script\_parameters', $params);

129

137

130

138

        wp\_register\_script( 'wdk-dependfields-edit', plugin\_dir\_url( \_\_FILE\_\_ ) . 'js/wdk-dependfields-edit.js', array( 'jquery' ), $this->version, false );
  • wpdirectorykit/trunk/admin/css/wpdirectorykit-admin.css

    r2898501

    r2917413

334

334

div.wdk-field-edit p.wdk-hint {

335

335

  font-style: italic;

 

336

}

 

337

 

338

div.wdk-field-edit.inline {

 

339

  align-items: center;

 

340

}

 

341

 

342

div.wdk-field-edit.inline label {

 

343

  font-weight: 600;

 

344

  width: auto;

 

345

  flex: 0 0;

 

346

  max-width: initial;

 

347

}

 

348

 

349

div.wdk-field-edit.inline .wdk-field-container {

 

350

  margin: -5px -5px;

 

351

}

 

352

 

353

div.wdk-field-edit.inline .regular-text {

 

354

  margin: 5px 5px;

 

355

  flex: 1 2;

336

356

}

337

357

…

…

 

1418

1438

  display: inline-block;

1419

1439

}

 

1440

 

1441

.wdk-wrap .wdk-tabs-navs {

 

1442

  font-size: 0;

 

1443

  display: inline-block;

 

1444

  background: #fff;

 

1445

  border: 1px solid #c3c4c7;

 

1446

  margin-bottom: 15px;

 

1447

  margin-top: 10px;

 

1448

}

 

1449

 

1450

.wdk-wrap .wdk-tabs-navs label {

 

1451

  display: inline-block;

 

1452

  font-size: 18px;

 

1453

  border: 1px solid #eee;

 

1454

  cursor: pointer;

 

1455

  transition: all .15s;

 

1456

  padding: 10px 15px;

 

1457

}

 

1458

 

1459

.wdk-wrap .wdk-tabs-navs label.active, .wdk-wrap .wdk-tabs-navs label:hover {

 

1460

  background: #eee;

 

1461

}

 

1462

 

1463

.wdk-wrap .wdk-tabs-navs label:not(:last-child) {

 

1464

  margin-right: -1px;

 

1465

}

 

1466

 

1467

.wdk-wrap .wdk-tabs-panel > .wdk-tab {

 

1468

  display: none;

 

1469

}

 

1470

 

1471

.wdk-wrap .wdk-tabs-panel .wdk-tab-input {

 

1472

  display: none;

 

1473

}

 

1474

 

1475

.wdk-wrap .wdk-tabs-panel input:checked + div.wdk-tab {

 

1476

  display: block;

 

1477

}

 

1478

 

1479

.wdk-wrap .wdk\_multi\_treefield\_dropdown {

 

1480

  margin-bottom: 15px;

 

1481

}

 

1482

 

1483

.wdk-wrap .wdk\_multi\_treefield\_dropdown\_container .wdk\_multi\_treefield\_dropdown:last-child {

 

1484

  margin-bottom: 0;

 

1485

}

 

1486

 

1487

.wdk-wrap .wdk\_treefield\_dropdown .wdk-field-group {

 

1488

  display: inline-block;

 

1489

  padding-right: 30px;

 

1490

}

 

1491

 

1492

.custom\_parameter {

 

1493

  float: left;

 

1494

  margin-right: 6px;

 

1495

  box-shadow: 0 0 0 transparent;

 

1496

  border-radius: 4px;

 

1497

  background-color: #fff;

 

1498

  color: #2c3338;

 

1499

  display: grid;

 

1500

  grid-row: revert;

 

1501

  grid-auto-flow: column;

 

1502

  grid-gap: 1px 1px;

 

1503

  background-color: #8c8f94;

 

1504

  border: 1px solid #8c8f94;

 

1505

  border-radius: 3px;

 

1506

  overflow: hidden;

 

1507

}

 

1508

 

1509

.custom\_parameter \* {

 

1510

  margin: 0 !important;

 

1511

  min-height: auto;

 

1512

  height: 100%;

 

1513

  border: 0 !important;

 

1514

  box-shadow: none !important;

 

1515

  border-radius: 0 !important;

 

1516

  min-height: 28px !important;

 

1517

  max-width: 100px !important;

 

1518

}

 

1519

 

1520

.btn\_parameter {

 

1521

  float: left;

 

1522

  margin-right: 6px;

 

1523

  background: #2271b1;

 

1524

  color: #fff;

 

1525

  cursor: pointer;

 

1526

  border: 0;

 

1527

  height: 30px;

 

1528

  width: 32px;

 

1529

  border-radius: 3px;

 

1530

  text-decoration: none;

 

1531

  display: flex;

 

1532

  align-items: center;

 

1533

  justify-content: center;

 

1534

}

 

1535

 

1536

.btn\_parameter:hover {

 

1537

  background: #135e96;

 

1538

  color: #fff;

 

1539

}

 

1540

 

1541

.btn\_parameter span {

 

1542

  height: auto;

 

1543

}

 

1544

 

1545

.filters-form select, .filters-form input, .filters-form button, .filters-form .custom\_parameter {

 

1546

  margin-bottom: 5px;

 

1547

}
  • wpdirectorykit/trunk/admin/css/wpdirectorykit-admin.scss

    r2898501

    r2917413

362

362

{

363

363

    font-style: italic;

 

364

}

 

365

 

366

div.wdk-field-edit.inline {

 

367

    align-items: center;

 

368

    label {

 

369

        font-weight: 600;

 

370

        width: auto;

 

371

        flex: 0 0;

 

372

        max-width: initial;

 

373

    }

 

374

 

375

    .wdk-field-container {

 

376

        margin: -5px -5px;

 

377

    }

 

378

 

379

    .regular-text {

 

380

        margin: 5px 5px;

 

381

        flex: 1 2;

 

382

    }

364

383

}

365

384

…

…

 

1336

1355

    display: inline-block;

1337

1356

}

 

1357

 

1358

 

1359

.wdk-wrap {

 

1360

 

1361

    .wdk-tabs-navs {

 

1362

        font-size: 0;

 

1363

        display: inline-block;

 

1364

        background: #fff;

 

1365

        border: 1px solid #c3c4c7;

 

1366

        margin-bottom: 15px;

 

1367

        margin-top: 10px;

 

1368

        label {

 

1369

            display: inline-block;

 

1370

            font-size: 18px;

 

1371

            border: 1px solid #eee;

 

1372

            cursor: pointer;

 

1373

            transition: all .15s;

 

1374

            padding: 10px 15px;

 

1375

       

 

1376

 

1377

            &.active,

 

1378

            &:hover {

 

1379

                background: #eee;

 

1380

            }

 

1381

           

 

1382

            &:not(:last-child) {

 

1383

                margin-right: -1px;

 

1384

            }

 

1385

        }

 

1386

    }

 

1387

 

1388

    .wdk-tabs-panel {

 

1389

        >.wdk-tab {

 

1390

            display: none;

 

1391

        }

 

1392

 

1393

        .wdk-tab-input {

 

1394

            display: none;

 

1395

        }

 

1396

 

1397

        input:checked + div.wdk-tab {

 

1398

            display: block

 

1399

        }

 

1400

    }

 

1401

   

 

1402

}

 

1403

 

1404

.wdk-wrap {

 

1405

 

1406

    .wdk\_multi\_treefield\_dropdown  {

 

1407

        margin-bottom: 15px;

 

1408

    }

 

1409

 

1410

    .wdk\_multi\_treefield\_dropdown\_container .wdk\_multi\_treefield\_dropdown:last-child {

 

1411

        margin-bottom: 0;

 

1412

    }

 

1413

 

1414

    .wdk\_treefield\_dropdown .wdk-field-group {

 

1415

        display: inline-block;

 

1416

        padding-right: 30px;

 

1417

    }

 

1418

}

 

1419

 

1420

 

1421

 

1422

.custom\_parameter {

 

1423

    float: left;

 

1424

    margin-right: 6px;

 

1425

 

1426

    box-shadow: 0 0 0 transparent;

 

1427

    border-radius: 4px;

 

1428

    background-color: #fff;

 

1429

    color: #2c3338;

 

1430

    display: grid;

 

1431

    grid-row: revert;

 

1432

    grid-auto-flow: column;

 

1433

    grid-gap: 1px 1px;

 

1434

    background-color: #8c8f94;

 

1435

    border: 1px solid #8c8f94;

 

1436

    border-radius: 3px;

 

1437

    overflow: hidden;

 

1438

 

1439

    \* {

 

1440

        margin: 0 !important;

 

1441

        min-height: auto;

 

1442

        height: 100%;

 

1443

        border: 0 !important;

 

1444

        box-shadow: none !important;

 

1445

        border-radius: 0 !important;

 

1446

        min-height: 28px !important;

 

1447

        max-width: 100px !important;

 

1448

    }

 

1449

}

 

1450

 

1451

.btn\_parameter {

 

1452

    float: left;

 

1453

    margin-right: 6px;

 

1454

    background: #2271b1;

 

1455

    color: #fff;

 

1456

    cursor: pointer;

 

1457

    border: 0;

 

1458

    height: 30px;

 

1459

    width: 32px;

 

1460

    border-radius: 3px;

 

1461

    text-decoration: none;

 

1462

    display: flex;

 

1463

    align-items: center;

 

1464

    justify-content: center;

 

1465

 

1466

    &:hover {

 

1467

        background: #135e96;

 

1468

        color: #fff;

 

1469

    }

 

1470

    span {

 

1471

        height: auto;

 

1472

    }

 

1473

}

 

1474

 

1475

.filters-form {

 

1476

    select,input,button,.custom\_parameter {

 

1477

        margin-bottom: 5px;

 

1478

    }

 

1479

}
  • wpdirectorykit/trunk/admin/js/wpdirectorykit-admin.js

    r2823173

    r2917413

232

232

            });

233

233

        }

 

234

 

235

        if(jQuery('.wdk-tabs-navs').length) {

 

236

            jQuery('.wdk-tabs-navs').find('label').on('click', function(){

 

237

                jQuery(this).parent().find('label').removeClass('active');

 

238

                jQuery(this).addClass('active');

 

239

            });

 

240

        }

234

241

    })

235

242

})( jQuery );
  • wpdirectorykit/trunk/application/controllers/Wdk.php

    r2904689

    r2917413

51

51

        foreach($dbusers as $dbuser) {

52

52

            $this->data\['users'\]\[wmvc\_show\_data('ID', $dbuser)\] = '#'.wmvc\_show\_data('ID', $dbuser).', '.wmvc\_show\_data('display\_name', $dbuser);

 

53

        }

 

54

 

55

        $this->data\['fields\_list'\] = $this->field\_m->get();

 

56

 

57

        $fields\_data = $this->field\_m->get();

 

58

        $this->data\['fields\_list'\] = array();

 

59

 

60

        foreach($fields\_data as $field)

 

61

        {

 

62

            if(wmvc\_show\_data('field\_type', $field) == 'SECTION') {

 

63

            } else {

 

64

                $this->data\['fields\_list'\]\['field\_'.wmvc\_show\_data('idfield', $field)\] = '#'.wmvc\_show\_data('idfield', $field).' '.wmvc\_show\_data('field\_label', $field).'\['.wmvc\_show\_data('field\_type', $field).'\]';

 

65

            }

53

66

        }

54

67

…

…

 

107

120

        );

108

121

 

122

        $custom\_parameters = array();

 

123

        foreach ($this->input->get() as $key => $value) {

 

124

            if(stripos($key, 'c\_field\_') !== FALSE && stripos($key, '\_field',8) !== FALSE) {

 

125

                $field\_id = substr($key, 8, (stripos($key, '\_',8) - 8) );

 

126

                if(!empty($\_GET\['c\_field\_'.$field\_id.'\_field'\])

 

127

                    && !empty($\_GET\['c\_field\_'.$field\_id.'\_like'\])

 

128

                    && !empty($\_GET\['c\_field\_'.$field\_id.'\_value'\])) {

 

129

                    switch ($\_GET\['c\_field\_'.$field\_id.'\_like'\]) {

 

130

                        case '>': $custom\_parameters\[sanitize\_key($\_GET\['c\_field\_'.$field\_id.'\_field'\]).'\_min'\] = sanitize\_text\_field($\_GET\['c\_field\_'.$field\_id.'\_value'\]);

 

131

                                  break;

 

132

                        case '<': $custom\_parameters\[sanitize\_key($\_GET\['c\_field\_'.$field\_id.'\_field'\]).'\_max'\] = sanitize\_text\_field($\_GET\['c\_field\_'.$field\_id.'\_value'\]);

 

133

                                  break;

 

134

                        case '==': $custom\_parameters\[sanitize\_key($\_GET\['c\_field\_'.$field\_id.'\_field'\])\] = sanitize\_text\_field($\_GET\['c\_field\_'.$field\_id.'\_value'\]);

 

135

                                  break;

 

136

                    }

 

137

                }

 

138

            }

 

139

        };

 

140

109

141

        $this->data\['db\_data'\] = $this->listing\_m->prepare\_data($this->input->get(), $rules);

110

 

111

142

        /\* \[/Search Form\] \*/

112

143

…

…

 

116

147

        }

117

148

118

 

        wdk\_prepare\_search\_query\_GET($columns, $controller.'\_m', $external\_columns);

 

149

        wdk\_prepare\_search\_query\_GET($columns, $controller.'\_m', $external\_columns, $custom\_parameters);

119

150

        $total\_items = $this->listing\_m->total($where);

120

151

…

…

 

135

166

            $this->data\['pagination\_output'\] = wmvc\_wp\_paginate($total\_items, $per\_page);

136

167

137

 

        wdk\_prepare\_search\_query\_GET($columns, $controller.'\_m', $external\_columns);

 

168

        wdk\_prepare\_search\_query\_GET($columns, $controller.'\_m', $external\_columns, $custom\_parameters);

138

169

        $this->data\['listings'\] = $this->listing\_m->get\_pagination($per\_page, $offset, $where);

139

170
  • wpdirectorykit/trunk/application/controllers/Wdk_demo_import.php

    r2907164

    r2917413

164

164

                'external\_url'       => '', // If set, overrides default API URL and points to an external URL.

165

165

                'is\_callable'        => '', // If set, this callable will be be checked for availability to determine if a plugin is active.

 

166

                'has\_notices'  => false, 

166

167

            );

167

168

        }
  • wpdirectorykit/trunk/application/controllers/Wdk_frontendajax.php

    r2898501

    r2917413

668

668

669

669

        switch ($parameters\['table'\]) {

 

670

            case 'category\_id':

670

671

            case 'search\_category':

671

672

                $model\_name = 'category\_m';

672

673

                break;

 

674

            case 'location\_id':

673

675

            case 'search\_location':

674

676

                $model\_name = 'location\_m';
  • wpdirectorykit/trunk/application/controllers/Wdk_listing.php

    r2905795

    r2917413

167

167

                    'field' => 'lat',

168

168

                    'label' => \_\_('lat', 'wpdirectorykit'),

169

 

                    'rules' => ''

 

169

                    'rules' => (wdk\_get\_option('wdk\_is\_address\_enabled')) ? 'wdk\_gps\_single':''

170

170

                ),

171

171

                array(

172

172

                    'field' => 'lng',

173

173

                    'label' => \_\_('lng', 'wpdirectorykit'),

174

 

                    'rules' => ''

 

174

                    'rules' => (wdk\_get\_option('wdk\_is\_address\_enabled')) ? 'wdk\_gps\_single':''

175

175

                ),

176

176

                array(

…

…

 

309

309

        }

310

310

 

311

        $this->form->add\_error\_message('wdk\_gps\_single', \_\_('Gps field is not valid, should be like xx.xxxxxx (between -180 and 180)', 'wpdirectorykit'));

311

312

        if($this->form->run($rules))

312

313

        {
  • wpdirectorykit/trunk/application/controllers/Wdk_settings.php

    r2905795

    r2917413

17

17

        $this->data\['form'\] = &$this->form;

18

18

        $this->data\['fields'\] = $this->settings\_m->fields\_list;

 

19

        $this->data\['fields\_list\_tabs'\] = $this->settings\_m->fields\_list\_tabs;

19

20

20

21

        $this->form->add\_error\_message('wdk\_slug\_format', \_\_('Custom Listing Preview Page Slug allowed only a-z 0-9 - \_ ', 'wpdirectorykit'));
  • wpdirectorykit/trunk/application/helpers/Basic.php

    r2905046

    r2917413

646

646

                            if(wdk\_is\_date($val))

647

647

                            {

648

 

                                $gen\_search = wdk\_normalize\_date\_db($val, 'Y-m-d H:i:s', 'Y-m-d');

649

 

                                $gen\_q.=$col\_name." \>= ".$gen\_search." AND ";

 

648

                                $gen\_search = wdk\_normalize\_date\_db($val, 'Y-m-d H:i:s', 'Y-m-d H:i:s');

 

649

                                $gen\_q.=$col\_name." <= '".$gen\_search."' AND ";

650

650

                            }

651

651

                        } else {

…

…

 

662

662

                            if(wdk\_is\_date($val))

663

663

                            {

664

 

                                $gen\_search = wdk\_normalize\_date\_db($val, 'Y-m-d H:i:s', 'Y-m-d');

665

 

                                $gen\_q.=$col\_name." >= ".$gen\_search." AND ";

 

664

                                $gen\_search = wdk\_normalize\_date\_db($val, 'Y-m-d H:i:s', 'Y-m-d H:i:s');

 

665

                                $gen\_q.=$col\_name." >= '".$gen\_search."' AND ";

666

666

                            }

667

667

                        } else {

…

…

 

776

776

                    elseif($key == 'location\_id')

777

777

                    {

 

778

                        if(empty($val)) continue;

778

779

779

780

                        if(is\_string($val) && strpos($val, ',') !== FALSE){

…

…

 

792

793

                            $sql\_search = '';

793

794

                            foreach ($val as $v) {

794

 

                                if(empty($v)) continue;

795

 

               

 

795

                                if(empty($v) || !is\_intval($v)) continue;

 

796

                               

796

797

                                if(!empty($sql\_search))

797

798

                                    $sql\_search .= " OR ";

…

…

 

819

820

                    {

820

821

                       

 

822

                        if(empty($val)) continue;

 

823

821

824

                        if(is\_string($val) && strpos($val, ',') !== FALSE){

822

825

                            $val =explode(',', $val);

…

…

 

833

836

                            $sql\_search = '';

834

837

                            foreach ($val as $v) {

835

 

                                if(empty($v)) continue;

 

838

                                if(empty($v) || !is\_intval($v)) continue;

836

839

               

837

840

                                if(!empty($sql\_search))

…

…

 

3668

3671

    }

3669

3672

}

 

3673

 

3674

 

3675

if ( ! function\_exists('is\_wdk\_gps\_single'))

 

3676

{

 

3677

    function is\_wdk\_gps\_single($param)

 

3678

    {

 

3679

 

3680

        if (is\_numeric($param) && $param > -180 && $param < 180) {

 

3681

            return true;

 

3682

        }

 

3683

 

3684

        return false;

 

3685

    }

 

3686

}

 

3687

 

3688

if ( ! function\_exists('wdk\_get\_tgmpa\_link'))

 

3689

{

 

3690

    function wdk\_get\_tgmpa\_link()

 

3691

    {

 

3692

        if(file\_exists(get\_template\_directory().'/includes/tgm\_pa/class-tgm-plugin-activation.php') || file\_exists(get\_template\_directory().'/tgm\_pa/class-tgm-plugin-activation.php')) {

 

3693

            return get\_admin\_url() . "themes.php?page=tgmpa-install-plugins";

 

3694

        } else {

 

3695

            return get\_admin\_url() . "plugins.php?page=tgmpa-install-plugins";

 

3696

        }

 

3697

 

3698

        return false;

 

3699

    }

 

3700

}

 

3701

3670

3702

?>
  • wpdirectorykit/trunk/application/models/Settings_m.php

    r2905795

    r2917413

14

14

    public $\_timestamps = TRUE;

15

15

    protected $\_primary\_filter = 'intval';

16

 

    public $fields\_list = NULL;

 

16

    public $fields\_list = array();

 

17

    public $fields\_list\_tabs = array();

17

18

   

18

19

    public function \_\_construct(){

…

…

 

49

50

        }

50

51

51

 

        $this->fields\_list = array(

52

 

            array('field' => 'wdk\_is\_category\_enabled', 'field\_label' => \_\_('Enable Categories', 'wpdirectorykit'), 'hint' => \_\_('If you don\\'t need categories features you can disable that here', 'wpdirectorykit'), 'field\_type' => 'CHECKBOX', 'rules' => ''),

53

 

            array('field' => 'wdk\_is\_location\_enabled', 'field\_label' => \_\_('Enable Locations', 'wpdirectorykit'), 'hint' => \_\_('If you don\\'t need location features you can disable that here', 'wpdirectorykit'), 'field\_type' => 'CHECKBOX', 'rules' => '', 'class' => ''),

54

 

           

 

52

        /\* General \*/

 

53

 

54

        $this->fields\_list\_tabs\['general'\] = array(

55

55

            array('field' => 'wdk\_default\_lat', 'field\_label' => \_\_('Default GPS Position', 'wpdirectorykit'), 'hint' => '', 'field\_type' => 'MAP', 'rules' => ''),

56

56

            array('field' => 'wdk\_default\_lng', 'field\_label' => \_\_('Default GPS Longitude', 'wpdirectorykit'), 'hint' => '', 'field\_type' => 'INPUTBOX', 'rules' => '', 'class' => 'hidden'),

57

57

            array('field' => 'wdk\_fixed\_map\_results\_position', 'field\_label' => \_\_('Fix map center on default location', 'wpdirectorykit'), 'hint' => '', 'field\_type' => 'CHECKBOX', 'rules' => '', 'class' => ''),

58

58

           

 

59

            array('field' => 'wdk\_is\_category\_enabled', 'field\_label' => \_\_('Enable Categories', 'wpdirectorykit'), 'hint' => \_\_('If you don\\'t need categories features you can disable that here', 'wpdirectorykit'), 'field\_type' => 'CHECKBOX', 'rules' => ''),

 

60

            array('field' => 'wdk\_is\_location\_enabled', 'field\_label' => \_\_('Enable Locations', 'wpdirectorykit'), 'hint' => \_\_('If you don\\'t need location features you can disable that here', 'wpdirectorykit'), 'field\_type' => 'CHECKBOX', 'rules' => '', 'class' => ''),

 

61

           

 

62

           

59

63

            array('field' => 'wdk\_is\_address\_enabled', 'field\_label' => \_\_('Enable Address', 'wpdirectorykit'), 'hint' => \_\_('Select regular page which ill be used for listing preview page on frontend, you can create new one also for this purpose', 'wpdirectorykit'), 'field\_type' => 'CHECKBOX', 'rules' => ''),

 

64

            array('field' => 'wdk\_slug\_listing\_preview\_page', 'field\_label' => \_\_('Custom Listing Preview Page Slug', 'wpdirectorykit'), 'hint' => \_\_('Slug used for listing preview page, if empty, default will be used', 'wpdirectorykit'), 'field\_type' => 'INPUTBOX', 'rules' => 'wdk\_slug\_format'),

60

65

            array('field' => 'wdk\_listing\_page', 'field\_label' => \_\_('Listing Page', 'wpdirectorykit'), 'hint' => \_\_('Select regular page which ill be used for listing preview page on frontend, you can create new one also for this purpose', 'wpdirectorykit'), 'field\_type' => 'DROPDOWN', 'rules' => '', 'values' => $pages),

61

66

            array('field' => 'wdk\_results\_page', 'field\_label' => \_\_('Results Page', 'wpdirectorykit'), 'hint' => \_\_('Select regular page which ill be used for results page on frontend, you can create new one also for this purpose', 'wpdirectorykit'), 'field\_type' => 'DROPDOWN', 'rules' => '', 'values' => $pages),

62

67

            array('field' => 'wdk\_is\_results\_page\_require', 'field\_label' => \_\_('Always use results page', 'wpdirectorykit'), 'hint' => \_\_('Always even if on current page you have results where can be showed', 'wpdirectorykit'), 'field\_type' => 'CHECKBOX', 'rules' => ''),

63

 

            array('field' => 'wdk\_slug\_listing\_preview\_page', 'field\_label' => \_\_('Custom Listing Preview Page Slug', 'wpdirectorykit'), 'hint' => \_\_('Slug used for listing preview page, if empty, default will be used', 'wpdirectorykit'), 'field\_type' => 'INPUTBOX', 'rules' => 'wdk\_slug\_format'),

 

68

           

 

69

            array(

 

70

                'field' => 'wdk\_card\_video\_enable',

 

71

                'field\_label' => \_\_('Card Video From gallery in result card enable', 'wpdirectorykit'),

 

72

                'hint' => \_\_('If you upload video on first place in listing, will become visible in result card', 'wpdirectorykit'),

 

73

                'field\_type' => 'CHECKBOX',

 

74

                'rules' => '',

 

75

            ),

 

76

            array(

 

77

                'field' => 'wdk\_listing\_category\_required',

 

78

                'field\_label' => \_\_('Category is required field', 'wpdirectorykit'),

 

79

                'hint' => \_\_('if this is enabled, listing required category field', 'wpdirectorykit'),

 

80

                'field\_type' => 'CHECKBOX',

 

81

                'rules' => '',

 

82

            ),

 

83

            array(

 

84

                'field' => 'wdk\_listing\_location\_required',

 

85

                'field\_label' => \_\_('Location is required field', 'wpdirectorykit'),

 

86

                'hint' => \_\_('if this is enabled, listing required location field', 'wpdirectorykit'),

 

87

                'field\_type' => 'CHECKBOX',

 

88

                'rules' => '',

 

89

            ),

 

90

 

91

            array(

 

92

                'field' => 'wdk\_sub\_listings\_enable',

 

93

                'field\_label' => \_\_('Related Listings', 'wpdirectorykit'),

 

94

                'field\_type' => 'CHECKBOX',

 

95

                'rules' => '',

 

96

            ),

 

97

            array(

 

98

                'field' => 'wdk\_listings\_images\_required\_enable',

 

99

                'field\_label' => \_\_('Listing Images required', 'wpdirectorykit'),

 

100

                'field\_type' => 'CHECKBOX',

 

101

                'rules' => '',

 

102

            ),

 

103

            array(

 

104

                'field' => 'wdk\_default\_currency\_symbol',

 

105

                'field\_label' => \_\_('Default Currency Symbol', 'wpdirectorykit'),

 

106

                'hint' => \_\_('Put default currency symbol like $', 'wpdirectorykit'),

 

107

                'field\_type' => 'INPUTBOX',

 

108

                'rules' => '',

 

109

            ),

 

110

        );

 

111

 

112

 

113

        /\* Templates \*/

 

114

        $this->fields\_list\_tabs\['templates'\] = array(

 

115

            array(

 

116

                'field' => 'wdk\_placeholder',

 

117

                'field\_label' => \_\_('Cooming soon listing image', 'wpdirectorykit'),

 

118

                'hint' => '',

 

119

                'field\_type' => 'UPLOAD',

 

120

                'rules' => '',

 

121

            ),

 

122

            array(

 

123

                'field' => 'wdk\_card\_slider\_enable',

 

124

                'field\_label' => \_\_('Show slider in result card', 'wpdirectorykit'),

 

125

                'hint' => '',

 

126

                'field\_type' => 'CHECKBOX',

 

127

                'rules' => '',

 

128

            ),

 

129

            array(

 

130

                'field' => 'wdk\_card\_video\_field',

 

131

                'field\_label' => \_\_('Card video field', 'wpdirectorykit'),

 

132

                'hint' => '',

 

133

                'field\_type' => 'DROPDOWN',

 

134

                'values' => $fields\_list\_inputs,

 

135

                'rules' => '',

 

136

                'hint' => '',

 

137

            ),

 

138

            array(

 

139

                'field' => 'wdk\_mobile\_bottom\_navbar\_enable',

 

140

                'field\_label' => \_\_('Mobile bottom navbar', 'wpdirectorykit'),

 

141

                'field\_type' => 'CHECKBOX',

 

142

                'rules' => '',

 

143

            ),

 

144

        );

 

145

 

146

        /\* Fields \*/

 

147

        $this->fields\_list\_tabs\['fields'\] = array(

64

148

            array('field' => 'wdk\_seo\_keywords', 'field\_label' => \_\_('SEO Listing Page Keywords', 'wpdirectorykit'), 'hint' => \_\_('Set field for meta tag keywords', 'wpdirectorykit'), 'field\_type' => 'DROPDOWN', 'values' => $fields\_list, 'rules' => ''),

65

149

            array('field' => 'wdk\_seo\_description', 'field\_label' => \_\_('SEO Listing Page Description', 'wpdirectorykit'), 'hint' => \_\_('Set field for meta tag description', 'wpdirectorykit'), 'field\_type' => 'DROPDOWN', 'values' => $fields\_list, 'rules' => ''),

66

150

           

67

151

            array(

68

 

                'field' => 'wdk\_recaptcha\_site\_key',

69

 

                'field\_label' => \_\_('Recaptcha site key', 'wpdirectorykit'),

70

 

                'hint' => \_\_('Please add Recaptcha site and Secret keys for enable recaptcha Add Google Recaptcha site key (use V2 recaptcha key)', 'wpdirectorykit'),

71

 

                'field\_type' => 'INPUTBOX',

72

 

                'rules' => '',

73

 

            ),

74

 

75

 

            array(

76

 

                'field' => 'wdk\_recaptcha\_secret\_key',

77

 

                'field\_label' => \_\_('Recaptcha site secret key', 'wpdirectorykit'),

78

 

                'hint' => \_\_('Add Google Recaptcha secret key', 'wpdirectorykit'),

79

 

                'field\_type' => 'INPUTBOX',

80

 

                'rules' => '',

81

 

            ),

82

 

83

 

            array(

84

 

                'field' => 'wdk\_multi\_locations\_search\_field\_type',

 

152

                'field'  => 'wdk\_multi\_locations\_search\_field\_type',

85

153

                'field\_label' => \_\_('Location field Search', 'wpdirectorykit'),

86

154

                'field\_type' => 'RADIO',

…

…

 

108

176

                )

109

177

            ),

 

178

           

 

179

            array(

 

180

                'field'  => 'wdk\_multi\_locations\_edit\_field\_type',

 

181

                'field\_label' => \_\_('Location field edit', 'wpdirectorykit'),

 

182

                'field\_type' => 'RADIO',

 

183

                'hint' => \_\_('Visible on edit form', 'wpdirectorykit'),

 

184

                'rules' => '',

 

185

                'values' => array(

 

186

                    '' => esc\_html\_\_('Single Tree Dropdown', 'wpdirectorykit'),

 

187

                    'wdk\_treefield\_dropdown' => esc\_html\_\_('Multiple Dropdowns', 'wpdirectorykit'),

 

188

                )

 

189

            ),

 

190

 

191

            array(

 

192

                'field' => 'wdk\_multi\_categories\_edit\_field\_type',

 

193

                'field\_label' => \_\_('Categoreis field edit', 'wpdirectorykit'),

 

194

                'field\_type' => 'RADIO',

 

195

                'hint' => \_\_('Visible on edit form. Hiding field in edit form based on category is only possible when using single tree dropdown', 'wpdirectorykit'),

 

196

                'rules' => '',

 

197

                'values' => array(

 

198

                    '' => esc\_html\_\_('Single Tree Dropdown', 'wpdirectorykit'),

 

199

                    'wdk\_treefield\_dropdown' => esc\_html\_\_('Multiple Dropdowns', 'wpdirectorykit'),

 

200

                )

 

201

            ),

110

202

           

111

203

            array('field' => 'wdk\_multi\_locations\_other\_enable', 'field\_label' => \_\_('Enable multi location on edit listing', 'wpdirectorykit'), 'hint' => \_\_('Enable multi location on edit listing', 'wpdirectorykit'), 'field\_type' => 'CHECKBOX', 'rules' => ''),

112

204

            array('field' => 'wdk\_multi\_categories\_other\_enable', 'field\_label' => \_\_('Enable multi categories on edit listing', 'wpdirectorykit'), 'hint' => \_\_('Enable multi categories on edit listing', 'wpdirectorykit'), 'field\_type' => 'CHECKBOX', 'rules' => ''),

 

205

            array(

 

206

                'field' => 'wdk\_listing\_plangs\_documents\_disable',

 

207

                'field\_label' => \_\_('Disable "Listing plans and documents"', 'wpdirectorykit'),

 

208

                'hint' => '',

 

209

                'field\_type' => 'CHECKBOX',

 

210

                'rules' => '',

 

211

            ),

 

212

        );

 

213

 

214

        /\* Api-s \*/

 

215

        $this->fields\_list\_tabs\['apis'\] = array(

 

216

            array(

 

217

                'field' => 'wdk\_recaptcha\_site\_key',

 

218

                'field\_label' => \_\_('Recaptcha site key', 'wpdirectorykit'),

 

219

                'hint' => \_\_('Please add Recaptcha site and Secret keys for enable recaptcha Add Google Recaptcha site key (use V2 recaptcha key)', 'wpdirectorykit'),

 

220

                'field\_type' => 'INPUTBOX',

 

221

                'rules' => '',

 

222

            ),

 

223

            array(

 

224

                'field' => 'wdk\_recaptcha\_secret\_key',

 

225

                'field\_label' => \_\_('Recaptcha site secret key', 'wpdirectorykit'),

 

226

                'hint' => \_\_('Add Google Recaptcha secret key', 'wpdirectorykit'),

 

227

                'field\_type' => 'INPUTBOX',

 

228

                'rules' => '',

 

229

            ),

 

230

            array(

 

231

                'field' => 'wdk\_geo\_google\_api\_key',

 

232

                'field\_label' => \_\_('Google Maps API Key', 'wpdirectorykit'),

 

233

                'hint' => \_\_('Google Maps API Key', 'wpdirectorykit'),

 

234

                'field\_type' => 'INPUTBOX',

 

235

                'rules' => '',

 

236

            ),

 

237

            array(

 

238

                'field' => 'wdk\_import\_google\_api\_enable',

 

239

                'field\_label' => \_\_('Google API for import listings', 'wpdirectorykit'),

 

240

                'hint' => \_\_('Google API key will be used to autodetect GPS coordinates when importing listing', 'wpdirectorykit'),

 

241

                'field\_type' => 'CHECKBOX',

 

242

                'rules' => '',

 

243

            ),

 

244

            array(

 

245

                'field' => 'wdk\_geo\_coding\_results\_location',

 

246

                'field\_label' => \_\_('Auto Search based on Geo Coding', 'wpdirectorykit'),

 

247

                'hint' => \_\_('if this is enabled, search auto search listings', 'wpdirectorykit'),

 

248

                'field\_type' => 'CHECKBOX',

 

249

                'rules' => '',

 

250

            ),

 

251

        );

 

252

 

253

        $this->fields\_list\_tabs\['general'\] = array(

 

254

            array('field' => 'wdk\_default\_lat', 'field\_label' => \_\_('Default GPS Position', 'wpdirectorykit'), 'hint' => '', 'field\_type' => 'MAP', 'rules' => ''),

 

255

            array('field' => 'wdk\_default\_lng', 'field\_label' => \_\_('Default GPS Longitude', 'wpdirectorykit'), 'hint' => '', 'field\_type' => 'INPUTBOX', 'rules' => '', 'class' => 'hidden'),

 

256

            array('field' => 'wdk\_fixed\_map\_results\_position', 'field\_label' => \_\_('Fix map center on default location', 'wpdirectorykit'), 'hint' => '', 'field\_type' => 'CHECKBOX', 'rules' => '', 'class' => ''),

 

257

           

 

258

            array('field' => 'wdk\_is\_category\_enabled', 'field\_label' => \_\_('Enable Categories', 'wpdirectorykit'), 'hint' => \_\_('If you don\\'t need categories features you can disable that here', 'wpdirectorykit'), 'field\_type' => 'CHECKBOX', 'rules' => ''),

 

259

            array('field' => 'wdk\_is\_location\_enabled', 'field\_label' => \_\_('Enable Locations', 'wpdirectorykit'), 'hint' => \_\_('If you don\\'t need location features you can disable that here', 'wpdirectorykit'), 'field\_type' => 'CHECKBOX', 'rules' => '', 'class' => ''),

 

260

           

 

261

           

 

262

            array('field' => 'wdk\_is\_address\_enabled', 'field\_label' => \_\_('Enable Address', 'wpdirectorykit'), 'hint' => \_\_('Select regular page which ill be used for listing preview page on frontend, you can create new one also for this purpose', 'wpdirectorykit'), 'field\_type' => 'CHECKBOX', 'rules' => ''),

 

263

            array('field' => 'wdk\_slug\_listing\_preview\_page', 'field\_label' => \_\_('Custom Listing Preview Page Slug', 'wpdirectorykit'), 'hint' => \_\_('Slug used for listing preview page, if empty, default will be used', 'wpdirectorykit'), 'field\_type' => 'INPUTBOX', 'rules' => 'wdk\_slug\_format'),

 

264

            array('field' => 'wdk\_listing\_page', 'field\_label' => \_\_('Listing Page', 'wpdirectorykit'), 'hint' => \_\_('Select regular page which ill be used for listing preview page on frontend, you can create new one also for this purpose', 'wpdirectorykit'), 'field\_type' => 'DROPDOWN', 'rules' => '', 'values' => $pages),

 

265

            array('field' => 'wdk\_results\_page', 'field\_label' => \_\_('Results Page', 'wpdirectorykit'), 'hint' => \_\_('Select regular page which ill be used for results page on frontend, you can create new one also for this purpose', 'wpdirectorykit'), 'field\_type' => 'DROPDOWN', 'rules' => '', 'values' => $pages),

 

266

            array('field' => 'wdk\_is\_results\_page\_require', 'field\_label' => \_\_('Always use results page', 'wpdirectorykit'), 'hint' => \_\_('Always even if on current page you have results where can be showed', 'wpdirectorykit'), 'field\_type' => 'CHECKBOX', 'rules' => ''),

 

267

           

 

268

            array(

 

269

                'field' => 'wdk\_card\_video\_enable',

 

270

                'field\_label' => \_\_('Card Video From gallery in result card enable', 'wpdirectorykit'),

 

271

                'hint' => \_\_('If you upload video on first place in listing, will become visible in result card', 'wpdirectorykit'),

 

272

                'field\_type' => 'CHECKBOX',

 

273

                'rules' => '',

 

274

            ),

 

275

            array(

 

276

                'field' => 'wdk\_listing\_category\_required',

 

277

                'field\_label' => \_\_('Category is required field', 'wpdirectorykit'),

 

278

                'hint' => \_\_('if this is enabled, listing required category field', 'wpdirectorykit'),

 

279

                'field\_type' => 'CHECKBOX',

 

280

                'rules' => '',

 

281

            ),

 

282

            array(

 

283

                'field' => 'wdk\_listing\_location\_required',

 

284

                'field\_label' => \_\_('Location is required field', 'wpdirectorykit'),

 

285

                'hint' => \_\_('if this is enabled, listing required location field', 'wpdirectorykit'),

 

286

                'field\_type' => 'CHECKBOX',

 

287

                'rules' => '',

 

288

            ),

 

289

 

290

            array(

 

291

                'field' => 'wdk\_sub\_listings\_enable',

 

292

                'field\_label' => \_\_('Related Listings', 'wpdirectorykit'),

 

293

                'field\_type' => 'CHECKBOX',

 

294

                'rules' => '',

 

295

            ),

 

296

            array(

 

297

                'field' => 'wdk\_listings\_images\_required\_enable',

 

298

                'field\_label' => \_\_('Listing Images required', 'wpdirectorykit'),

 

299

                'field\_type' => 'CHECKBOX',

 

300

                'rules' => '',

 

301

            ),

113

302

            array(

114

303

                'field' => 'wdk\_default\_currency\_symbol',

…

…

 

118

307

                'rules' => '',

119

308

            ),

120

 

            array(

121

 

                'field' => 'wdk\_listing\_plangs\_documents\_disable',

122

 

                'field\_label' => \_\_('Disable "Listing plans and documents"', 'wpdirectorykit'),

123

 

                'hint' => '',

124

 

                'field\_type' => 'CHECKBOX',

125

 

                'rules' => '',

126

 

            ),

127

 

            array(

128

 

                'field' => 'wdk\_placeholder',

129

 

                'field\_label' => \_\_('Cooming soon listing image', 'wpdirectorykit'),

130

 

                'hint' => '',

131

 

                'field\_type' => 'UPLOAD',

132

 

                'rules' => '',

133

 

            ),

134

 

            array(

135

 

                'field' => 'wdk\_card\_slider\_enable',

136

 

                'field\_label' => \_\_('Show slider in result card', 'wpdirectorykit'),

137

 

                'hint' => '',

138

 

                'field\_type' => 'CHECKBOX',

139

 

                'rules' => '',

140

 

            ),

141

 

            array(

142

 

                'field' => 'wdk\_card\_video\_field',

143

 

                'field\_label' => \_\_('Card video field', 'wpdirectorykit'),

144

 

                'hint' => '',

145

 

                'field\_type' => 'DROPDOWN',

146

 

                'values' => $fields\_list\_inputs,

147

 

                'rules' => '',

148

 

                'hint' => '',

149

 

            ),

150

 

            array(

151

 

                'field' => 'wdk\_card\_video\_enable',

152

 

                'field\_label' => \_\_('Card Video From gallery in result card enable', 'wpdirectorykit'),

153

 

                'hint' => \_\_('If you upload video on first place in listing, will become visible in result card', 'wpdirectorykit'),

154

 

                'field\_type' => 'CHECKBOX',

155

 

                'rules' => '',

156

 

            ),

157

 

            array(

158

 

                'field' => 'wdk\_geo\_google\_api\_key',

159

 

                'field\_label' => \_\_('Google Maps API Key', 'wpdirectorykit'),

160

 

                'hint' => \_\_('Google Maps API Key', 'wpdirectorykit'),

161

 

                'field\_type' => 'INPUTBOX',

162

 

                'rules' => '',

163

 

            ),

164

 

            array(

165

 

                'field' => 'wdk\_import\_google\_api\_enable',

166

 

                'field\_label' => \_\_('Google API for import listings', 'wpdirectorykit'),

167

 

                'hint' => \_\_('Google API key will be used to autodetect GPS coordinates when importing listing', 'wpdirectorykit'),

168

 

                'field\_type' => 'CHECKBOX',

169

 

                'rules' => '',

170

 

            ),

171

 

            array(

172

 

                'field' => 'wdk\_geo\_coding\_results\_location',

173

 

                'field\_label' => \_\_('Auto Search based on Geo Coding', 'wpdirectorykit'),

174

 

                'hint' => \_\_('if this is enabled, search auto search listings', 'wpdirectorykit'),

175

 

                'field\_type' => 'CHECKBOX',

176

 

                'rules' => '',

177

 

            ),

178

 

           

179

 

            array(

180

 

                'field' => 'wdk\_listing\_category\_required',

181

 

                'field\_label' => \_\_('Category is required field', 'wpdirectorykit'),

182

 

                'hint' => \_\_('if this is enabled, listing required category field', 'wpdirectorykit'),

183

 

                'field\_type' => 'CHECKBOX',

184

 

                'rules' => '',

185

 

            ),

186

 

            array(

187

 

                'field' => 'wdk\_listing\_location\_required',

188

 

                'field\_label' => \_\_('Location is required field', 'wpdirectorykit'),

189

 

                'hint' => \_\_('if this is enabled, listing required location field', 'wpdirectorykit'),

190

 

                'field\_type' => 'CHECKBOX',

191

 

                'rules' => '',

192

 

            ),

193

 

            array(

194

 

                'field' => 'wdk\_mobile\_bottom\_navbar\_enable',

195

 

                'field\_label' => \_\_('Mobile bottom navbar', 'wpdirectorykit'),

196

 

                'field\_type' => 'CHECKBOX',

197

 

                'rules' => '',

198

 

            ),

199

 

            array(

200

 

                'field' => 'wdk\_sub\_listings\_enable',

201

 

                'field\_label' => \_\_('Related Listings', 'wpdirectorykit'),

202

 

                'field\_type' => 'CHECKBOX',

203

 

                'rules' => '',

204

 

            ),

205

 

            array(

206

 

                'field' => 'wdk\_listings\_images\_required\_enable',

207

 

                'field\_label' => \_\_('Listing Images required', 'wpdirectorykit'),

208

 

                'field\_type' => 'CHECKBOX',

209

 

                'rules' => '',

210

 

            ),

211

309

        );

212

310

213

311

        if(function\_exists('run\_wdk\_geo')) {

214

 

            $this->fields\_list\[\] = array(

 

312

            $this->fields\_list\_tabs\['apis'\]\[\] = array(

215

313

                'field' => 'wdk\_geo\_autodetect\_by\_google\_js\_enable',

216

314

                'field\_label' => \_\_('Enable location autodetect by Google JS', 'wpdirectorykit'),

…

…

 

220

318

            );

221

319

       

222

 

            $this->fields\_list\[\] = array(

 

320

            $this->fields\_list\_tabs\['apis'\]\[\] = array(

223

321

                'field' => 'wdk\_geo\_autodetect\_by\_ip\_enable',

224

322

                'field\_label' => \_\_('Enable location autodatect by IP', 'wpdirectorykit'),

…

…

 

229

327

        }

230

328

231

 

 

329

        foreach ($this->fields\_list\_tabs as $tab\_fields) {

 

330

            foreach ($tab\_fields as $field) {

 

331

                $this->fields\_list\[\] = $field;

 

332

            }

 

333

        }

232

334

    }

233

335
  • wpdirectorykit/trunk/application/views/fields_edit/CALENDAR_DATES_VIEW.php

    r2821684

    r2917413

72

72

73

73

                        $first\_day\_of\_week = array\_search(esc\_html\_\_(date('D', strtotime($year . '-' . $month . '-1')), 'wpdirectorykit'), $days);

 

74

                        if(!$first\_day\_of\_week)

 

75

                            $first\_day\_of\_week = 1;

 

76

74

77

                        $num\_days\_last\_month = date('j', strtotime('last day of previous month', strtotime($current\_day. '-' . $month . '-' . $year)));

75

78

                        $startDay = $first\_day\_of\_week;

76

79

                        ?>

77

 

                            <caption><?php echo esc\_html($month);?> <?php echo esc\_html($year);?></caption>

 

80

                            <caption><?php echo esc\_html\_\_($month,'wpdirectorykit');?> <?php echo esc\_html($year);?></caption>

78

81

                            <thead>

79

82

                            <tr>

80

83

                                <?php foreach ($days as $key => $day) :?>

81

 

                                    <th><?php echo esc\_html($day);?></th>

 

84

                                    <th><?php echo esc\_html(substr($day,0,3));?></th>

82

85

                                <?php endforeach;?>

83

86

                            </tr>
  • wpdirectorykit/trunk/application/views/wdk/index.php

    r2905795

    r2917413

36

36

    ?>

37

37

38

 

    <form method="GET" action="<?php echo wmvc\_current\_edit\_url(); ?>" novalidate="novalidate"\>

 

38

    <form method="GET" action="<?php echo wmvc\_current\_edit\_url(); ?>" novalidate="novalidate" class="filters-form"\>

39

39

        <div class="tablenav top">

40

40

            <div class="alignleft actions">

41

41

                <input type="hidden" name="page" value="wdk" />

42

42

43

 

                <label class="screen-reader-text" for="location\_id"><?php echo \_\_('Filter by location', 'wpdirectorykit'); ?></label>

44

 

                <?php echo wmvc\_select\_option('location\_id', $locations, wmvc\_show\_data('location\_id', $db\_data, ''), NULL, \_\_('Location', 'wpdirectorykit')); ?>

45

 

46

 

                <label class="screen-reader-text" for="category\_id"><?php echo \_\_('Filter by category', 'wpdirectorykit'); ?></label>

47

 

                <?php echo wmvc\_select\_option('category\_id', $categories, wmvc\_show\_data('category\_id', $db\_data, ''), NULL, \_\_('Category', 'wpdirectorykit')); ?>

 

43

 

44

                <?php if(get\_option('wdk\_is\_location\_enabled', FALSE)): ?>

 

45

                    <label class="screen-reader-text" for="location\_id"><?php echo \_\_('Filter by location', 'wpdirectorykit'); ?></label>

 

46

                    <?php echo wmvc\_select\_option('location\_id', $locations, wmvc\_show\_data('location\_id', $db\_data, ''), NULL, \_\_('Location', 'wpdirectorykit')); ?>

 

47

                <?php endif;?>

 

48

 

49

                <?php if(get\_option('wdk\_is\_category\_enabled', FALSE)): ?>

 

50

                    <label class="screen-reader-text" for="category\_id"><?php echo \_\_('Filter by category', 'wpdirectorykit'); ?></label>

 

51

                    <?php echo wmvc\_select\_option('category\_id', $categories, wmvc\_show\_data('category\_id', $db\_data, ''), NULL, \_\_('Category', 'wpdirectorykit')); ?>

 

52

                <?php endif;?>

48

53

49

54

                <label class="screen-reader-text" for="user\_id\_editor"><?php echo esc\_html\_\_('Filter by user', 'wpdirectorykit'); ?></label>

…

…

 

51

56

52

57

                <label class="screen-reader-text" for="search"><?php echo \_\_('Filter by keyword', 'wpdirectorykit'); ?></label>

53

 

                <input type="text" name="search" id="search" class="postform left" value="<?php echo wmvc\_show\_data('search', $db\_data, ''); ?>" placeholder="<?php echo \_\_('Filter by keyword', 'wpdirectorykit'); ?>" />

 

58

                <input type="text" name="search" id="search" class="postform left" value="<?php echo esc\_attr(wmvc\_show\_data('search', $db\_data, '')); ?>" placeholder="<?php echo \_\_('Filter by keyword', 'wpdirectorykit'); ?>" />

54

59

55

60

                <label class="screen-reader-text" for="order\_by"><?php echo \_\_('Order By', 'wpdirectorykit'); ?></label>

56

61

                <?php echo wmvc\_select\_option('order\_by', $order\_by, wmvc\_show\_data('order\_by', $db\_data, ''), NULL, \_\_('Order by', 'wpdirectorykit')); ?>

 

62

 

63

 

64

                <?php

 

65

                    $custom\_field\_init = false;

 

66

                    foreach ($\_GET as $key => $value) {

 

67

                        if(stripos($key, 'c\_field\_') !== FALSE && stripos($key, '\_field',8) !== FALSE) {

 

68

                            $field\_id = substr($key, 8, (stripos($key, '\_',8) - 8) );

 

69

                            ?>

 

70

                                <span class="custom\_parameter" data-key="<?php echo esc\_attr($field\_id);?>">

 

71

                                    <?php echo wmvc\_select\_option('c\_field\_'.$field\_id.'\_field', $fields\_list, wmvc\_show\_data('c\_field\_'.$field\_id.'\_field', $\_GET, ''), 'class="cus\_p\_field"', \_\_('Field', 'wpdirectorykit')); ?>

 

72

                                    <?php echo wmvc\_select\_option('c\_field\_'.$field\_id.'\_like', array('=='=>'=','>'=>'>','<'=>'<'), wmvc\_show\_data('c\_field\_'.$field\_id.'\_like', $\_GET, ''), 'class="cus\_p\_like"'); ?>

 

73

                                    <input type="text" name="c\_field\_<?php echo esc\_attr($field\_id);?>\_value" value="<?php echo wmvc\_show\_data('c\_field\_'.$field\_id.'\_value', $\_GET, ''); ?>" class="cus\_p\_value" placeholder="<?php echo \_\_('Value', 'wpdirectorykit'); ?>" />

 

74

                                </span>

 

75

                            <?php

 

76

                            $custom\_field\_init = true;

 

77

                        }

 

78

                    };

 

79

                ?>

 

80

                <?php if(!$custom\_field\_init):?>

 

81

                    <span class="custom\_parameter">

 

82

                        <?php echo wmvc\_select\_option('c\_field\_1\_field', $fields\_list, wmvc\_show\_data('c\_field\_1\_field', $db\_data, ''), 'class="cus\_p\_field"', \_\_('Field', 'wpdirectorykit')); ?>

 

83

                        <?php echo wmvc\_select\_option('c\_field\_1\_like', array('=='=>'=','>'=>'>','<'=>'<'), wmvc\_show\_data('c\_field\_1\_like', $db\_data, ''), 'class="cus\_p\_like"'); ?>

 

84

                        <input type="text" name="c\_field\_1\_value" value="<?php echo wmvc\_show\_data('c\_field\_1\_value', $db\_data, ''); ?>" class="cus\_p\_value" placeholder="<?php echo \_\_('Value', 'wpdirectorykit'); ?>" />

 

85

                    </span>

 

86

                <?php endif;?>

 

87

 

88

                <a href="" class="btn\_parameter remove"><span class="dashicons dashicons-minus"></span></a>

 

89

                <a href="" class="btn\_parameter add"><span class="dashicons dashicons-plus-alt2"></span></a>

57

90

58

91

                <input type="submit" name="filter\_action" id="post-query-submit" class="button" value="<?php echo \_\_('Filter', 'wpdirectorykit'); ?>">

…

…

 

79

112

                    <th style="width:50px;"><?php echo \_\_('#ID', 'wpdirectorykit'); ?></th>

80

113

                    <th><?php echo \_\_('Title', 'wpdirectorykit'); ?></th>

 

114

                    <?php if(get\_option('wdk\_is\_category\_enabled', FALSE)): ?>

81

115

                    <th><?php echo \_\_('Category', 'wpdirectorykit'); ?></th>

 

116

                    <?php endif; ?>

82

117

                    <th style="text-align: center;"><?php echo \_\_('Image', 'wpdirectorykit'); ?></th>

83

118

                    <th><?php echo \_\_('Post Date', 'wpdirectorykit'); ?></th>

…

…

 

138

173

                        </td>

139

174

 

175

                        <?php if(get\_option('wdk\_is\_category\_enabled', FALSE)): ?>

140

176

                        <td>

141

 

142

177

                        <?php echo wmvc\_show\_data($listing->category\_id, $categories, '-'); ?>

143

178

                            <?php

…

…

 

149

184

                                <?php endif;?>

150

185

                        </td>

 

186

                        <?php endif; ?>

 

187

                       

151

188

                        <td style="text-align: center;">

152

189

                            <a class="img-link" href="<?php echo get\_admin\_url() . "admin.php?page=wdk\_listing&id=" . wmvc\_show\_data('ID', $listing, '-'); ?>">

…

…

 

209

246

                    <th style="width:50px;"><?php echo \_\_('#ID', 'wpdirectorykit'); ?></th>

210

247

                    <th><?php echo \_\_('Title', 'wpdirectorykit'); ?></th>

 

248

                    <?php if(get\_option('wdk\_is\_category\_enabled', FALSE)): ?>

211

249

                    <th><?php echo \_\_('Category', 'wpdirectorykit'); ?></th>

 

250

                    <?php endif; ?>

212

251

                    <th style="text-align: center;"><?php echo \_\_('Image', 'wpdirectorykit'); ?></th>

213

252

                    <th><?php echo \_\_('Post Date', 'wpdirectorykit'); ?></th>

…

…

 

256

295

        });

257

296

        wdk\_loading\_sublistings();

 

297

        wdk\_custom\_search\_parameters();

258

298

    });

259

299

…

…

 

403

443

        init();

404

444

    };

 

445

 

446

    const wdk\_custom\_search\_parameters = ($selector\_customParameter = '.custom\_parameter') => {

 

447

        var selector\_customParameter = jQuery($selector\_customParameter).first();

 

448

 

449

        var event = () => {

 

450

            jQuery('.btn\_parameter.add').off().on('click', function(e){

 

451

                e.preventDefault();

 

452

                var cus\_field = selector\_customParameter.clone().insertAfter(jQuery($selector\_customParameter).last());

 

453

                cus\_field.find('input,select').val('');

 

454

               

 

455

                var key = 1;

 

456

                while (jQuery('.custom\_parameter .cus\_p\_field\[name="c\_field\_'+key+'\_field"\]').length) {

 

457

                    key++;

 

458

                }

 

459

 

460

                cus\_field.find('.cus\_p\_field').attr('name', 'c\_field\_'+key+'\_field');

 

461

                cus\_field.find('.cus\_p\_like').attr('name', 'c\_field\_'+key+'\_like');

 

462

                cus\_field.find('.cus\_p\_value').attr('name', 'c\_field\_'+key+'\_value');

 

463

            });

 

464

 

465

            jQuery('.btn\_parameter.remove').off().on('click', function(e){

 

466

                e.preventDefault();

 

467

                if(jQuery($selector\_customParameter).length>1) {

 

468

                    jQuery($selector\_customParameter).last().remove();

 

469

                } else {

 

470

                    jQuery($selector\_customParameter).last().find('input,select').val('');

 

471

                }

 

472

            });

 

473

        };

 

474

 

475

        event();

 

476

    };

405

477

</script>

406

478
  • wpdirectorykit/trunk/application/views/wdk_addons/index.php

    r2828621

    r2917413

113

113

                                    <a class="button activate-now" href="<?php echo esc\_url($activate\_url);?>"><?php echo esc\_html\_\_('Activate', 'wpdirectorykit'); ?></a>

114

114

                                <?php else:?>

115

 

                                    <?php if(stripos(wmvc\_show\_data('link', $addon), 'sweet-energy-efficiency') === FALSE):?>

 

115

                                    <?php if(file\_exists(get\_stylesheet\_directory() .'/addons/'.substr(basename(wmvc\_show\_data('is\_exists\_slug', $addon)), 0, -4).'.zip')):?>

 

116

                                        <a target="\_blank" class="install-now button btn-danger" data-slug="classic-editor" href="<?php echo esc\_url(wdk\_get\_tgmpa\_link());?>" title="<?php echo esc\_html(wmvc\_show\_data('title', $addon));?>"><?php echo esc\_html\_\_('Activate', 'wpdirectorykit'); ?></a>

 

117

                                    <?php elseif(stripos(wmvc\_show\_data('link', $addon), 'sweet-energy-efficiency') === FALSE):?>

116

118

                                        <a target="\_blank" class="install-now button btn-danger" data-slug="classic-editor" href="<?php echo esc\_url(wmvc\_show\_data('link', $addon));?>" title="<?php echo esc\_html(wmvc\_show\_data('title', $addon));?>"><?php echo esc\_html\_\_('Buy Now', 'wpdirectorykit'); ?></a>

117

119

                                    <?php else:?>
  • wpdirectorykit/trunk/application/views/wdk_addons_membership/index.php

    r2828621

    r2917413

36

36

                <?php echo esc\_html\_\_('Get all', 'wpdirectorykit'); ?>

37

37

                <span class="mark"><?php echo esc\_html\_\_('addons and premium', 'wpdirectorykit'); ?></span>

38

 

                <?php echo esc\_html\_\_('support from just 29$ in subscription or from 8.25$/month in yearly subscription', 'wpdirectorykit'); ?>

 

38

                <?php echo esc\_html\_\_('support from 8.25$/month in yearly subscription', 'wpdirectorykit'); ?>

39

39

            </h2>

40

40

        </div>
  • wpdirectorykit/trunk/application/views/wdk_listing/index.php

    r2904689

    r2917413

153

153

154

154

                                    <?php if(get\_option('wdk\_is\_category\_enabled', FALSE)): ?>

155

 

                                    <tr>

156

 

                                        <th scope="row"><label for="category\_id"><?php echo \_\_('Category', 'wpdirectorykit'); ?><?php if(wdk\_get\_option('wdk\_listing\_category\_required')):?>\*<?php endif;?></label></th>

157

 

                                        <td >

158

 

                                            <?php

159

 

                                                echo wmvc\_select\_option('category\_id', $categories, wmvc\_show\_data('category\_id', $db\_data, ''), "id='category\_id'", \_\_('Not Selected', 'wpdirectorykit'));

160

 

                                            ?>

161

 

                                        </td>

162

 

                                    </tr>

 

155

                                        <?php if(wdk\_get\_option('wdk\_multi\_categories\_edit\_field\_type') == 'wdk\_treefield\_dropdown'):?>

 

156

                                            <tr>

 

157

                                                <th scope="row"><label for="category\_id"><?php echo \_\_('Category', 'wpdirectorykit'); ?><?php if(wdk\_get\_option('wdk\_listing\_category\_required')):?>\*<?php endif;?></label></th>

 

158

                                                <td class="wdk\_multi\_treefield\_dropdown\_container">

 

159

                                                    <?php

 

160

                                                    global $Winter\_MVC\_WDK;

 

161

                                                    $Winter\_MVC\_WDK->load\_helper('listing');

 

162

                                                    $Winter\_MVC\_WDK->model('category\_m');

 

163

                                                    $field\_value =  wmvc\_show\_data('category\_id', $db\_data, '');

 

164

                                                    $field\_key = 'category\_id';

 

165

                                                   

 

166

                                                    $categories = array();

 

167

                                                    if(!empty($field\_value)) {

 

168

                                                        $categories\[\] = $field\_value;

 

169

                                                        $category = $Winter\_MVC\_WDK->category\_m->get($field\_value, TRUE);

 

170

 

171

                                                        while(!empty($category->parent\_id)) {

 

172

                                                            $category = $Winter\_MVC\_WDK->category\_m->get($category->parent\_id, TRUE);

 

173

                                                            $categories\[\] = $category->idcategory;

 

174

                                                        }

 

175

                                                        krsort($categories);

 

176

                                                    } else {

 

177

                                                        $categories\[\] = 0;

 

178

                                                    }

 

179

 

180

                                                    wp\_enqueue\_style('wdk-treefield-dropdown');

 

181

                                                    wp\_enqueue\_script('wdk-treefield-dropdown');

 

182

                                                    wp\_enqueue\_style( 'dashicons' );

 

183

 

184

 

185

                                                    $level\_max = $Winter\_MVC\_WDK->category\_m->get\_max\_level();

 

186

 

187

                                                    $placeholder = \[

 

188

                                                        0 => esc\_html\_\_('Select Categories','wpdirectorykit'),

 

189

                                                        1 => esc\_html\_\_('Select Sub Categories','wpdirectorykit'),

 

190

                                                        2 => esc\_html\_\_('Select Sub Categories','wpdirectorykit'),

 

191

                                                        3 => esc\_html\_\_('Select Sub Categories','wpdirectorykit'),

 

192

                                                        4 => esc\_html\_\_('Select Sub Categories','wpdirectorykit'),

 

193

                                                        5 => esc\_html\_\_('Select Sub Categories','wpdirectorykit'),

 

194

                                                    \];

 

195

                                                    ?>

 

196

 

197

                                                    <input name="<?php echo esc\_attr($field\_key); ?>" type="hidden" value="<?php echo esc\_attr($field\_value); ?>">

 

198

                                                    <?php

 

199

                                                    $level = 0;

 

200

                                                    $current = NULL;

 

201

 

202

                                                    foreach ($categories as $category) {

 

203

                                                        $current = $Winter\_MVC\_WDK->category\_m->get($category, TRUE);

 

204

 

205

                                                        $list = $Winter\_MVC\_WDK->category\_m->get\_by(array('parent\_id = '.$current->parent\_id => NULL));

 

206

 

207

                                                        if(isset($placeholder\[$level\])) {

 

208

                                                            $values\_list = array(''=> $placeholder\[$level\]);

 

209

 

 

210

                                                          } else {

 

211

                                                            $values\_list = array(''=> esc\_html\_\_('Select Sub Categories','wpdirectorykit'));

 

212

                                                        }

 

213

 

214

                                                        foreach ($list as $list\_value) {

 

215

                                                            $values\_list\[$list\_value->idcategory\] = $list\_value->category\_title;

 

216

                                                        }

 

217

                                                        ?>

 

218

 

219

                                                        <div data-level="<?php echo esc\_attr($level);?>" data-field="<?php echo esc\_attr($field\_key); ?>" class="wdk\_multi\_treefield\_dropdown wdk\_treefield\_dropdown">

 

220

                                                            <div class="wdk-field-group">

 

221

                                                                <?php echo wmvc\_select\_option('category\_'.$level, $values\_list, $category, 'class="wdk-control"');?>

 

222

                                                            </div>

 

223

                                                        </div>

 

224

 

225

                                                        <?php

 

226

                                                        $level++;

 

227

                                                    }

 

228

                                                           

 

229

                                                    if($level<$level\_max ) {

 

230

                                                        for (; $level<$level\_max;) {

 

231

                                                       

 

232

                                                            if(isset($placeholder\[$level\])) {

 

233

                                                                $values\_list = array(''=> $placeholder\[$level\]);

 

234

                                                            } else {

 

235

                                                                $values\_list = array(''=> esc\_html\_\_('Select Sub Categories','wpdirectorykit'));

 

236

                                                            }

 

237

 

238

                                                            if($category) {

 

239

                                                                $list = $Winter\_MVC\_WDK->category\_m->get\_by(array('parent\_id = '.$category => NULL));

 

240

                                                                foreach ($list as $list\_value) {

 

241

                                                                    $values\_list\[$list\_value->idcategory\] = $list\_value->category\_title;

 

242

                                                                }

 

243

                                                                $category = NULL;

 

244

                                                            }

 

245

 

246

                                                            ?>

 

247

                                                            <div data-level="<?php echo esc\_attr($level);?>" data-field="<?php echo esc\_attr($field\_key); ?>" class="wdk\_multi\_treefield\_dropdown wdk\_treefield\_dropdown">

 

248

                                                                <div class="wdk-field-group">

 

249

                                                                    <?php echo wmvc\_select\_option('category\_'.$level, $values\_list, NULL, 'class="wdk-control"');?>

 

250

                                                                </div>

 

251

                                                            </div>

 

252

 

253

                                                            <?php

 

254

                                                            $level++;

 

255

                                                        }

 

256

                                                    }

 

257

                                                    ?>

 

258

                                                </td>

 

259

                                            </tr>

 

260

                                        <?php else: ?>

 

261

                                            <tr>

 

262

                                                <th scope="row"><label for="category\_id"><?php echo \_\_('Category', 'wpdirectorykit'); ?><?php if(wdk\_get\_option('wdk\_listing\_category\_required')):?>\*<?php endif;?></label></th>

 

263

                                                <td >

 

264

                                                    <?php

 

265

                                                        echo wmvc\_select\_option('category\_id', $categories, wmvc\_show\_data('category\_id', $db\_data, ''), "id='category\_id'", \_\_('Not Selected', 'wpdirectorykit'));

 

266

                                                    ?>

 

267

                                                </td>

 

268

                                            </tr>

 

269

                                        <?php endif; ?>

163

270

                                    <?php endif; ?>

164

271

                                   

…

…

 

173

280

174

281

                                    <?php if(get\_option('wdk\_is\_location\_enabled', FALSE)): ?>

175

 

                                    <tr>

176

 

                                        <th scope="row"><label for="location\_id"><?php echo \_\_('Location', 'wpdirectorykit'); ?><?php if(wdk\_get\_option('wdk\_listing\_location\_required')):?>\*<?php endif;?></label></th>

177

 

                                        <td>

178

 

                                            <?php

179

 

                                            echo wmvc\_select\_option('location\_id', $locations, wmvc\_show\_data('location\_id', $db\_data, ''), "id='location\_id'", \_\_('Not Selected', 'wpdirectorykit'));

180

 

                                            ?>

181

 

                                        </td>

182

 

                                    </tr>

 

282

                                        <?php if(wdk\_get\_option('wdk\_multi\_categories\_edit\_field\_type') == 'wdk\_treefield\_dropdown'):?>

 

283

                                            <tr>

 

284

                                                <th scope="row"><label for="category\_id"><?php echo \_\_('Category', 'wpdirectorykit'); ?><?php if(wdk\_get\_option('wdk\_listing\_category\_required')):?>\*<?php endif;?></label></th>

 

285

                                                <td class="wdk\_multi\_treefield\_dropdown\_container">

 

286

                                                    <?php

 

287

                                                    global $Winter\_MVC\_WDK;

 

288

                                                    $Winter\_MVC\_WDK->load\_helper('listing');

 

289

                                                    $Winter\_MVC\_WDK->model('location\_m');

 

290

                                                    $field\_value =  wmvc\_show\_data('location\_id', $db\_data, '');

 

291

                                                    $field\_key = 'location\_id';

 

292

 

293

                                                    $locations = array();

 

294

                                                    if(!empty($field\_value)) {

 

295

                                                        $locations\[\] = $field\_value;

 

296

                                                        $location = $Winter\_MVC\_WDK->location\_m->get($field\_value, TRUE);

 

297

                                                       

 

298

                                                        while(!empty($location->parent\_id)) {

 

299

                                                            $location = $Winter\_MVC\_WDK->location\_m->get($location->parent\_id, TRUE);

 

300

                                                            $locations\[\] = $location->idlocation;

 

301

                                                        }

 

302

                                                        krsort($locations);

 

303

                                                    } else {

 

304

                                                        $locations\[\] = 0;

 

305

                                                    }

 

306

                                           

 

307

                                                    wp\_enqueue\_style('wdk-treefield-dropdown');

 

308

                                                    wp\_enqueue\_script('wdk-treefield-dropdown');

 

309

                                                    wp\_enqueue\_style( 'dashicons' );

 

310

                                           

 

311

                                                    $level\_max = $Winter\_MVC\_WDK->location\_m->get\_max\_level();

 

312

                                                   

 

313

                                                    $placeholder = \[

 

314

                                                        0 => esc\_html\_\_('Select Country','wpdirectorykit'),

 

315

                                                        1 => esc\_html\_\_('Select City','wpdirectorykit'),

 

316

                                                        2 => esc\_html\_\_('Select Neighborhood','wpdirectorykit'),

 

317

                                                        3 => esc\_html\_\_('Select Sub Area','wpdirectorykit'),

 

318

                                                        4 => esc\_html\_\_('Select Sub Area','wpdirectorykit'),

 

319

                                                        5 => esc\_html\_\_('Select Sub Area','wpdirectorykit'),

 

320

                                                    \];

 

321

                                                    ?>

 

322

 

323

                                                    <input name="<?php echo esc\_attr($field\_key); ?>" type="hidden" value="<?php echo esc\_attr($field\_value); ?> wdk\_field\_id\_location">

 

324

                                                    <?php

 

325

                                                        $level = 0;

 

326

                                                        $current = NULL;

 

327

                                                       

 

328

                                                        foreach ($locations as $location) {

 

329

                                                            $current = $Winter\_MVC\_WDK->location\_m->get($location, TRUE);

 

330

 

331

                                                            $list = $Winter\_MVC\_WDK->location\_m->get\_by(array('parent\_id = '.$current->parent\_id => NULL));

 

332

 

333

                                                            if(isset($placeholder\[$level\])) {

 

334

                                                                $values\_list = array(''=> $placeholder\[$level\]);

 

335

                                                            } else {

 

336

                                                                $values\_list = array(''=> esc\_html\_\_('Select Sub Area','wpdirectorykit'));

 

337

                                                            }

 

338

 

339

                                                            foreach ($list as $list\_value) {

 

340

                                                                $values\_list\[$list\_value->idlocation\] = $list\_value->location\_title;

 

341

                                                            }

 

342

                                                            ?>

 

343

 

344

                                                            <div data-level="<?php echo esc\_attr($level);?>" data-field="<?php echo esc\_attr($field\_key); ?>" class="wdk\_multi\_treefield\_dropdown wdk\_treefield\_dropdown">

 

345

                                                                <div class="wdk-field-group">

 

346

                                                                    <?php echo wmvc\_select\_option('location\_'.$level, $values\_list, $location, 'class="wdk-control"');?>

 

347

                                                                </div>

 

348

                                                            </div>

 

349

 

350

                                                            <?php

 

351

                                                            $level++;

 

352

                                                        }

 

353

                                                       

 

354

                                                        if($level<$level\_max ) {

 

355

                                                            for (; $level<$level\_max;) {

 

356

                                                           

 

357

                                                            if(isset($placeholder\[$level\])) {

 

358

                                                                $values\_list = array(''=> $placeholder\[$level\]);

 

359

                                                            } else {

 

360

                                                                $values\_list = array(''=> esc\_html\_\_('Select Sub Area','wpdirectorykit'));

 

361

                                                            }

 

362

 

363

                                                               

 

364

                                                            if(isset($placeholder\[$level\])) {

 

365

                                                                $values\_list = array(''=> $placeholder\[$level\]);

 

366

                                                            } else {

 

367

                                                                $values\_list = array(''=> esc\_html\_\_('Select Sub Area','wpdirectorykit'));

 

368

                                                            }

 

369

                                                               

 

370

                                                            if($location) {

 

371

                                                                $list = $Winter\_MVC\_WDK->location\_m->get\_by(array('parent\_id = '.$location => NULL));

 

372

                                                                foreach ($list as $list\_value) {

 

373

                                                                    $values\_list\[$list\_value->idlocation\] = $list\_value->location\_title;

 

374

                                                                }

 

375

                                                                $location = NULL;

 

376

                                                            }

 

377

                                                   

 

378

                                                                ?>

 

379

                                                                <div data-level="<?php echo esc\_attr($level);?>" data-field="<?php echo esc\_attr($field\_key); ?>" class="wdk\_multi\_treefield\_dropdown wdk\_treefield\_dropdown">

 

380

                                                                    <div class="wdk-field-group">

 

381

                                                                        <?php echo wmvc\_select\_option('location\_'.$level, $values\_list, NULL, 'class="wdk-control"');?>

 

382

                                                                    </div>

 

383

                                                                </div>

 

384

                                                   

 

385

                                                                <?php

 

386

                                                                $level++;

 

387

                                                            }

 

388

                                                        }

 

389

                                                    ?>

 

390

                                                </td>

 

391

                                            </tr>

 

392

                                            <?php else: ?>

 

393

                                                <tr>

 

394

                                                    <th scope="row"><label for="category\_id"><?php echo \_\_('Category', 'wpdirectorykit'); ?><?php if(wdk\_get\_option('wdk\_listing\_category\_required')):?>\*<?php endif;?></label></th>

 

395

                                                    <td >

 

396

                                                        <?php

 

397

                                                            echo wmvc\_select\_option('location\_id', $locations, wmvc\_show\_data('location\_id', $db\_data, ''), "id='location\_id'", \_\_('Not Selected', 'wpdirectorykit'));

 

398

                                                        ?>

 

399

                                                    </td>

 

400

                                                </tr>

 

401

                                            <?php endif; ?>

183

402

                                    <?php endif; ?>

184

403

…

…

 

273

492

                                    </tr>

274

493

                                    <?php endif;?>

275

 

                                    <tr class='hidden'>

276

 

                                        <th scope="row"><label for="location\_id"><?php echo \_\_('Address', 'wpdirectorykit'); ?></label></th>

277

 

                                        <td>

278

 

                                            <input name="lat" type="text" id="input\_lat" value="<?php echo wmvc\_show\_data('lat', $db\_data, ''); ?>" class="regular-text" placeholder="<?php echo esc\_html\_\_('lat', 'wpdirectorykit');?>">

279

 

                                            <input name="lng" type="text" id="input\_lng" value="<?php echo wmvc\_show\_data('lng', $db\_data, ''); ?>" class="regular-text" placeholder="<?php echo esc\_html\_\_('lng', 'wpdirectorykit');?>">

280

 

                                        </td>

281

 

                                    </tr>

282

494

                                    <tr>

283

495

                                        <th scope="row"><label for="slug"><?php echo \_\_('Slug', 'wpdirectorykit'); ?></label></th>

…

…

 

298

510

                                <br/>

299

511

                                <p class="alert alert-info"><?php echo esc\_html\_\_('Drag and drop pin to desired location','wpdirectorykit');?></p>

 

512

                                <div class="wdk-field-edit inline">

 

513

                                    <label for="listing\_gps"><?php echo esc\_html\_\_('GPS','wpdirectorykit');?>:</label>

 

514

                                    <div class="wdk-field-container">

 

515

                                        <input name="lat" readonly="readonly" type="text" id="input\_lat" value="<?php echo wmvc\_show\_data('lat', $db\_data, ''); ?>" class="regular-text" placeholder="<?php echo esc\_html\_\_('lat', 'wpdirectorykit');?>">

 

516

                                        <input name="lng" readonly="readonly" type="text" id="input\_lng" value="<?php echo wmvc\_show\_data('lng', $db\_data, ''); ?>" class="regular-text" placeholder="<?php echo esc\_html\_\_('lng', 'wpdirectorykit');?>">

 

517

                                    </div>

 

518

                                </div>

300

519

                            <?php endif;?>

301

520

                        </div>
  • wpdirectorykit/trunk/application/views/wdk_messages/index.php

    r2907164

    r2917413

30

30

                <input type="hidden" name="page" value="wdk\_messages" />

31

31

                <label class="screen-reader-text" for="search"><?php echo \_\_('Filter by keyword', 'wpdirectorykit'); ?></label>

32

 

                <input type="text" name="search" id="search" class="postform left" value="<?php echo wmvc\_show\_data('search', $db\_data, ''); ?>" placeholder="<?php echo \_\_('Filter by keyword', 'wpdirectorykit'); ?>" />

 

32

                <input type="text" name="search" id="search" class="postform left" value="<?php echo esc\_attr(wmvc\_show\_data('search', $db\_data, '')); ?>" placeholder="<?php echo \_\_('Filter by keyword', 'wpdirectorykit'); ?>" />

33

33

34

34

                <label class="screen-reader-text" for="user\_id\_editor"><?php echo esc\_html\_\_('Filter by user', 'wpdirectorykit'); ?></label>
  • wpdirectorykit/trunk/application/views/wdk_settings/index.php

    r2905795

    r2917413

15

15

<div class="wrap wdk-wrap">

16

16

    <h1 class="wp-heading-inline"><?php echo \_\_('Settings', 'wpdirectorykit'); ?></h1>

17

 

    <br /><br />

 

17

    <br />

18

18

    <div class="wdk-body">

19

19

        <form method="post" action="" novalidate="novalidate">

20

20

            <?php wp\_nonce\_field( 'wdk-settings-edit', '\_wpnonce'); ?>

 

21

            <?php

 

22

                $form->messages('class="alert alert-danger"',  \_\_('Successfully saved', 'wpdirectorykit'));

 

23

            ?>

 

24

            <?php if(!get\_option('wdk\_results\_page')):?>

 

25

                <p class="alert alert-info"><?php echo \_\_('Missing results page', 'wpdirectorykit'); ?></p>

 

26

            <?php endif;?>

 

27

 

28

            <div class="wdk-tabs-navs">

 

29

                <label for="wdk\_tab\_general" class="active"><?php echo esc\_html\_\_('General','wpdirectorykit');?></label>

 

30

                <label for="wdk\_tab\_apis"><?php echo esc\_html\_\_('Api-s','wpdirectorykit');?></label>

 

31

                <label for="wdk\_tab\_templates"><?php echo esc\_html\_\_('Templates','wpdirectorykit');?></label>

 

32

                <label for="wdk\_tab\_fields"><?php echo esc\_html\_\_('Fields','wpdirectorykit' );?></label>

 

33

                <label for="wdk\_tab\_tools"><?php echo esc\_html\_\_('Tools','wpdirectorykit' );?></label>

 

34

            </div>

21

35

            <div class="postbox" style="display: block;">

22

 

                <div class="postbox-header">

23

 

                    <h3><?php echo \_\_('General Settings', 'wpdirectorykit'); ?></h3>

24

 

                </div>

25

36

                <div class="inside">

26

 

                    <?php

27

 

                    $form->messages('class="alert alert-danger"',  \_\_('Successfully saved', 'wpdirectorykit'));

28

 

                    ?>

29

 

                    <?php if(!get\_option('wdk\_results\_page')):?>

30

 

                        <p class="alert alert-info"><?php echo \_\_('Missing results page', 'wpdirectorykit'); ?></p>

31

 

                    <?php endif;?>

32

 

                    <?php echo wdk\_generate\_fields($fields, $db\_data); ?>   

33

 

                    <div class="wdk-field-edit">

34

 

                        <a href="<?php echo get\_admin\_url() . "admin.php?page=wdk\_settings&function=remove&\_wpnonce=".wp\_create\_nonce( 'remove-data'); ?>"

35

 

                           

36

 

                            class="button button-primary event-ajax-indicator confirm" id="reset\_data\_field\_button"><?php echo \_\_('Remove plugin data (Listings, fields, location, categories)','wpdirectorykit'); ?></a>               

37

 

                        <span class="wdk-ajax-indicator wdk-infinity-load color-primary dashicons dashicons-update-alt hidden" style="margin-top: 4px;margin-left: 4px;"></span>             

38

 

                    </div>

39

 

                    <div class="wdk-field-edit">

40

 

                        <a href="<?php echo get\_admin\_url() . "admin.php?page=wdk\_settings&function=import\_demo"; ?>" class="button button-primary" id="import\_demo\_field\_button"><?php echo \_\_('Import Demo Data','wpdirectorykit'); ?></a>

41

 

                    </div>

42

 

                    <div class="wdk-field-edit">

43

 

                        <a href="#" class="button button-primary" id="generate\_listings\_images\_path"><?php echo \_\_('Generate Listings Images Path','wpdirectorykit'); ?></a>               

44

 

                    </div>

45

 

                    <div class="wdk-field-edit">

46

 

                        <a href="#" class="button button-primary" id="optimization\_listingfields\_table"><?php echo \_\_('Optimization Listing Fields Table','wpdirectorykit'); ?></a>               

47

 

                    </div>

48

 

                    <div class="wdk-field-edit">

49

 

                        <a href="#" class="button button-primary ajax\_query" data-function="generated\_strings"><?php echo \_\_('Generate translation strings','wpdirectorykit'); ?></a>               

 

37

                    <div class="wdk-tabs-panel">

 

38

                        <input type="radio" class="wdk-tab-input" name="wdk\_tabs" id="wdk\_tab\_general" checked value="1">

 

39

                        <div class="wdk-tab">

 

40

                            <?php echo wdk\_generate\_fields($fields\_list\_tabs\['general'\], $db\_data); ?> 

 

41

                        </div>

 

42

 

43

                        <input type="radio" class="wdk-tab-input" name="wdk\_tabs" id="wdk\_tab\_apis" value="1">

 

44

                        <div class="wdk-tab">

 

45

                            <?php echo wdk\_generate\_fields($fields\_list\_tabs\['apis'\], $db\_data); ?> 

 

46

                        </div>

 

47

 

48

                        <input type="radio" class="wdk-tab-input" name="wdk\_tabs" id="wdk\_tab\_templates" value="1">

 

49

                        <div class="wdk-tab">

 

50

                            <?php echo wdk\_generate\_fields($fields\_list\_tabs\['templates'\], $db\_data); ?> 

 

51

                        </div>

 

52

 

53

                        <input type="radio" class="wdk-tab-input" name="wdk\_tabs" id="wdk\_tab\_fields" value="1">

 

54

                        <div class="wdk-tab">

 

55

                            <?php echo wdk\_generate\_fields($fields\_list\_tabs\['fields'\], $db\_data); ?> 

 

56

                        </div>

 

57

 

58

                        <input type="radio" class="wdk-tab-input" name="wdk\_tabs" id="wdk\_tab\_tools" value="1">

 

59

                        <div class="wdk-tab">

 

60

                            <div class="wdk-field-edit">

 

61

                                <a href="<?php echo get\_admin\_url() . "admin.php?page=wdk\_settings&function=remove&\_wpnonce=".wp\_create\_nonce( 'remove-data'); ?>"

 

62

                                class="button button-primary event-ajax-indicator confirm" id="reset\_data\_field\_button"><?php echo \_\_('Remove plugin data (Listings, fields, location, categories)','wpdirectorykit'); ?></a>               

 

63

                                <span class="wdk-ajax-indicator wdk-infinity-load color-primary dashicons dashicons-update-alt hidden" style="margin-top: 4px;margin-left: 4px;"></span>             

 

64

                            </div>

 

65

                            <div class="wdk-field-edit">

 

66

                                <a href="<?php echo get\_admin\_url() . "admin.php?page=wdk\_settings&function=import\_demo"; ?>" class="button button-primary" id="import\_demo\_field\_button"><?php echo \_\_('Import Demo Data','wpdirectorykit'); ?></a>

 

67

                            </div>

 

68

                            <div class="wdk-field-edit">

 

69

                                <a href="#" class="button button-primary" id="generate\_listings\_images\_path"><?php echo \_\_('Generate Listings Images Path','wpdirectorykit'); ?></a>               

 

70

                            </div>

 

71

                            <div class="wdk-field-edit">

 

72

                                <a href="#" class="button button-primary" id="optimization\_listingfields\_table"><?php echo \_\_('Optimization Listing Fields Table','wpdirectorykit'); ?></a>               

 

73

                            </div>

 

74

                            <div class="wdk-field-edit">

 

75

                                <a href="#" class="button button-primary ajax\_query" data-function="generated\_strings"><?php echo \_\_('Generate translation strings','wpdirectorykit'); ?></a>               

 

76

                            </div>

 

77

                        </div>

50

78

                    </div>

51

79

                </div>
  • wpdirectorykit/trunk/elementor-elements/classes/wdk-field-value.php

    r2898501

    r2917413

214

214

                        $tree\_data = $this->WMVC->category\_m->get(wdk\_field\_value ($this->data\['settings'\]\['field\_id'\], $wdk\_listing\_id), TRUE);

215

215

                        $this->data\['field\_value'\] = wmvc\_show\_data('category\_title', $tree\_data);

 

216

 

217

                        if(get\_option('wdk\_multi\_categories\_other\_enable', FALSE))

 

218

                            if(wdk\_field\_value ('categories\_list', $wdk\_listing\_id)){

 

219

                                $other\_categories = wdk\_generate\_other\_categories\_fast(wdk\_field\_value ('categories\_list', $wdk\_listing\_id));

 

220

                                if(!empty($other\_categories))

 

221

                                $this->data\['field\_value'\] .=', '.join(', ',$other\_categories);

 

222

                            }

 

223

216

224

                    }

217

225

                }

…

…

 

221

229

                        $tree\_data = $this->WMVC->location\_m->get(wdk\_field\_value ($this->data\['settings'\]\['field\_id'\], $wdk\_listing\_id), TRUE);

222

230

                        $this->data\['field\_value'\] = wmvc\_show\_data('location\_title', $tree\_data);

 

231

                       

 

232

                        if(get\_option('wdk\_multi\_locations\_other\_enable', FALSE))

 

233

                            if(wdk\_field\_value ('locations\_list', $wdk\_listing\_id)){

 

234

                                $other\_locations = wdk\_generate\_other\_locations\_fast(wdk\_field\_value ('locations\_list', $wdk\_listing\_id));

 

235

                                if(!empty($other\_locations))

 

236

                                $this->data\['field\_value'\] .=', '.join(', ',$other\_locations);

 

237

                            }

 

238

223

239

                    }

224

240

                }
  • wpdirectorykit/trunk/elementor-elements/classes/wdk-listing-map.php

    r2863657

    r2917413

567

567

        wp\_enqueue\_script('wdk-notify');

568

568

        wp\_enqueue\_style( 'wdk-listings-map' );

 

569

 

570

        wp\_enqueue\_style('slick');

 

571

        wp\_enqueue\_style('slick-theme');

 

572

        wp\_enqueue\_style('wdk-hover');

 

573

        wp\_enqueue\_script('slick');

569

574

    }

570

575

}
  • wpdirectorykit/trunk/elementor-elements/classes/wdk-map.php

    r2904689

    r2917413

1125

1125

        wp\_enqueue\_script('wdk-notify');

1126

1126

        wp\_enqueue\_style( 'wdk-listings-map' );

 

1127

       

 

1128

        wp\_enqueue\_style('slick');

 

1129

        wp\_enqueue\_style('slick-theme');

 

1130

        wp\_enqueue\_style('wdk-hover');

 

1131

        wp\_enqueue\_script('slick');

1127

1132

    }

1128

1133
  • wpdirectorykit/trunk/elementor-elements/views/wdk-listing-map.php

    r2863657

    r2917413

79

79

    <?php if(is\_numeric($lng)):?>

80

80

        <?php

81

 

        $pin\_icon = "";

82

81

        $font\_class = "fa fa-home";

83

 

        $font\_icon = "";

 

82

        $font\_icon = $this->generate\_icon($settings\['conf\_custom\_map\_pin\_icon'\]);

 

83

        $pin\_icon = $settings\['conf\_custom\_map\_pin'\]\['url'\];

84

84

85

85

        if(!empty(wdk\_field\_value('category\_id', $wdk\_listing\_id))){
  • wpdirectorykit/trunk/elementor-elements/views/wdk-map.php

    r2904689

    r2917413

77

77

        $pin\_icon = "";

78

78

        $font\_class = "";

79

 

        $font\_class = "";

80

79

        $font\_icon = $this->generate\_icon($settings\['conf\_custom\_map\_pin\_icon'\]);

81

80

        $pin\_icon = $settings\['conf\_custom\_map\_pin'\]\['url'\];

…

…

 

90

89

        } else {

91

90

            $font\_class = "";

92

 

            $font\_icon = "";

93

91

        }

 

92

94

93

        ?>

95

94

        <?php if(!empty($settings\['custom\_marker\_fields'\]) &&  substr($this->data\['settings'\]\['custom\_marker\_fields'\], strpos($this->data\['settings'\]\['custom\_marker\_fields'\],'\_\_')+2) == 'first\_image'):?>
  • wpdirectorykit/trunk/elementor-extensions/class-contact-form.php

    r2904689

    r2917413

294

294

295

295

                $attr = '';

296

 

                if(get\_option('wdk\_bookings\_calendar\_single')) {

 

296

                if(get\_option('wdk\_bookings\_calendar\_single') && !wmvc\_show\_data('is\_hour\_enabled',$calendar, false)) {

297

297

                    $attr = "data-wdksingle = 'true'";

 

298

                } else {

 

299

                                   

 

300

                    $custom\_css = '.daterangepicker .drp-calendar.left .calendar-table::after {

 

301

                        content: "'.\_\_('Please select from date/time','wpdirectorykit').'";

 

302

                    }';

 

303

                                   

 

304

                    $custom\_css .= '.daterangepicker .drp-calendar.right .calendar-table::after {

 

305

                        content: "'.\_\_('Please select to date/time','wpdirectorykit').'";

 

306

                    }';

 

307

 

308

                    wp\_add\_inline\_style( 'daterangepicker', $custom\_css);

298

309

                }

299

310
  • wpdirectorykit/trunk/filters.php

    r2865563

    r2917413

438

438

   

439

439

}

 

440

 

441

add\_filter( 'plugin\_action\_links\_wpdirectorykit/wpdirectorykit.php', 'wdk\_buy\_link' );

 

442

function wdk\_buy\_link( $links ) {

 

443

    // Build and escape the URL.

 

444

    $url = esc\_url( get\_admin\_url().'admin.php?page=wdk\_addons' );

 

445

    // Create the link.

 

446

    $settings\_link = "<a style=\\"color:rgb(0, 163, 42);font-weight:bold;\\" href='$url'>" . \_\_( 'Check Premium Features', 'wpdirectorykit') . '</a>';

 

447

    // Adds the link to the end of the array.

 

448

    $links\[\] = $settings\_link;

 

449

    return $links;

 

450

}

 

451

 

452

440

453

?>
  • wpdirectorykit/trunk/tgm-pa/class-tgm-plugin-activation.php

    r2740824

    r2917413

1132

1132

                }

1133

1133

 

1134

                if(isset($plugin\['has\_notices'\]) && false === $plugin\['has\_notices'\]){

 

1135

                    continue;

 

1136

                }

 

1137

               

1134

1138

                if ( ! $this->is\_plugin\_installed( $slug ) ) {

1135

1139

                    if ( current\_user\_can( 'install\_plugins' ) ) {
  • wpdirectorykit/trunk/wpdirectorykit.php

    r2907164

    r2917413

17

17

 \* Plugin URI:        https://wpdirectorykit.com/plugins/wpdirectorykit.html

18

18

 \* Description:       Build your Directory portal, demos for Real Estate Agency and Car Dealership included

19

 

 \* Version:           1.2.3

 

19

 \* Version:           1.2.4

20

20

 \* Requires PHP:      5.6

21

21

 \* Author:            wpdirectorykit.com

…

…

 

26

26

 \* Domain Path:       /languages

27

27

 \*

28

 

 \* Elementor tested up to: 3.12.1

29

 

 \* Elementor Pro tested up to: 3.13.1

 

28

 \* Elementor tested up to: 3.13.3

 

29

 \* Elementor Pro tested up to: 3.14.3

30

30

 \*

31

31

 \*/

…

…

 

41

41

 \* Rename this for your plugin and update it as you release new versions.

42

42

 \*/

43

 

define( 'WPDIRECTORYKIT\_VERSION', '1.2.3' );

 

43

define( 'WPDIRECTORYKIT\_VERSION', '1.2.4' );

44

44

define( 'WPDIRECTORYKIT\_NAME', 'wdk' );

45

45

define( 'WPDIRECTORYKIT\_PATH', plugin\_dir\_path( \_\_FILE\_\_ ) );

CVE: Latest News

CVE-2023-50976: Transactions API Authorization by oleiman · Pull Request #14969 · redpanda-data/redpanda
CVE-2023-6905
CVE-2023-6903
CVE-2023-6904
CVE-2023-3907