Changeset 1767694
- Timestamp:
- 11/16/2017 08:06:25 AM (8 years ago)
- Location:
- fontiran/trunk
- Files:
-
- 4 edited
-
assets/css/admin.css (modified) (3 diffs)
-
fontiran.php (modified) (1 diff)
-
inc/functions.php (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fontiran/trunk/assets/css/admin.css
r1511527 r1767694 1 .wrap.cp { 2 padding: 10px;background-color: #34495E;margin-bottom: 10px;border-radius: 5px; 3 } 4 5 .lcwp_opt_block { 6 margin: 0 0 35px; 7 } 8 .lcwp_opt_table td { 1 .notice, div.error, div.updated {margin:10px 0;} 2 #fontiran { 3 position: relative; 4 background: #fff; 5 padding: 10px 20px; 6 border: 1px solid #e5e5e5; 7 -webkit-box-shadow: 0 1px 1px rgba(0,0,0,.04); 8 box-shadow: 0 1px 1px rgba(0,0,0,.04); 9 10 } 11 .fti-table { 12 } 13 #fontiran table th { 14 font-weight: bold !important; 15 } 16 17 .field_row { 18 display:block; 19 } 20 .del {width: 50px;} 21 22 23 24 #fontiran .subsubsub li { 25 float: right; 26 margin: 5px 0 0; 27 border: 1px solid #ddd; 28 border-radius: 4px 4px 0 0; 29 padding: 10px 15px; 30 border-top: 2px solid #ddd; 31 } 32 #fontiran .subsubsub li:first-child { 33 border-top: 2px solid #028302; 34 border-bottom-color: #fff; 35 } 36 #fontiran .subsubsub li a { 37 font-size: 14px; 38 color: #333; 39 } 40 #fontiran .subsubsub li > span {display:none;} 41 42 43 44 .fontiran_panel { 45 border: 1px solid #ddd; 46 margin-top: -1px; 47 padding: 15px; 48 } 49 50 51 52 /* Table */ 53 54 .clearfix:before, .clearfix:after { 55 content: ""; 56 display: table; 57 } 58 .clearfix:after { 59 clear: both; 60 } 61 62 .fi_fontlist { 63 border: 1px solid #eee; 64 border-radius: 4px; 65 padding: 10px 15px; 66 } 67 .fi_fontlist h2 { 68 font-size: 18px; 69 } 70 .font-row { 71 display: block; 72 padding: 10px 0; 73 border-bottom: 1px solid #fff; 74 border-top: 1px solid #E9E9E9; 75 color: #444444; 76 margin-bottom: 20px; 77 } 78 .font-show, .font-option { 79 position: relative; 80 width: 100%; 81 clear: both; 82 } 83 .font-bop, .font-del { 84 float: right; 85 padding: 5px 10px; 86 } 87 .font-name { 88 width: auto; 89 } 90 .font-prv { 91 width: auto; 92 font-size: 13px; 93 } 94 .font-miniop { 95 position: absolute; 96 top: 0; 97 left: 0; 98 } 99 .font-del span { 100 display: block; 101 margin: auto; 102 height: 15px; 103 width: 15px; 104 background: url(../img/del_icons.png) no-repeat bottom left transparent; 105 cursor: pointer; 106 } 107 .font-del span:hover { 108 background-position: top left; 109 } 110 111 112 113 .font-option {display:none;} 114 115 116 117 118 119 120 121 122 123 124 .fi-del-rule { 125 display: block; 126 margin: auto; 127 height: 15px; 128 width: 15px; 129 background: url(../img/del_icons.png) no-repeat bottom left transparent; 130 cursor: pointer; 131 } 132 .fi-del-rule:hover { 133 background-position: top left; 134 } 135 136 137 138 #rules_table td { 139 position: relative; 9 140 padding: 10px 0; 10 141 vertical-align: middle; 11 142 background: #fdfdfd; 12 143 border-bottom: 1px solid #fff; 13 144 border-top: 1px solid #E9E9E9; 14 145 color: #444444; 15 }16 .lcwp_opt_table td label {17 padding-left: 7px !important;18 }19 .lcwp_form h2 {20 padding-bottom: 5px;21 border-bottom: 1px solid #DFDFDF;22 }23 .lcwp_form h3 {24 border-bottom: 1px solid #DFDFDF;25 padding: 10px 1.4em;26 margin: 20px 0 0;27 }28 .lcwp_form ul {29 margin: 0;30 }31 .lcwp_form li {32 padding: 15px 1.4em;33 border-bottom: 1px solid #DFDFDF;34 border-top: 1px solid #FFFFFF;35 margin: 0;36 }37 .lcwp_form label {38 display: inline-block;39 width: 270px;40 padding-right: 20px;41 }42 .lcwp_form label.longlabel {43 display: block;44 }45 .lcwp_form .fieldlegend {46 color: #666;47 font-style: italic;48 font-family: sans-serif;49 font-size: 12px;50 padding-left: 10px;51 }52 .lcwp_form .jui_slider {53 display: inline-block;54 width: 260px;55 }56 .lcwp_form .jui_slider .lcwp_slider {57 width: 150px;58 float: left;59 margin-top: 8px;60 margin-right: 15px;61 }62 .lcwp_form .jui_slider input {63 width: 50px;64 padding: 3px;65 text-align: center;66 margin-right: 5px;67 }68 69 .lcwp_form #user_form table td {70 padding: 0 20px;71 width: 340px;72 vertical-align: top;73 }74 75 .lcwp_form #lcwp_bar_text_ifr {76 background-color: #fff;77 }78 79 .lcwp_form .elements {80 margin-left: 1.4em !important;81 margin-right: 1.4em !important;82 }83 .lcwp_req_field {84 color: #F30;85 }86 .lcwp_field_legend {87 padding-left: 20px;88 color: #666;89 font-family: sans-serif;90 font-size: 12px;91 font-style: italic;92 }93 94 .lcwp_infobox {95 border-radius: 4px 4px 4px 4px;96 margin: 10px 1.4em 0;97 padding: 15px 10px;98 border: 1px solid #AACEE6;99 background-color: #F0F5FB;100 }101 .lcwp_infobox strong {102 display: inline-block;103 min-width: 80px;104 padding-right: 10px;105 line-height: 20px;106 }107 108 109 #lcwp_ulist_filter {110 width: 200px;111 }112 #lcwp_ulist_action {113 width: 130px;114 }115 .v_divider {116 padding: 0 5px;117 }118 .lcwp_trigger {119 cursor: pointer;120 }121 .del_lcwp_user {122 color: #21759B;123 }124 .del_lcwp_user:hover {125 color: #d54e21;126 }127 .lcwp_form optgroup {128 padding-top: 2px;129 }130 .lcwp_form optgroup option {131 padding-left: 7px !important;132 }133 134 .lcwp_table .content_row td {135 padding-top: 7px;136 padding-bottom: 7px;137 }138 #lcwp_cats_wrap input {139 margin-bottom: -2px;140 146 } 141 147 … … 173 179 174 180 175 .lcwp_loading { 176 display: inline-block; 177 background: url(../img/loader.gif) no-repeat top left transparent; 178 width: 20px; 179 height: 20px; 180 margin-bottom: -4px; 181 } 182 183 184 185 /************************** */ 186 187 .cp_font_preview { 188 padding-left: 40px; 189 font-size: 27px; 190 } 191 .cp_del_font { 192 width: 35px; 193 } 194 .cp_del_font span { 195 display: block; 196 margin: auto; 197 height: 15px; 198 width: 15px; 199 background: url(../img/del_icons.png) no-repeat bottom left transparent; 200 cursor: pointer; 201 } 202 .cp_del_font span:hover { 203 background-position: top left; 204 } 205 #rules_table td, 206 .cp_font_list_table td { 207 vertical-align: middle; 208 background-color: #fff; 209 } 210 #rules_table tr:hover td, 211 .cp_font_list_table tr:hover td { 212 background-color: #fdfdfd; 213 } 214 #rules_table input, 215 #rules_table select { 216 margin-left: 5px; 217 width: 90%; 218 } 219 .cp_size_choose input, 220 .cp_line_height input { 221 width: 40% !important; 222 } 223 .cp_size_choose select, 224 .cp_line_height select { 225 width: 43% !important; 226 margin-left: -5px !important; 227 } 228 .cp_del_rule { 229 display: block; 230 margin: auto; 231 height: 15px; 232 width: 15px; 233 background: url(../img/del_icons.png) no-repeat bottom left transparent; 234 cursor: pointer; 235 } 236 .cp_del_rule:hover { 237 background-position: top left; 238 } 239 .cp_move_rule { 240 display: block; 241 margin: auto; 242 height: 30px; 243 width: 30px; 244 background: url(../img/move_icons.png) no-repeat bottom left transparent; 245 cursor: move; 246 } 247 .cp_move_rule:hover { 248 background-position: top left; 249 } 250 .mce-ico.mce-i-cp_btn { 251 display: inline-block !important; 252 width: 20px !important; 253 height: 20px !important; 254 background: url(../img/cp_icon_tinymce.png) no-repeat top left transparent !important; 255 } 256 257 .lcwp_opt_block p.submit { 258 margin: 10px 10px; 259 float: left; 260 padding: 0; 261 } 181 182 /*---------------------------- 183 The file upload form 184 -----------------------------*/ 185 186 .cp-upload {text-align:center;} 187 .cp-upload #package_file { 188 width: 100%; 189 padding: 40px 50px; 190 margin-bottom: 15px; 191 border: 5px dashed #ddd; 192 border-radius: 3px; 193 text-align: center; 194 text-transform: uppercase; 195 color:#7f858a; 196 } 197 .cp-upload span{ 198 text-align: center; 199 color: #b0b0b0; 200 } 201 202 /* Font Manager */ 203 204 .fi-page-title { 205 background: url(../img/mg-logo.png) no-repeat bottom right transparent; 206 padding-right: 40px; 207 line-height: 35px; 208 209 } 210 211 212 262 213 .fontiran-backup { 263 214 display: block; … … 270 221 height: auto; 271 222 } 272 /* colorpicker */ 273 #mColorPicker { 274 z-index: 9999 !important; 275 } 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 /* fontiran manager page styles */ 239 240 #rules_table td.fi-row-num { 241 background:#333; 242 color:#fff; 243 padding: 20px; 244 } 245 .fi-move-rule { 246 display: none; 247 position: absolute; 248 margin: auto; 249 height: 30px; 250 width: 30px; 251 background: url(../img/icons.png) no-repeat top left transparent; 252 cursor: move; 253 top: 25px; 254 right: 8px; 255 } 256 257 #rules_table td.fi-row-num:hover .fi-move-rule{display: block;} 258 259 .cp_size_choose input, .cp_line_height input { 260 width: 40% !important; 261 } 262 263 .fi-manager-box { 264 background: #fff; 265 box-shadow: 0 1px 3px #9E9E9E; 266 } 267 .fi-manager-box * { 268 box-sizing: border-box; 269 } 270 .fi-title-box { 271 padding: 10px 15px; 272 border-bottom: 1px solid #ddd; 273 } 274 275 .fi-title-box h3 { 276 margin: 0; 277 278 } 279 280 .fi-row-box { 281 display: block; 282 width: 100%; 283 position: relative; 284 border-bottom: 1px solid #eee; 285 } 286 287 .fi-row-box .fi-grid { 288 float: right; 289 padding: 10px; 290 } 291 292 .fi-name-row { 293 width: 20%; 294 padding-left: 20px; 295 font-family: Segoe UI; 296 font-weight: bold; 297 } 298 .fi-name-row span { 299 margin-right: 30px; 300 } 301 .fi-active-row { 302 position: absolute; 303 top: 10px; 304 right: 10px; 305 } 306 307 .fi-dis-row { 308 width: 70%; 309 padding: 0 10px; 310 } 311 312 313 .fi-tools-row { 314 width: 10%; 315 text-align: left; 316 317 } 318 .fi-tools-row ul li { 319 display: inline-block; 320 margin: 0 2px; 321 cursor: pointer; 322 } 323 324 .fi-tools-row ul li.show,.fi-tools-row ul li:hover {color: red;} 325 326 327 .fi-content-row { 328 display:none; 329 float: right; 330 width: 100%; 331 background-color: #f7f7f7; 332 padding: 10px; 333 } 334 335 .bb { 336 float: right; 337 padding: 0 20px; 338 width: 25%; 339 } 340 341 .fi-subject-row { 342 float: right; 343 width: 100%; 344 } 345 .fi-subject-row p.show-code { 346 background: #eee; 347 border: 1px solid #ddd; 348 margin: 0; 349 padding: 10px; 350 text-align: left; 351 direction: ltr; 352 font-family: Consolas; 353 font-style: normal; 354 color: #8d8d8d; 355 } 356 357 358 359 360 .fi-opt-block { 361 width: 100%; 362 margin: 10px 0; 363 display: table; 364 } 365 #fi_loading { 366 float: right; 367 margin: 15px 10px; 368 } 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 /* 385 colpick Color Picker / colpick.com 386 */ 387 388 /*Main container*/ 389 .colpick { 390 position: absolute; 391 width: 346px; 392 height: 170px; 393 overflow: hidden; 394 display: none; 395 font-family: Arial, Helvetica, sans-serif; 396 background:#ebebeb; 397 border: 1px solid #bbb; 398 -webkit-border-radius: 5px; 399 -moz-border-radius: 5px; 400 border-radius: 5px; 401 402 /*Prevents selecting text when dragging the selectors*/ 403 -webkit-user-select: none; 404 -moz-user-select: none; 405 -ms-user-select: none; 406 -o-user-select: none; 407 user-select: none; 408 } 409 /*Color selection box with gradients*/ 410 .colpick_color { 411 position: absolute; 412 left: 7px; 413 top: 7px; 414 width: 156px; 415 height: 156px; 416 overflow: hidden; 417 outline: 1px solid #aaa; 418 cursor: crosshair; 419 } 420 .colpick_color_overlay1 { 421 position: absolute; 422 left:0; 423 top:0; 424 width: 156px; 425 height: 156px; 426 -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ffffff', endColorstr='#00ffffff')"; /* IE8 */ 427 background: -moz-linear-gradient(left, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%); /* FF3.6+ */ 428 background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(255,255,255,1)), color-stop(100%,rgba(255,255,255,0))); /* Chrome,Safari4+ */ 429 background: -webkit-linear-gradient(left, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); /* Chrome10+,Safari5.1+ */ 430 background: -o-linear-gradient(left, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); /* Opera 11.10+ */ 431 background: -ms-linear-gradient(left, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); /* IE10+ */ 432 background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%); 433 filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ffffff', endColorstr='#00ffffff'); /* IE6 & IE7 */ 434 } 435 .colpick_color_overlay2 { 436 position: absolute; 437 left:0; 438 top:0; 439 width: 156px; 440 height: 156px; 441 -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#00000000', endColorstr='#000000')"; /* IE8 */ 442 background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%); /* FF3.6+ */ 443 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,1))); /* Chrome,Safari4+ */ 444 background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* Chrome10+,Safari5.1+ */ 445 background: -o-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* Opera 11.10+ */ 446 background: -ms-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* IE10+ */ 447 background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* W3C */ 448 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#000000',GradientType=0 ); /* IE6-9 */ 449 } 450 /*Circular color selector*/ 451 .colpick_selector_outer { 452 background:none; 453 position: absolute; 454 width: 11px; 455 height: 11px; 456 margin: -6px 0 0 -6px; 457 border: 1px solid black; 458 border-radius: 50%; 459 } 460 .colpick_selector_inner{ 461 position: absolute; 462 width: 9px; 463 height: 9px; 464 border: 1px solid white; 465 border-radius: 50%; 466 } 467 /*Vertical hue bar*/ 468 .colpick_hue { 469 position: absolute; 470 top: 6px; 471 left: 175px; 472 width: 19px; 473 height: 156px; 474 border: 1px solid #aaa; 475 cursor: n-resize; 476 } 477 /*Hue bar sliding indicator*/ 478 .colpick_hue_arrs { 479 position: absolute; 480 left: -8px; 481 width: 35px; 482 height: 7px; 483 margin: -7px 0 0 0; 484 } 485 .colpick_hue_larr { 486 position:absolute; 487 width: 0; 488 height: 0; 489 border-top: 6px solid transparent; 490 border-bottom: 6px solid transparent; 491 border-left: 7px solid #858585; 492 } 493 .colpick_hue_rarr { 494 position:absolute; 495 right:0; 496 width: 0; 497 height: 0; 498 border-top: 6px solid transparent; 499 border-bottom: 6px solid transparent; 500 border-right: 7px solid #858585; 501 } 502 /*New color box*/ 503 .colpick_new_color { 504 position: absolute; 505 left: 207px; 506 top: 6px; 507 width: 60px; 508 height: 27px; 509 background: #f00; 510 border: 1px solid #8f8f8f; 511 } 512 /*Current color box*/ 513 .colpick_current_color { 514 position: absolute; 515 left: 277px; 516 top: 6px; 517 width: 60px; 518 height: 27px; 519 background: #f00; 520 border: 1px solid #8f8f8f; 521 } 522 /*Input field containers*/ 523 .colpick_field, .colpick_hex_field { 524 position: absolute; 525 height: 20px; 526 width: 60px; 527 overflow:hidden; 528 background:#f3f3f3; 529 color:#b8b8b8; 530 font-size:12px; 531 border:1px solid #bdbdbd; 532 -webkit-border-radius: 3px; 533 -moz-border-radius: 3px; 534 border-radius: 3px; 535 } 536 .colpick_rgb_r { 537 top: 40px; 538 left: 207px; 539 } 540 .colpick_rgb_g { 541 top: 67px; 542 left: 207px; 543 } 544 .colpick_rgb_b { 545 top: 94px; 546 left: 207px; 547 } 548 .colpick_hsb_h { 549 top: 40px; 550 left: 277px; 551 } 552 .colpick_hsb_s { 553 top: 67px; 554 left: 277px; 555 } 556 .colpick_hsb_b { 557 top: 94px; 558 left: 277px; 559 } 560 .colpick_hex_field { 561 width: 68px; 562 left: 207px; 563 top: 121px; 564 } 565 /*Text field container on focus*/ 566 .colpick_focus { 567 border-color: #999; 568 } 569 /*Field label container*/ 570 .colpick_field_letter { 571 position: absolute; 572 width: 12px; 573 height: 20px; 574 line-height: 20px; 575 padding-left: 4px; 576 background: #efefef; 577 border-right: 1px solid #bdbdbd; 578 font-weight: bold; 579 color:#777; 580 } 581 /*Text inputs*/ 582 .colpick_field input, .colpick_hex_field input { 583 position: absolute; 584 right: 11px; 585 margin: 0; 586 padding: 0; 587 height: 20px; 588 line-height: 20px; 589 background: transparent; 590 border: none; 591 font-size: 12px; 592 font-family: Arial, Helvetica, sans-serif; 593 color: #555; 594 text-align: right; 595 outline: none; 596 } 597 .colpick_hex_field input { 598 right: 4px; 599 } 600 /*Field up/down arrows*/ 601 .colpick_field_arrs { 602 position: absolute; 603 top: 0; 604 right: 0; 605 width: 9px; 606 height: 21px; 607 cursor: n-resize; 608 } 609 .colpick_field_uarr { 610 position: absolute; 611 top: 5px; 612 width: 0; 613 height: 0; 614 border-left: 4px solid transparent; 615 border-right: 4px solid transparent; 616 border-bottom: 4px solid #959595; 617 } 618 .colpick_field_darr { 619 position: absolute; 620 bottom:5px; 621 width: 0; 622 height: 0; 623 border-left: 4px solid transparent; 624 border-right: 4px solid transparent; 625 border-top: 4px solid #959595; 626 } 627 /*Submit/Select button*/ 628 .colpick_submit { 629 position: absolute; 630 left: 207px; 631 top: 149px; 632 width: 130px; 633 height: 22px; 634 line-height:22px; 635 background: #efefef; 636 text-align: center; 637 color: #555; 638 font-size: 12px; 639 font-weight:bold; 640 border: 1px solid #bdbdbd; 641 -webkit-border-radius: 3px; 642 -moz-border-radius: 3px; 643 border-radius: 3px; 644 } 645 .colpick_submit:hover { 646 background:#f3f3f3; 647 border-color:#999; 648 cursor: pointer; 649 } 650 651 /*full layout with no submit button*/ 652 .colpick_full_ns .colpick_submit, .colpick_full_ns .colpick_current_color{ 653 display:none; 654 } 655 .colpick_full_ns .colpick_new_color { 656 width: 130px; 657 height: 25px; 658 } 659 .colpick_full_ns .colpick_rgb_r, .colpick_full_ns .colpick_hsb_h { 660 top: 42px; 661 } 662 .colpick_full_ns .colpick_rgb_g, .colpick_full_ns .colpick_hsb_s { 663 top: 73px; 664 } 665 .colpick_full_ns .colpick_rgb_b, .colpick_full_ns .colpick_hsb_b { 666 top: 104px; 667 } 668 .colpick_full_ns .colpick_hex_field { 669 top: 135px; 670 } 671 672 /*rgbhex layout*/ 673 .colpick_rgbhex .colpick_hsb_h, .colpick_rgbhex .colpick_hsb_s, .colpick_rgbhex .colpick_hsb_b { 674 display:none; 675 } 676 .colpick_rgbhex { 677 width:282px; 678 direction: ltr; 679 } 680 .colpick_rgbhex .colpick_field, .colpick_rgbhex .colpick_submit { 681 width:68px; 682 } 683 .colpick_rgbhex .colpick_new_color { 684 width:34px; 685 border-right:none; 686 } 687 .colpick_rgbhex .colpick_current_color { 688 width:34px; 689 left:240px; 690 border-left:none; 691 } 692 693 /*rgbhex layout, no submit button*/ 694 .colpick_rgbhex_ns .colpick_submit, .colpick_rgbhex_ns .colpick_current_color{ 695 display:none; 696 } 697 .colpick_rgbhex_ns .colpick_new_color{ 698 width:68px; 699 border: 1px solid #8f8f8f; 700 } 701 .colpick_rgbhex_ns .colpick_rgb_r { 702 top: 42px; 703 } 704 .colpick_rgbhex_ns .colpick_rgb_g { 705 top: 73px; 706 } 707 .colpick_rgbhex_ns .colpick_rgb_b { 708 top: 104px; 709 } 710 .colpick_rgbhex_ns .colpick_hex_field { 711 top: 135px; 712 } 713 714 /*hex layout*/ 715 .colpick_hex .colpick_hsb_h, .colpick_hex .colpick_hsb_s, .colpick_hex .colpick_hsb_b, .colpick_hex .colpick_rgb_r, .colpick_hex .colpick_rgb_g, .colpick_hex .colpick_rgb_b { 716 display:none; 717 } 718 .colpick_hex { 719 width:206px; 720 height:201px; 721 } 722 .colpick_hex .colpick_hex_field { 723 width:72px; 724 height:25px; 725 top:168px; 726 left:80px; 727 } 728 .colpick_hex .colpick_hex_field div, .colpick_hex .colpick_hex_field input { 729 height: 25px; 730 line-height: 25px; 731 } 732 .colpick_hex .colpick_new_color { 733 left:9px; 734 top:168px; 735 width:30px; 736 border-right:none; 737 } 738 .colpick_hex .colpick_current_color { 739 left:39px; 740 top:168px; 741 width:30px; 742 border-left:none; 743 } 744 .colpick_hex .colpick_submit { 745 left:164px; 746 top: 168px; 747 width:30px; 748 height:25px; 749 line-height: 25px; 750 } 751 752 /*hex layout, no submit button*/ 753 .colpick_hex_ns .colpick_submit, .colpick_hex_ns .colpick_current_color { 754 display:none; 755 } 756 .colpick_hex_ns .colpick_hex_field { 757 width:80px; 758 } 759 .colpick_hex_ns .colpick_new_color{ 760 width:60px; 761 border: 1px solid #8f8f8f; 762 } 763 764 /*Dark color scheme*/ 765 .colpick_dark { 766 background: #161616; 767 border-color: #2a2a2a; 768 } 769 .colpick_dark .colpick_color { 770 outline-color: #333; 771 } 772 .colpick_dark .colpick_hue { 773 border-color: #555; 774 } 775 .colpick_dark .colpick_field, .colpick_dark .colpick_hex_field { 776 background: #101010; 777 border-color: #2d2d2d; 778 } 779 .colpick_dark .colpick_field_letter { 780 background: #131313; 781 border-color: #2d2d2d; 782 color: #696969; 783 } 784 .colpick_dark .colpick_field input, .colpick_dark .colpick_hex_field input { 785 color: #7a7a7a; 786 } 787 .colpick_dark .colpick_field_uarr { 788 border-bottom-color:#696969; 789 } 790 .colpick_dark .colpick_field_darr { 791 border-top-color:#696969; 792 } 793 .colpick_dark .colpick_focus { 794 border-color:#444; 795 } 796 .colpick_dark .colpick_submit { 797 background: #131313; 798 border-color:#2d2d2d; 799 color:#7a7a7a; 800 } 801 .colpick_dark .colpick_submit:hover { 802 background-color:#101010; 803 border-color:#444; 804 } -
fontiran/trunk/fontiran.php
r1511527 r1767694 1 1 <?php 2 /* 3 Plugin Name: FontIRAN_fonts_Installation 4 Plugin URI: http://fontiran.com 5 Description: نصب فونت برای تارنمای شما بدون نیاز به تغییرات دستی در کدها 6 Author: caduspro 7 Version: 1.0 8 Author URI: http://caduspro.com/ 9 */ 2 3 /** 4 * Plugin Name: Fontiran 5 * Plugin URI: http://caduspro.com/ 6 * Description: install web fonts ... 7 * Version: 1.1 8 * Author: Cadus Pro 9 * Author URI: http://caduspro.com 10 * License: GPL-2.0+ 11 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt 12 * soon==Domain Path: /languages 13 */ 14 15 // Exit if accessed directly. 16 if ( ! defined( 'ABSPATH' ) ) exit; 17 18 define( 'FIRAN_URL', plugin_dir_url( __FILE__ ) ); 19 define( 'FIRAN_PATH', plugin_dir_path(__FILE__) ); 20 define( 'FIRAN_FONTS_URL', FIRAN_URL .'/fonts' ); 10 21 11 22 12 ///////////////////////////////////////////// 13 /////// MAIN DEFINES //////////////////////// 14 ///////////////////////////////////////////// 23 class Fontiran { 24 25 public function __construct() { 26 27 $this->includes(); 15 28 29 //add_action('plugins_loaded',array( $this, 'fontiran_textdomain')); 30 add_action('admin_menu', array($this, 'register_plugin_menu') ); 31 add_action( 'admin_enqueue_scripts', array($this, 'fontiran_admin_style') ); 32 add_action( 'wp_enqueue_scripts', array($this, 'fontiran_enqueue') ); 33 } 34 35 36 public function fontiran_enqueue() { 37 if(file_exists(FIRAN_PATH . 'fontiran_front.css')) { 38 wp_enqueue_style("fontiran", FIRAN_URL . 'fontiran.css'); 39 wp_enqueue_style("fontiran_fonts", FIRAN_URL . 'fontiran_front.css'); 40 } 41 } 42 43 44 function fontiran_textdomain() { 45 $textdomain = 'fontiran'; 46 $locale = ''; 47 if ( empty( $locale ) ) { 48 if ( is_textdomain_loaded( $textdomain ) ) { 49 return true; 50 } else { 51 return load_plugin_textdomain( $textdomain, false, plugin_basename( dirname( __FILE__ ) ) . '/languages' ); 52 } 53 } else { 54 return load_textdomain( $textdomain, FIRAN_PATH . 'languages/' . $textdomain . '-' . $locale . '.mo' ); 55 } 56 } 57 58 16 59 17 define( 'CP_DIR', plugin_dir_path(__FILE__) ); 18 define( 'CP_URL', plugin_dir_url(__FILE__)); 19 20 ///////////////////////////////////////////// 21 /////// MAIN SCRIPT & CSS INCLUDES ////////// 22 ///////////////////////////////////////////// 23 24 // global script enqueuing 25 function cp_global_scripts() { 26 require_once(CP_DIR . '/inc/functions.php'); 60 function register_plugin_menu(){ 61 add_menu_page ( esc_html__( 'Fontiran Settings', 'fontiran' ) , esc_html__( 'fontiran', 'fontiran' ) , 'manage_options' , 'fontiran' , array( $this,'fti_set_fonts') ); 62 add_submenu_page('fontiran', esc_html__( 'install Font', 'fontiran' ), esc_html__( 'install Font', 'fontiran' ) , 'manage_options', 'fti_upload', array( $this, 'fti_upload' )); 63 } 27 64 28 wp_enqueue_script("jquery"); 65 public function fti_set_fonts() { 66 include_once FIRAN_PATH .'inc/class-manager-fonts.php'; 67 } 68 public function fti_upload () { 69 include_once FIRAN_PATH .'inc/class-add-font.php'; 70 } 29 71 30 // admin css & js 31 if (is_admin()) { 32 wp_enqueue_style('cp_admin', CP_URL . '/assets/css/admin.css'); 33 // colorpicker 34 wp_enqueue_style( 'cp-colpick', CP_URL.'/assets/css/colpick.css', 999); 72 //inculde 73 function includes(){ 74 require_once FIRAN_PATH .'inc/functions.php'; 35 75 36 wp_enqueue_script( 'jquery-ui-sortable' ); 76 } 77 /* 78 * Load js and css 79 */ 80 function fontiran_admin_style(){ 81 // CSS for button styling 82 wp_enqueue_style("fontiran_style", FIRAN_URL . 'assets/css/admin.css'); 83 wp_enqueue_style("fontiran_colpick", FIRAN_URL . 'assets/css/colpick.css'); 84 wp_enqueue_script('color-picker', FIRAN_URL. 'assets/js/jscolor.min.js', array('jquery', 'jquery-ui-sortable') ); 85 wp_enqueue_script('fontiran-admin-js', FIRAN_URL . 'assets/js/admin.js' ); 37 86 } 38 87 } 39 add_action( 'init', 'cp_global_scripts' );40 88 41 function cp_font_styles () { 42 if (!is_admin()) { 43 // frontend enabled webfonts 44 cp_enqueue_enabled_webfont(); 45 } 46 if (!is_admin()) { 47 if(!get_option('cp_inline_code')) { 48 // frontend css 49 wp_enqueue_style('cp_fontiran', CP_URL.'fontiran.css', '2.4'); 50 51 } 52 } 53 54 } 55 add_action( 'wp_footer', 'cp_font_styles' ); 56 57 58 /////////////////////////////////////// 59 // INLINE CSS AND JS FOR BAD SERVERS 60 61 function cp_inline_code(){ 62 echo '<style type="text/css">'; 63 include_once(CP_DIR.'/frontend.php'); 64 echo '</style>'; 65 } 66 function cp_admin_actions() { 67 $menu_img = CP_URL.'/assets/img/fontiran.png'; 68 $capability = 'install_plugins'; 69 70 add_menu_page('فونت ایران', 'فونت ایران', $capability,'cp_settings','cp_new_font',$menu_img); 71 72 // submenus 73 add_submenu_page('cp_settings', 'افزودن فونت', 'افزودن فونت', $capability, 'cp_settings', 'cp_new_font'); 74 add_submenu_page('cp_settings', 'تنظیم فونت', 'تنظیم فونت', $capability, 'cp_manager', 'cp_manager'); 75 } 76 add_action('admin_menu', 'cp_admin_actions'); 77 78 function cp_manager() { include_once(CP_DIR . '/inc/manager.php'); } 79 function cp_new_font() { include_once(CP_DIR . '/inc/fonts.php'); } 80 include_once(CP_DIR . '/ajax.php'); 81 function cp_init_actions() { 82 83 include(CP_DIR . '/inc/functions.php'); 84 85 if(!get_option('cp_webfonts')) { 86 if(!get_option('cp_webfonts')) { add_option( 'cp_webfonts', '255', '', 'yes' ); } 87 update_option('cp_webfonts'); 88 } 89 90 // create CSS and JS or set the inline flag 91 if(!cp_create_frontend_files()) { 92 if(!get_option('cp_inline_code')) { add_option('cp_inline_code', '255', '', 'yes'); } 93 update_option('cp_inline_code', 1); 94 } 95 else {delete_option('cp_inline_code');} 96 97 return true; 98 } 99 register_activation_hook('','cp_init_actions'); 89 $Fontiran = new Fontiran(); -
fontiran/trunk/inc/functions.php
r1511527 r1767694 1 1 <?php 2 2 3 // string to url format 4 function cp_stringToUrl($string){ 5 $trans = array("à" => "a", "è" => "e", "é" => "e", "ò" => "o", "ì" => "i", "ù" => "u"); 6 $string = trim(strtr($string, $trans)); 7 $string = preg_replace('/[^a-zA-Z0-9-.]/', '_', $string); 8 $string = preg_replace('/-+/', "_", $string); 9 $string = str_replace(array('.', '#'), '_', $string); 10 11 while( substr($string, 0, 1) == '_') { 12 $string = substr($string, 1); 13 } 14 15 return $string; 16 } 17 // normalize a url string 18 function cp_urlToName($string) { 19 $string = ucwords(str_replace('_', ' ', $string)); 20 return $string; 21 } 22 // remove enabled font during deletion 23 function cp_remove_enabled($to_remove, $opt_name) { 24 $array = get_option($opt_name); 25 if(!$array) {return false;} 26 27 $new_array = $array; 28 foreach($array as $key => $data) { 29 if($to_remove == $key) { 30 unset($new_array[$key]); 31 break; 32 } 33 } 34 35 if(count($new_array) > 0) {update_option($opt_name, $new_array);} 36 else {delete_option($opt_name);} 37 38 return true; 39 } 40 //////////////////////////////////////////////////////////// 41 42 function cp_get_enabled_fonts($type, $selected = false) { 43 $opts = ''; 44 if($type == 'webfonts') { 45 $webfont_list = get_option('cp_webfonts_enabled'); 46 if($webfont_list) { 47 48 foreach($webfont_list as $webfont) { 49 ($selected == $webfont) ? $sel = 'selected="selected"' : $sel = ''; 50 $opts .= '<option value="'.$webfont.'" '.$sel.'>'.$webfont.'</option>'; 3 4 function cp_var($file, $die = false, $type = 'var_dump') { 5 echo '<pre dir="ltr">'; 6 $type($file); 7 echo '</pre>'; 8 if($die == true) die(); 9 10 } 11 12 13 function get_static_option() { 14 // fields options 15 $elements = array( 16 'All content page' => 'html,body,div,header,footer,h1,h1 a,h2,h2 a,h3,h3 a,h4,h4 a,h5,h5 a,h6,h6 a,p', 17 'Body page' => 'body', 18 'Heading' => 'h1,h1 a,h2,h2 a,h3,h3 a,h4,h4 a,h5,h5 a,h6,h6 a', 19 'Links' => 'a', 20 'Paragraphs' => 'p', 21 'Blockquote' => 'blockquote', 22 'Codes' => 'code', 23 //'asd' => 'asdsadadkbqdqkd' 24 ); 25 26 return $elements = apply_filters('fontiran_setting_options', $elements); 27 } 28 29 function fi_get_fontlist () { 30 $fontlist = get_option('fontiran'); 31 return $fontlist; 32 } 33 34 35 function fi_fonts_name ($output = 'array', $selected = false) { 36 37 38 $fontlist = fi_get_fontlist(); 39 40 if (empty($fontlist)) return; 41 42 $fonts_name = array(); 43 for($i=0;$i<count($fontlist);$i++) { 44 $fonts_name[$i] = $fontlist[$i]['font']; 45 } 46 47 // remove duplicate names 48 $fonts_name = array_unique($fonts_name); 49 50 if($output == 'html') { 51 $html = ''; 52 foreach($fonts_name as $key => $val) { 53 54 55 ($selected == $val) ? $sel = 'selected="selected"' : $sel = ''; 56 $html .= '<option value="'.$val.'" '.$sel.'>'.$val.'</option>'; 51 57 } 52 53 }else { $opts .= '<option value="inherit">فونتی نصب نیست</option>';} 54 } 55 return $opts; 56 } 57 58 59 // elements array for main setting 60 function cp_get_elements($return = 'array', $selected = false) { 61 $elements = array( 62 'html,body,div,header,footer,h1,h1 a,h2,h2 a,h3,h3 a,h4,h4 a,h5,h5 a,h6,h6 a,p' => 'تمام محتوا', 63 'body' => 'بدنه تارنما', 64 'h1,h1 a,h2,h2 a,h3,h3 a,h4,h4 a,h5,h5 a,h6,h6 a' => 'سربرگ ها', 65 'a' => 'لینک ها', 66 'p' => 'متن ها', 67 'blockquote' => 'نقل قول ها', 68 'code' => 'کدها', 69 ); 70 71 if($return == 'html') { 72 $html_el = ''; 73 foreach($elements as $key => $val) { 74 ($selected == $key) ? $sel = 'selected="selected"' : $sel = ''; 75 $html_el .= '<option value="'.$key.'" '.$sel.'>'.$val.'</option>'; 76 } 77 return $html_el; 78 } 79 else {return $elements;} 80 } 81 82 83 // font types array for main setting 84 function cp_get_fontypes($return = 'array', $selected = true) { 85 $elements = array( 86 'webfonts' => 'Web Fonts', 87 ); 88 return $elements; 89 } 90 91 // font size types array for main setting 92 function cp_get_fontsize_types($return = 'array', $selected = false) { 93 $elements = array( 94 'px' => 'px', 95 'em' => 'em', 96 '%' => '%', 97 'pt' => 'pt' 98 ); 99 100 if($return == 'html') { 101 $html_el = ''; 102 foreach($elements as $key => $val) { 103 ($selected == $key) ? $sel = 'selected="selected"' : $sel = ''; 104 $html_el .= '<option value="'.$key.'" '.$sel.'>'.$val.'</option>'; 105 } 106 return $html_el; 107 } 108 else {return $elements;} 109 } 110 // general rules - form creator per row 111 function cp_rule_row_form($data) { 112 if(!$data) {return false;} 113 114 // basic block 115 elseif($data == 'basic_row') { 116 $html = ' 117 <tr> 118 <td> 119 <span class="cp_del_rule"></span> 120 </td> 121 <td> 122 <span class="cp_move_rule"></span> 123 </td> 124 <td style="width: 200px;"> 125 <input type="hidden" name="element_custom[]" value="custom" /> 126 کلاس های سفارشی 127 </td> 128 <td> 129 <input type="text" name="element_subj[]" /> 130 </td> 131 <td> 132 <input type="hidden" name="font_type[]" value="webfonts" /> 133 <select name="font_name[]""> 134 '.cp_get_enabled_fonts('webfonts').' 135 </select> 136 </td> 137 <td class="cp_size_choose"> 138 <input type="text" name="font_size[]" value="" /> 139 <select name="font_size_type[]">'. cp_get_fontsize_types('html') .'</select> 140 </td> 141 <td> 142 <div class="lcwp_colpick"> 143 <span class="lcwp_colblock"></span> 144 <input type="text" name="text_color[]" value="" /> 145 </div> 146 </td> 147 </tr> 148 '; 149 } 150 151 // recreation from WP option 152 else { 153 $html = ''; 154 155 foreach($data as $rules) { 156 $html .= ' 157 <tr> 158 <td> 159 <span class="cp_del_rule"></span> 160 </td> 161 <td> 162 <span class="cp_move_rule"></span> 163 </td> 164 <td style="width: 200px;"> 165 <select name="element[]" class="choose_element"> 166 '.cp_get_elements('html', $rules['element']).' 167 </select> 168 </td> 169 <td>'; 170 171 // subject 172 if($rules['element'] != 'custom') { 173 $html .= ' 174 <input type="hidden" name="element_subj[]" value="'.$rules['element'].'" /> 175 <span>'.$rules['element'].'</span>'; 176 } 177 else {$html .= '<input type="text" name="element_subj[]" value="'.$rules['subj'].'" />';} 178 179 // font type 180 $html .= ' 181 </td> 182 <input type="hidden" name="font_type[]" value="webfonts" /> 183 <td>'; 184 185 // font name 186 $html .= ' 187 <select name="font_name[]"> 188 <option value="">گزینش فونت</option>'. 189 cp_get_enabled_fonts($rules['font_type'], $rules['font_name']). 190 '</select>'; 191 $html .= ' 192 </td> 193 <td class="cp_size_choose"> 194 '; 195 196 // font size 197 if($rules['element'] == 'custom') { 198 $html .= ' 199 <input type="text" name="font_size[]" value="'.$rules['font_size'].'" /> 200 <select name="font_size_type[]"> 201 '.cp_get_fontsize_types('html', $rules['font_size_type']).' 202 </select>'; 203 } 204 else { 205 $html .= ' 206 <input type="hidden" name="font_size[]" value="" /> 207 <input type="hidden" name="font_size_type[]" value="px" />'; 208 } 209 210 $html .= ' 211 </td> 212 213 '; 214 215 $html .= ' 216 217 <td> 218 <div class="lcwp_colpick"> 219 <span class="lcwp_colblock" style="background-color: '.$rules['text_color'].';"></span> 220 <input type="text" name="text_color[]" value="'.$rules['text_color'].'" /> 221 </div> 222 </td> 223 224 </tr>'; 225 } 226 } 227 228 return $html; 229 } 230 function cp_enqueue_enabled_webfont() { 231 $enabled_list = get_option('cp_webfonts_enabled'); 232 $webfont_list = get_option('cp_webfonts'); 233 234 if($enabled_list) { 235 foreach($enabled_list as $enabled) { 236 $enabled_id = cp_stringToUrl($enabled); 237 wp_enqueue_style('cp_webfont_'.$enabled_id, $webfont_list[$enabled]); 238 } 239 } 240 return true; 241 } 242 ///////////////////////////////////////////////////////////////// 243 244 // create the frontend css 245 function cp_create_frontend_files() { 246 // css 247 ob_start(); 248 require_once(CP_DIR.'/frontend.php'); 249 $css = ob_get_clean(); 250 58 echo $html; 59 60 } else { 61 return $fonts_name; 62 } 63 64 } 65 66 67 68 function fi_create_css($filename = 'fontiran' ,$putdir = '') { 69 70 $font_list = fi_get_fontlist(); 71 if (empty($font_list)) return; 72 73 $css = ''; 74 75 for($i=0;$i<count($font_list);$i++) { 76 77 $url = $font_list[$i]['dir']; 78 $font_name = $font_list[$i]['font']; 79 $font_family = (empty($font_name)) ? '' : 'font-family: "'.$font_name.'";'; 80 $style = (empty($font_list[$i]['style'])) ? '' : 'font-style: '.$font_list[$i]['style'].';'; 81 $weight = (empty($font_list[$i]['weight'])) ? '' : 'font-weight: '.$font_list[$i]['weight'].';'; 82 83 $font_url = $font_list[$i]['files']; 84 $eot = (!empty($font_url['eot'])) ? 'url("'.FIRAN_FONTS_URL . $url.$font_url['eot'].'") format("embedded-opentype")' : ''; 85 86 $dot1 = (!empty($font_url['ttf'])) ? ',' : ''; 87 88 89 $ttf = (!empty($font_url['ttf'])) ? 'url("'.FIRAN_FONTS_URL . $url.$font_url['ttf'].'") format("truetype")' : ''; 90 91 $dot2 = (!empty($font_url['woff'])) ? ',' : ''; 92 93 $woff = (!empty($font_url['woff'])) ? 'url("'.FIRAN_FONTS_URL . $url.$font_url['woff'].'") format("woff")' : ''; 94 95 $dot3 = (!empty($font_url['woff2'])) ? ',' : ''; 96 97 $woff2 = (!empty($font_url['woff2'])) ? 'url("'.FIRAN_FONTS_URL . $url.$font_url['woff2'].'") format("woff2")' : ''; 98 $dot4 = ';'; 99 100 $css .= ' 101 @font-face { 102 '.$font_family.' 103 ' . $style .' 104 '. $weight.' 105 src: '.$eot . $dot1 .' 106 '. $ttf . $dot2 .' 107 '. $woff . $dot3 .' 108 '. $woff2 . $dot4 .' 109 } 110 '; 111 112 } 113 251 114 if(trim($css) != '') { 252 if(!file_put_contents( CP_DIR.'/fontiran.css', $css)) {$error = true;}115 if(!file_put_contents(FIRAN_PATH . $putdir . $filename . '.css', $css)) {$error = true;} 253 116 } else { 254 if(file_exists(CP_DIR.'/fontiran.css')) { unlink(CP_DIR.'/fontiran.css'); } 255 } 256 257 258 259 if(isset($error)) {return false;} 260 else {return true;} 261 } 262 117 if(file_exists(FIRAN_PATH. $putdir . $filename . '.css')) { unlink(FIRAN_PATH. $putdir . $filename . '.css'); } 118 } 119 } 120 121 122 function fi_update_options () { 123 124 $static = get_option('fontiran_static_option'); 125 126 127 $sput = ''; 128 if($static) { 129 130 foreach($static as $option) { 131 132 if($option['stat'] == 'on') { 133 $size = (!empty($option['font_size']) ) ? "font-size: {$option['font_size']}{$option['font_size_type']} !important;" : null; 134 $color = (!empty($option['text_color']) ) ? "color: {$option['text_color']} !important;" : null; 135 $sput .= "{$option['subject']} { font-family: {$option['font_name']} !important;{$size}{$color}}"; 136 137 } 138 } 139 140 } 141 142 143 $custom = get_option('fontiran_custom_option'); 144 if($custom) { 145 146 147 148 foreach($custom as $option) { 149 150 151 if($option['stat'] == 'on') { 152 $size = (!empty($option['font_size']) ) ? "font-size: {$option['font_size']}{$option['font_size_type']} !important;" : null; 153 $color = (!empty($option['text_color']) ) ? "color: {$option['text_color']} !important;" : null; 154 $sput .= "{$option['subject']} { font-family: {$option['font_name']} !important;{$size}{$color}}"; 155 156 } 157 } 158 159 } 160 161 162 163 if(trim($sput) != '') { 164 if(!file_put_contents(FIRAN_PATH . 'fontiran_front.css', $sput)) {$error = true;} 165 } else { 166 if(file_exists(FIRAN_PATH . 'fontiran_front.css')) { unlink(FIRAN_PATH . 'fontiran_front.css'); } 167 } 168 169 } 170 171 172 173 add_action('wp_ajax_fi_add_rule', 'fi_add_rule'); 174 function fi_add_rule() { 175 176 177 if(!isset($_POST['row']) && !is_numeric($_POST['row'])) 178 return; 179 180 $row = $_POST['row']; 263 181 ?> 182 183 <div class="fi-row-box clearfix"> 184 185 <div class="fi-grid fi-name-row"> 186 <div class="fi-active-row"><input name="fi_custom[<?php echo $row; ?>][stat]" class="choose_element" type="checkbox"></div> 187 <span style="font-family:tahoma;">کلاس سفارشی</span> 188 </div> 189 190 <div class="fi-grid fi-dis-row"> 191 <input name="fi_custom[<?php echo $row; ?>][subject]" class="choose_element" value="" type="text" style="width:100%;direction:ltr;"> 192 </div> 193 194 <div class="fi-grid fi-tools-row"> 195 <ul> 196 <li class="tool-more"><i class="fi_icon dashicons-before dashicons-admin-generic"></i></li><li> 197 </li><li class="sort_by"><i class="fi_icon dashicons-before dashicons-admin-tools"></i></li> 198 </ul> 199 </div> 200 201 202 203 <div class="fi-content-row"> 204 205 206 <div class="bb"> 207 <label>نام فونت</label> 208 <select name="fi_custom[<?php echo $row; ?>][font_name]" class="choose_font_type"> 209 <option value="0">گزینش فونت</option> 210 <?php fi_fonts_name('html', $font_name); ?> 211 </select> 212 213 </div> 214 <div class="bb"> 215 <label>اندازه فونت</label> 216 <input name="fi_custom[<?php echo $row; ?>][font_size]" value="" type="number"> 217 218 </div> 219 <div class="bb"> 220 <label>واحد اندازه</label> 221 <select name="fi_custom[<?php echo $row; ?>][font_size_type]" class="choose_element"> 222 <option value="px" selected="selected">px</option><option value="em">em</option><option value="pt">pt</option><option value="%">%</option> </select> 223 </div> 224 <div class="bb"> 225 <label>رنگ بندی</label> 226 <div class="lcwp_colpick"> 227 <span class="lcwp_colblock"></span> 228 <input name="fi_custom[<?php echo $row; ?>][text_color]" value="" type="text"> 229 </div> 230 </div> 231 232 233 234 235 <div class="fi-subject-row"><h3>تگ های انتخاب شده</h3><p class="show-code">code</p></div> 236 237 </div> 238 239 </div> 240 241 <?php 242 die(); 243 } 244 245 246 // Ajax Delete 247 add_action('wp_ajax_fi_delete_webfont', 'fi_delete_webfont_php'); 248 function fi_delete_webfont_php() { 249 $font_name = $_POST['font_name']; 250 $font_weight = $_POST['font_weight']; 251 $font_style = $_POST['font_style']; 252 253 254 255 $font_list = get_option('fontiran'); 256 sort($font_list); 257 for($i = 0; $i < count($font_list); $i++ ) { 258 259 if($font_list[$i]['font'] == $font_name && $font_list[$i]['weight'] == $font_weight && $font_list[$i]['style'] == $font_style ) { 260 $success = true; 261 unset($font_list[$i]); 262 break; 263 } 264 } 265 266 267 268 269 270 271 272 273 274 if(isset($success)) { 275 ksort($font_list); 276 $font_list = array_values($font_list); 277 update_option('fontiran', $font_list); 278 fi_create_css(); 279 echo 'success'; 280 } else { 281 echo 'error'; 282 } 283 284 die(); 285 } 286 -
fontiran/trunk/readme.txt
r1511984 r1767694 5 5 Tags: Fontiran, persian fonts,iransans,change fonts 6 6 Requires at least: 3.3 7 Tested up to: 4. 6.18 Stable tag: 1.07 Tested up to: 4.9 8 Stable tag: 2.0 (Beta) 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 11 12 Here is a short description of the plugin. This should be no more than 150 characters.12 Best Free Font Manager. The usage is basically very simple. 13 13 14 14 == Description == … … 24 24 change web font for any theme 25 25 26 27 = Support = 28 * [Persian Support in caduspro.net](http://caduspro.net/) 29 30 26 31 == Upgrade Notice == 27 32 … … 35 40 == Changelog == 36 41 42 = 2.0 = 43 * بازطراحی اساسی افزونه و آماده سازی برای اپدیت ها بعدی. در این نسخه نیاز است که تمامی تنظیمات را یکبار دیگر انجام دهید. 44 37 45 = 0.1 = 38 46 * Initial release 47 48 49 50 == Upgrade Notice == 51 = 2.0 = 52 * بازطراحی کامل افزونه (نیاز است که یکبار دیگر پیکربندی کنید)
Note: See TracChangeset
for help on using the changeset viewer.