Changeset 1692756
- Timestamp:
- 07/07/2017 11:00:02 PM (9 years ago)
- Location:
- admin-notices-for-team
- Files:
-
- 1 deleted
- 4 edited
-
assets/banner-722x250.png (deleted)
-
trunk/admin/class-ant_admin_notices_team-admin.php (modified) (10 diffs)
-
trunk/admin/css/ant_admin_notices_team-admin.css (modified) (2 diffs)
-
trunk/ant_admin_notices_team.php (modified) (1 diff)
-
trunk/includes/class-ant_admin_notices_team.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
admin-notices-for-team/trunk/admin/class-ant_admin_notices_team-admin.php
r1692007 r1692756 881 881 882 882 } 883 884 /*if ( $field_id == 'toggle-custom-style' ) {885 $id = "customStyle";886 } else if ($field_id == 'font-style') {887 $id = "fontStyle";888 } else {889 $id = '';890 }*/891 883 892 884 ?> … … 1288 1280 } 1289 1281 1290 public function set_transient() {1291 set_transient( "ant-admin-trans", "alive", 3 );1292 }1293 1294 1295 1282 public function notices_showing( ) { 1296 1283 global $current_user; … … 1379 1366 } 1380 1367 1381 function a ad_process_ajax() {1368 function ant_process_ajax() { 1382 1369 1383 1370 if( !isset( $_POST['ant_nonce'] ) || !wp_verify_nonce($_POST['ant_nonce'], 'ant-nonce') ) … … 1385 1372 1386 1373 $user_id = get_current_user_id(); 1387 1388 /*if(!isset($_REQUEST['notice']))1389 die('Notice ID expected as "notice" parameter.');1390 1391 check_ajax_referer('kjm_admin_notices_ajax', '_wpnonce');*/1392 1393 1374 $notice_id = $_REQUEST['notice']; 1394 1375 … … 1410 1391 // Determine if current time is greater than the expiration date 1411 1392 if( $current_time >= $expiration ) { 1412 1413 1393 wp_trash_post($notice_id); 1414 1415 1394 } 1416 1417 1395 } 1418 1396 … … 1423 1401 1424 1402 public function custom_css() { 1425 $options = get_option( $this->plugin_name . '-settings' );1426 1403 $options_design = get_option( $this->plugin_name . '-design-settings' ); 1427 1404 1428 1405 $width = $options_design['notice-width']; 1429 1406 $margin = $options_design['notice-position']; 1430 1431 $font = $options_design['font-style']; 1407 $font = $options_design['font-style']; 1432 1408 $fontSize = $options_design['font-size']; 1433 1409 $fontColor = $options_design['font-color']; … … 1440 1416 1441 1417 1442 if ( $options_design['width-unit'] == 1 ) {1418 if ( $options_design['width-unit'] == 1 ) { 1443 1419 $unit = '%'; 1444 } else {1420 } else { 1445 1421 $unit = 'px'; 1446 }1447 1448 if ( $options_design['border-radius'] >= 50 ) {1422 } 1423 1424 if ( $options_design['border-radius'] >= 50 ) { 1449 1425 $unitRadius = '%'; 1450 } 1451 1452 1426 } 1453 1427 1454 1428 … … 1457 1431 .ant-notice { 1458 1432 width: {$width}{$unit}; 1459 margin-left: {$margin} {$unit};1433 margin-left: {$margin}% !important; 1460 1434 1461 1435 }"; … … 1474 1448 }*/ 1475 1449 1450 if ( $options_design['display-inline'] == 'enabled' ) { 1451 1452 $custom_css .= " 1453 .wrap div.ant-notice, div.ant-notice { 1454 position: static; 1455 display: inline-block; 1456 }"; 1457 } 1458 1476 1459 if ( $options_design['toggle-custom-style'] == 'enabled' ) { 1477 1478 $custom_css = " 1479 .ant-notice-wrap { 1480 display: flex; 1481 } 1482 .ant-notice { 1483 width: {$width}{$unit}; 1484 margin-left: {$margin}{$unit}; 1460 $custom_css .= " 1461 .ant-notice { 1485 1462 font-family: {$font}, Helvetica, sans-serif !important; 1486 1463 font-size: {$fontSize}px !important; … … 1493 1470 } 1494 1471 1495 if ( $options_design['display-inline'] == 'enabled' ) { 1496 1497 $custom_css = " 1498 .ant-notice-wrap { 1499 display: flex; 1472 if ( $options_design['notice-type'] == 1 ) { 1473 $custom_css .= " 1474 div.ant-notice .notice-dismiss { 1475 position: absolute !important; 1476 top: -8px !important; 1477 }"; 1500 1478 } 1501 .wrap div.ant-notice, div.ant-notice {1502 position: static;1503 display: inline-block;1504 width: {$width}{$unit};1505 margin-left: {$margin}{$unit};1506 }1507 div.ant-notice .notice-dismiss {1508 position: relative !important;1509 left: 5% !important1510 }";1511 }1512 1513 if ($options_design['display-inline'] == 'enabled' && $options_design['toggle-custom-style'] == 'enabled') {1514 $custom_css = "1515 .ant-notice-wrap {1516 display: flex;1517 }1518 .wrap div.ant-notice, div.ant-notice {1519 position: static;1520 display: inline-block;1521 width: {$width}{$unit} !important;1522 margin-left: {$margin}{$unit} !important;1523 font-family: {$font}, Helvetica, sans-serif !important;1524 font-size: {$fontSize}px !important;1525 color: {$fontColor} !important;1526 background-color: {$bgColor} !important;1527 border: solid {$border}px {$borderColor} !important;1528 border-radius: {$borderRadius}{$unitRadius} !important;1529 {$customCss}1530 1531 }";1532 }1533 1534 // if ( $authorOptions != $current_user->user_login ) {1535 /*$custom_css .= "1536 div#notice{$notice_id} {1537 1538 display: none !important;1539 1540 }";*/1541 // }1542 1479 1543 1480 wp_add_inline_style( $this->plugin_name, $custom_css ); -
admin-notices-for-team/trunk/admin/css/ant_admin_notices_team-admin.css
r1692007 r1692756 316 316 background: #3E474F; 317 317 border-radius: .25em; 318 top: 1 30%;318 top: 117%; 319 319 color: #EDEFF0; 320 320 --width: 13.5em; … … 361 361 display: none; 362 362 } 363 /*button.ant-notice-dismiss {364 display: none;365 position: absolute;366 right: 0;367 bottom: 15%;368 369 }370 .ant-notice:hover button.ant-notice-dismiss {371 display: block;372 }373 button.ant-notice-dismiss::after {374 display: none;375 background: 0 0;376 color: #72777c;377 text-decoration: none !important;378 content: "\f147";379 font: 400 16px/20px dashicons;380 speak: none;381 height: 20px;382 text-align: center;383 width: 20px;384 -webkit-font-smoothing: antialiased;385 -moz-osx-font-smoothing: grayscale;386 transform: scale(2);387 transition: all 1s;388 }*/389 363 390 364 .ant-notice:hover button.notice-dismiss::after, 391 365 .ant-notice:focus button.notice-dismiss::after{ 392 366 display: block !important; 393 394 } 395 396 367 } 368 369 .ant-notice-wrap { 370 display: flex; 371 } 372 -
admin-notices-for-team/trunk/ant_admin_notices_team.php
r1692007 r1692756 14 14 * 15 15 * @wordpress-plugin 16 * Plugin Name: A dmin Notices for Team16 * Plugin Name: Ant Admin Notices for Team 17 17 * Plugin URI: http://plugwpress.com/ant-notice-documentation/ 18 18 * Description: It provides the capability for administrators and/or editors to create Notices and display it to all users, only to specific authors. 19 * Version: 1.0. 019 * Version: 1.0.1 20 20 * Author: PlugWPress 21 21 * Author URI: http://plugwpress.com -
admin-notices-for-team/trunk/includes/class-ant_admin_notices_team.php
r1692007 r1692756 70 70 71 71 $this->plugin_name = 'ant_admin_notices_team'; 72 $this->version = '1.0. 0';72 $this->version = '1.0.1'; 73 73 74 74 $this->load_dependencies(); … … 174 174 175 175 //Action -> Add Ajax Dismiss Notice 176 $this->loader->add_action( 'wp_ajax_ant_dismiss', $plugin_admin, 'a ad_process_ajax' );176 $this->loader->add_action( 'wp_ajax_ant_dismiss', $plugin_admin, 'ant_process_ajax' ); 177 177 178 178 //Action -> Check if Notice is Expired
Note: See TracChangeset
for help on using the changeset viewer.