Changeset 2474185
- Timestamp:
- 02/13/2021 10:07:37 AM (5 years ago)
- Location:
- advanced-admin-search/trunk
- Files:
-
- 2 added
- 11 edited
-
LICENSE (modified) (1 diff)
-
Makefile (modified) (1 diff)
-
README.md (modified) (2 diffs)
-
advanced-admin-search.php (modified) (6 diffs)
-
css/style.css (modified) (1 diff)
-
index.php (modified) (1 diff)
-
js/jquery-admin-desktop-search.js (modified) (4 diffs)
-
js/jquery-admin-mobile-search.js (modified) (3 diffs)
-
js/jquery-admin-page-search.js (added)
-
menu.php (added)
-
scripts.php (modified) (1 diff)
-
searchbox.php (modified) (1 diff)
-
searchresults.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
advanced-admin-search/trunk/LICENSE
r2207029 r2474185 1 1 GNU GENERAL PUBLIC LICENSE 2 3 2 4 Version 2, June 1991 3 5 6 7 8 9 4 10 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 11 12 5 13 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 14 15 6 16 Everyone is permitted to copy and distribute verbatim copies 17 18 7 19 of this license document, but changing it is not allowed. 8 20 21 22 23 24 9 25 Preamble 10 26 27 28 29 30 11 31 The licenses for most software are designed to take away your 32 33 12 34 freedom to share and change it. By contrast, the GNU General Public 35 36 13 37 License is intended to guarantee your freedom to share and change free 38 39 14 40 software--to make sure the software is free for all its users. This 41 42 15 43 General Public License applies to most of the Free Software 44 45 16 46 Foundation's software and to any other program whose authors commit to 47 48 17 49 using it. (Some other Free Software Foundation software is covered by 50 51 18 52 the GNU Lesser General Public License instead.) You can apply it to 53 54 19 55 your programs, too. 20 56 57 58 59 60 21 61 When we speak of free software, we are referring to freedom, not 62 63 22 64 price. Our General Public Licenses are designed to make sure that you 65 66 23 67 have the freedom to distribute copies of free software (and charge for 68 69 24 70 this service if you wish), that you receive source code or can get it 71 72 25 73 if you want it, that you can change the software or use pieces of it 74 75 26 76 in new free programs; and that you know you can do these things. 27 77 78 79 80 81 28 82 To protect your rights, we need to make restrictions that forbid 83 84 29 85 anyone to deny you these rights or to ask you to surrender the rights. 86 87 30 88 These restrictions translate to certain responsibilities for you if you 89 90 31 91 distribute copies of the software, or if you modify it. 32 92 93 94 95 96 33 97 For example, if you distribute copies of such a program, whether 98 99 34 100 gratis or for a fee, you must give the recipients all the rights that 101 102 35 103 you have. You must make sure that they, too, receive or can get the 104 105 36 106 source code. And you must show them these terms so they know their 107 108 37 109 rights. 38 110 111 112 113 114 39 115 We protect your rights with two steps: (1) copyright the software, and 116 117 40 118 (2) offer you this license which gives you legal permission to copy, 119 120 41 121 distribute and/or modify the software. 42 122 123 124 125 126 43 127 Also, for each author's protection and ours, we want to make certain 128 129 44 130 that everyone understands that there is no warranty for this free 131 132 45 133 software. If the software is modified by someone else and passed on, we 134 135 46 136 want its recipients to know that what they have is not the original, so 137 138 47 139 that any problems introduced by others will not reflect on the original 140 141 48 142 authors' reputations. 49 143 144 145 146 147 50 148 Finally, any free program is threatened constantly by software 149 150 51 151 patents. We wish to avoid the danger that redistributors of a free 152 153 52 154 program will individually obtain patent licenses, in effect making the 155 156 53 157 program proprietary. To prevent this, we have made it clear that any 158 159 54 160 patent must be licensed for everyone's free use or not licensed at all. 55 161 162 163 164 165 56 166 The precise terms and conditions for copying, distribution and 167 168 57 169 modification follow. 58 170 171 172 173 174 59 175 GNU GENERAL PUBLIC LICENSE 176 177 60 178 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 179 180 181 182 183 62 184 0. This License applies to any program or other work which contains 185 186 63 187 a notice placed by the copyright holder saying it may be distributed 188 189 64 190 under the terms of this General Public License. The "Program", below, 191 192 65 193 refers to any such program or work, and a "work based on the Program" 194 195 66 196 means either the Program or any derivative work under copyright law: 197 198 67 199 that is to say, a work containing the Program or a portion of it, 200 201 68 202 either verbatim or with modifications and/or translated into another 203 204 69 205 language. (Hereinafter, translation is included without limitation in 206 207 70 208 the term "modification".) Each licensee is addressed as "you". 71 209 210 211 212 213 72 214 Activities other than copying, distribution and modification are not 215 216 73 217 covered by this License; they are outside its scope. The act of 218 219 74 220 running the Program is not restricted, and the output from the Program 221 222 75 223 is covered only if its contents constitute a work based on the 224 225 76 226 Program (independent of having been made by running the Program). 227 228 77 229 Whether that is true depends on what the Program does. 78 230 231 232 233 234 79 235 1. You may copy and distribute verbatim copies of the Program's 236 237 80 238 source code as you receive it, in any medium, provided that you 239 240 81 241 conspicuously and appropriately publish on each copy an appropriate 242 243 82 244 copyright notice and disclaimer of warranty; keep intact all the 245 246 83 247 notices that refer to this License and to the absence of any warranty; 248 249 84 250 and give any other recipients of the Program a copy of this License 251 252 85 253 along with the Program. 86 254 255 256 257 258 87 259 You may charge a fee for the physical act of transferring a copy, and 260 261 88 262 you may at your option offer warranty protection in exchange for a fee. 89 263 264 265 266 267 90 268 2. You may modify your copy or copies of the Program or any portion 269 270 91 271 of it, thus forming a work based on the Program, and copy and 272 273 92 274 distribute such modifications or work under the terms of Section 1 275 276 93 277 above, provided that you also meet all of these conditions: 94 278 279 280 281 282 95 283 a) You must cause the modified files to carry prominent notices 284 285 96 286 stating that you changed the files and the date of any change. 97 287 288 289 290 291 98 292 b) You must cause any work that you distribute or publish, that in 293 294 99 295 whole or in part contains or is derived from the Program or any 296 297 100 298 part thereof, to be licensed as a whole at no charge to all third 299 300 101 301 parties under the terms of this License. 102 302 303 304 305 306 103 307 c) If the modified program normally reads commands interactively 308 309 104 310 when run, you must cause it, when started running for such 311 312 105 313 interactive use in the most ordinary way, to print or display an 314 315 106 316 announcement including an appropriate copyright notice and a 317 318 107 319 notice that there is no warranty (or else, saying that you provide 320 321 108 322 a warranty) and that users may redistribute the program under 323 324 109 325 these conditions, and telling the user how to view a copy of this 326 327 110 328 License. (Exception: if the Program itself is interactive but 329 330 111 331 does not normally print such an announcement, your work based on 332 333 112 334 the Program is not required to print an announcement.) 113 335 336 337 338 339 114 340 These requirements apply to the modified work as a whole. If 341 342 115 343 identifiable sections of that work are not derived from the Program, 344 345 116 346 and can be reasonably considered independent and separate works in 347 348 117 349 themselves, then this License, and its terms, do not apply to those 350 351 118 352 sections when you distribute them as separate works. But when you 353 354 119 355 distribute the same sections as part of a whole which is a work based 356 357 120 358 on the Program, the distribution of the whole must be on the terms of 359 360 121 361 this License, whose permissions for other licensees extend to the 362 363 122 364 entire whole, and thus to each and every part regardless of who wrote it. 123 365 366 367 368 369 124 370 Thus, it is not the intent of this section to claim rights or contest 371 372 125 373 your rights to work written entirely by you; rather, the intent is to 374 375 126 376 exercise the right to control the distribution of derivative or 377 378 127 379 collective works based on the Program. 128 380 381 382 383 384 129 385 In addition, mere aggregation of another work not based on the Program 386 387 130 388 with the Program (or with a work based on the Program) on a volume of 389 390 131 391 a storage or distribution medium does not bring the other work under 392 393 132 394 the scope of this License. 133 395 396 397 398 399 134 400 3. You may copy and distribute the Program (or a work based on it, 401 402 135 403 under Section 2) in object code or executable form under the terms of 404 405 136 406 Sections 1 and 2 above provided that you also do one of the following: 137 407 408 409 410 411 138 412 a) Accompany it with the complete corresponding machine-readable 413 414 139 415 source code, which must be distributed under the terms of Sections 416 417 140 418 1 and 2 above on a medium customarily used for software interchange; or, 141 419 420 421 422 423 142 424 b) Accompany it with a written offer, valid for at least three 425 426 143 427 years, to give any third party, for a charge no more than your 428 429 144 430 cost of physically performing source distribution, a complete 431 432 145 433 machine-readable copy of the corresponding source code, to be 434 435 146 436 distributed under the terms of Sections 1 and 2 above on a medium 437 438 147 439 customarily used for software interchange; or, 148 440 441 442 443 444 149 445 c) Accompany it with the information you received as to the offer 446 447 150 448 to distribute corresponding source code. (This alternative is 449 450 151 451 allowed only for noncommercial distribution and only if you 452 453 152 454 received the program in object code or executable form with such 455 456 153 457 an offer, in accord with Subsection b above.) 154 458 459 460 461 462 155 463 The source code for a work means the preferred form of the work for 464 465 156 466 making modifications to it. For an executable work, complete source 467 468 157 469 code means all the source code for all modules it contains, plus any 470 471 158 472 associated interface definition files, plus the scripts used to 473 474 159 475 control compilation and installation of the executable. However, as a 476 477 160 478 special exception, the source code distributed need not include 479 480 161 481 anything that is normally distributed (in either source or binary 482 483 162 484 form) with the major components (compiler, kernel, and so on) of the 485 486 163 487 operating system on which the executable runs, unless that component 488 489 164 490 itself accompanies the executable. 165 491 492 493 494 495 166 496 If distribution of executable or object code is made by offering 497 498 167 499 access to copy from a designated place, then offering equivalent 500 501 168 502 access to copy the source code from the same place counts as 503 504 169 505 distribution of the source code, even though third parties are not 506 507 170 508 compelled to copy the source along with the object code. 171 509 510 511 512 513 172 514 4. You may not copy, modify, sublicense, or distribute the Program 515 516 173 517 except as expressly provided under this License. Any attempt 518 519 174 520 otherwise to copy, modify, sublicense or distribute the Program is 521 522 175 523 void, and will automatically terminate your rights under this License. 524 525 176 526 However, parties who have received copies, or rights, from you under 527 528 177 529 this License will not have their licenses terminated so long as such 530 531 178 532 parties remain in full compliance. 179 533 534 535 536 537 180 538 5. You are not required to accept this License, since you have not 539 540 181 541 signed it. However, nothing else grants you permission to modify or 542 543 182 544 distribute the Program or its derivative works. These actions are 545 546 183 547 prohibited by law if you do not accept this License. Therefore, by 548 549 184 550 modifying or distributing the Program (or any work based on the 551 552 185 553 Program), you indicate your acceptance of this License to do so, and 554 555 186 556 all its terms and conditions for copying, distributing or modifying 557 558 187 559 the Program or works based on it. 188 560 561 562 563 564 189 565 6. Each time you redistribute the Program (or any work based on the 566 567 190 568 Program), the recipient automatically receives a license from the 569 570 191 571 original licensor to copy, distribute or modify the Program subject to 572 573 192 574 these terms and conditions. You may not impose any further 575 576 193 577 restrictions on the recipients' exercise of the rights granted herein. 578 579 194 580 You are not responsible for enforcing compliance by third parties to 581 582 195 583 this License. 196 584 585 586 587 588 197 589 7. If, as a consequence of a court judgment or allegation of patent 590 591 198 592 infringement or for any other reason (not limited to patent issues), 593 594 199 595 conditions are imposed on you (whether by court order, agreement or 596 597 200 598 otherwise) that contradict the conditions of this License, they do not 599 600 201 601 excuse you from the conditions of this License. If you cannot 602 603 202 604 distribute so as to satisfy simultaneously your obligations under this 605 606 203 607 License and any other pertinent obligations, then as a consequence you 608 609 204 610 may not distribute the Program at all. For example, if a patent 611 612 205 613 license would not permit royalty-free redistribution of the Program by 614 615 206 616 all those who receive copies directly or indirectly through you, then 617 618 207 619 the only way you could satisfy both it and this License would be to 620 621 208 622 refrain entirely from distribution of the Program. 209 623 624 625 626 627 210 628 If any portion of this section is held invalid or unenforceable under 629 630 211 631 any particular circumstance, the balance of the section is intended to 632 633 212 634 apply and the section as a whole is intended to apply in other 635 636 213 637 circumstances. 214 638 639 640 641 642 215 643 It is not the purpose of this section to induce you to infringe any 644 645 216 646 patents or other property right claims or to contest validity of any 647 648 217 649 such claims; this section has the sole purpose of protecting the 650 651 218 652 integrity of the free software distribution system, which is 653 654 219 655 implemented by public license practices. Many people have made 656 657 220 658 generous contributions to the wide range of software distributed 659 660 221 661 through that system in reliance on consistent application of that 662 663 222 664 system; it is up to the author/donor to decide if he or she is willing 665 666 223 667 to distribute software through any other system and a licensee cannot 668 669 224 670 impose that choice. 225 671 672 673 674 675 226 676 This section is intended to make thoroughly clear what is believed to 677 678 227 679 be a consequence of the rest of this License. 228 680 681 682 683 684 229 685 8. If the distribution and/or use of the Program is restricted in 686 687 230 688 certain countries either by patents or by copyrighted interfaces, the 689 690 231 691 original copyright holder who places the Program under this License 692 693 232 694 may add an explicit geographical distribution limitation excluding 695 696 233 697 those countries, so that distribution is permitted only in or among 698 699 234 700 countries not thus excluded. In such case, this License incorporates 701 702 235 703 the limitation as if written in the body of this License. 236 704 705 706 707 708 237 709 9. The Free Software Foundation may publish revised and/or new versions 710 711 238 712 of the General Public License from time to time. Such new versions will 713 714 239 715 be similar in spirit to the present version, but may differ in detail to 716 717 240 718 address new problems or concerns. 241 719 720 721 722 723 242 724 Each version is given a distinguishing version number. If the Program 725 726 243 727 specifies a version number of this License which applies to it and "any 728 729 244 730 later version", you have the option of following the terms and conditions 731 732 245 733 either of that version or of any later version published by the Free 734 735 246 736 Software Foundation. If the Program does not specify a version number of 737 738 247 739 this License, you may choose any version ever published by the Free Software 740 741 248 742 Foundation. 249 743 744 745 746 747 250 748 10. If you wish to incorporate parts of the Program into other free 749 750 251 751 programs whose distribution conditions are different, write to the author 752 753 252 754 to ask for permission. For software which is copyrighted by the Free 755 756 253 757 Software Foundation, write to the Free Software Foundation; we sometimes 758 759 254 760 make exceptions for this. Our decision will be guided by the two goals 761 762 255 763 of preserving the free status of all derivatives of our free software and 764 765 256 766 of promoting the sharing and reuse of software generally. 257 767 768 769 770 771 258 772 NO WARRANTY 259 773 774 775 776 777 260 778 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 779 780 261 781 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 782 783 262 784 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 785 786 263 787 PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 788 789 264 790 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 791 792 265 793 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 794 795 266 796 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 797 798 267 799 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 800 801 268 802 REPAIR OR CORRECTION. 269 803 804 805 806 807 270 808 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 809 810 271 811 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 812 813 272 814 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 815 816 273 817 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 818 819 274 820 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 821 822 275 823 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 824 825 276 826 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 827 828 277 829 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 830 831 278 832 POSSIBILITY OF SUCH DAMAGES. 279 833 834 835 836 837 280 838 END OF TERMS AND CONDITIONS 281 839 840 841 842 843 282 844 How to Apply These Terms to Your New Programs 283 845 846 847 848 849 284 850 If you develop a new program, and you want it to be of the greatest 851 852 285 853 possible use to the public, the best way to achieve this is to make it 854 855 286 856 free software which everyone can redistribute and change under these terms. 287 857 858 859 860 861 288 862 To do so, attach the following notices to the program. It is safest 863 864 289 865 to attach them to the start of each source file to most effectively 866 867 290 868 convey the exclusion of warranty; and each file should have at least 869 870 291 871 the "copyright" line and a pointer to where the full notice is found. 292 872 873 874 875 876 293 877 <one line to give the program's name and a brief idea of what it does.> 878 879 294 880 Copyright (C) <year> <name of author> 295 881 882 883 884 885 296 886 This program is free software; you can redistribute it and/or modify 887 888 297 889 it under the terms of the GNU General Public License as published by 890 891 298 892 the Free Software Foundation; either version 2 of the License, or 893 894 299 895 (at your option) any later version. 300 896 897 898 899 900 301 901 This program is distributed in the hope that it will be useful, 902 903 302 904 but WITHOUT ANY WARRANTY; without even the implied warranty of 905 906 303 907 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 908 909 304 910 GNU General Public License for more details. 305 911 912 913 914 915 306 916 You should have received a copy of the GNU General Public License along 917 918 307 919 with this program; if not, write to the Free Software Foundation, Inc., 920 921 308 922 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 923 924 925 926 927 310 928 Also add information on how to contact you by electronic and paper mail. 311 929 930 931 932 933 312 934 If the program is interactive, make it output a short notice like this 935 936 313 937 when it starts in an interactive mode: 314 938 939 940 941 942 315 943 Gnomovision version 69, Copyright (C) year name of author 944 945 316 946 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 947 948 317 949 This is free software, and you are welcome to redistribute it 950 951 318 952 under certain conditions; type `show c' for details. 319 953 954 955 956 957 320 958 The hypothetical commands `show w' and `show c' should show the appropriate 959 960 321 961 parts of the General Public License. Of course, the commands you use may 962 963 322 964 be called something other than `show w' and `show c'; they could even be 965 966 323 967 mouse-clicks or menu items--whatever suits your program. 324 968 969 970 971 972 325 973 You should also get your employer (if you work as a programmer) or your 974 975 326 976 school, if any, to sign a "copyright disclaimer" for the program, if 977 978 327 979 necessary. Here is a sample; alter the names: 328 980 981 982 983 984 329 985 Yoyodyne, Inc., hereby disclaims all copyright interest in the program 986 987 330 988 `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 989 990 991 992 993 332 994 <signature of Ty Coon>, 1 April 1989 995 996 333 997 Ty Coon, President of Vice 334 998 999 1000 1001 1002 335 1003 This General Public License does not permit incorporating your program into 1004 1005 336 1006 proprietary programs. If your program is a subroutine library, you may 1007 1008 337 1009 consider it more useful to permit linking proprietary applications with the 1010 1011 338 1012 library. If this is what you want to do, use the GNU Lesser General 1013 1014 339 1015 Public License instead of this License. 1016 1017 -
advanced-admin-search/trunk/Makefile
r2207029 r2474185 1 1 PLUGIN_FILES = $(shell git ls-files) 2 3 4 5 2 6 3 7 TARGET = advanced-admin-search.zip 4 8 9 10 11 12 5 13 $(TARGET): $(PLUGIN_FILES) 14 15 6 16 zip $(TARGET) $(PLUGIN_FILES) 7 17 18 19 20 21 8 22 clean: 23 24 9 25 -$(RM) -r assets/*/node_modules 26 27 10 28 -$(RM) *.zip 11 29 30 31 32 33 12 34 .PHONY: clean 35 36 -
advanced-admin-search/trunk/README.md
r2207029 r2474185 4 4 Tags: advance search, admin search, custom post type search 5 5 Requires at least: 3.9 6 Tested up to: 5. 37 Stable tag: 1.1 6 Tested up to: 5.6.1 7 Stable tag: 1.1.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 59 59 == Changelog == 60 60 61 = 1.1.1 = 62 * Bug Fixes 63 * Dedicated search page support 64 * UI Changes 61 65 = 1.1 = 62 66 * JS bug fix -
advanced-admin-search/trunk/advanced-admin-search.php
r2207029 r2474185 4 4 * Plugin URI: https://www.kuroit.com/product/advanced-admin-search 5 5 * Description: Easily search everything in WordPress admin panel from one single search field. 6 * Version: 1.1 6 * Version: 1.1.1 7 7 * Author: Kuroit 8 8 * Author URI: https://www.kuroit.com … … 10 10 * License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 11 */ 12 12 13 14 13 15 /* The Advanced Admin Search Plugin 14 16 * Advanced Admin Search is a wordpress plugin which adds extra searching feature into admin bar. … … 19 21 20 22 if (!defined('ABSPATH')) { 23 21 24 die();// Exit if accessed directly 25 22 26 } 27 28 require_once plugin_dir_path(__FILE__) . 'searchresults.php'; 29 30 require_once plugin_dir_path(__FILE__) . 'menu.php'; 23 31 24 32 require_once plugin_dir_path(__FILE__) . 'scripts.php'; … … 26 34 require_once plugin_dir_path(__FILE__) . 'searchbox.php'; 27 35 28 require_once plugin_dir_path(__FILE__) . 'searchresults.php'; 36 // Re-direct on plugin activation 29 37 38 add_action( 'activated_plugin', 'Kuroit\AdvancedAdminSearch\AASKP_plugin_activated' ); 39 40 function AASKP_plugin_activated($plugin){ 41 42 if ( plugin_basename( __FILE__ ) === $plugin ) { 43 44 exit( wp_safe_redirect( 'admin.php?page=advanced-admin-search' ) ); 45 46 } 47 48 } 30 49 31 50 class AASKPadvancedAdminSearch 51 32 52 { 33 53 34 54 public function __construct() // instantiation 55 35 56 { 36 57 … … 40 61 41 62 // get the searching data like admin menu, media labraries, post, pages 63 42 64 // and Hook to add javascript. 43 65 … … 53 75 54 76 //fire it up 77 55 78 new AASKPadvancedAdminSearch(); 56 79 -
advanced-admin-search/trunk/css/style.css
r2207029 r2474185 1 1 .adminmenu_search li ul{ 2 3 2 position: absolute; 4 5 3 display: block; 6 7 } 8 4 } 9 5 .advance_search_box { 10 11 6 width: 150px !important; 12 7 height:0px !important; 13 14 } 15 8 } 16 9 .search_list { 17 18 10 float: right; 19 20 11 margin-right: -1px !important; 21 22 } 23 12 } 24 13 .search_list li, .mobile_search_list li { 25 26 14 display: block; 27 28 15 float: none !important; 29 30 16 border-top: 1px solid #fff; 31 32 } 33 34 35 17 } 36 18 .search_list li, .search_list li a, .search_list li a p, .mobile_search_list li, .mobile_search_list li a, .mobile_search_list li a p{ 37 38 19 line-height: 25px !important; 39 40 } 41 42 43 20 } 44 21 ul.search_list{ 45 46 22 height: 500px !important; 47 48 23 overflow: auto; 49 50 } 51 24 } 52 25 p.list_type { 53 54 26 white-space: nowrap; 55 56 27 width: 70% !important; 57 58 28 overflow: hidden; 59 60 29 text-overflow: ellipsis; 61 30 height: 23px !important; 62 31 text-align: left; 63 32 /*clear: both;*/ 64 65 } 66 33 } 34 p.list_type1 { 35 white-space: nowrap; 36 width: 90% !important; 37 overflow: hidden; 38 text-overflow: ellipsis; 39 height: 23px !important; 40 text-align: left; 41 letter-spacing: .5px !important; 42 /*clear: both;*/ 43 } 67 44 p.list_title { 68 69 45 font-weight: bold !important; 70 71 46 text-transform: capitalize !important; 72 47 letter-spacing: 0.2px !important; 48 font-size: 14px !important; 49 width: 55% !important; 50 white-space: nowrap; 51 overflow: hidden; 52 text-overflow: ellipsis; 53 float: left; 54 padding: 0px!important; 55 margin: 0px!important; 56 } 57 p.list_status { 58 width: 25% !important; 59 } 60 .search_list li a, .mobile_search_list li { 61 background-color: #019dc2 !important; 62 color: #ffffff; 63 border-left: 5px solid #23282d !important; 64 border-right: 5px solid #23282d !important; 65 } 66 .search_list li a { 67 height: 40px !important; 68 padding: 10px 20px 20px 20px !important; 69 } 70 .mobile_search_list li a { 71 height: 40px !important; 72 padding: 10px 20px 20px 20px !important; 73 display: block; 74 box-sizing: content-box; 75 } 76 .search_list li a .list_status, .mobile_search_list li a .list_status{ 77 float: right; 78 text-transform: uppercase !important; 79 } 80 .search_list li a .list_status, .search_list li a .list_type, .mobile_search_list li a .list_status, .mobile_search_list li a .list_type { 81 font-size: 13px !important; 82 font-family: arial; 83 } 84 .search_list li a:hover, .search_list li a.count_post, .mobile_search_list li.count_result { 85 background-color: #23282d !important; 86 color: #fff; 87 } 88 .search_list li a.count_post, .mobile_search_list li.count_result { 89 text-align: center; 90 } 91 .search_list li a.count_post{ 92 height: 20px !important; 93 } 94 .search_list li a.count_post, .search_list li a.count_post .result-count, .mobile_search_list li a.count_post, .mobile_search_list li a.count_post .result-count{ 95 font-weight: bold !important; 96 } 97 .search_result, .none_result { 98 width: 280px !important; 99 word-wrap: break-word; 100 } 101 .image_thumb { 102 float: left; 103 width: 40px !important; 104 height: 40px !important; 105 margin-top: 5px !important; 106 display: block; 107 margin-right: 12px !important; 108 } 109 } 110 .result-count { 111 line-height: normal !important; 112 } 113 .search_list > li:nth-child(10) ~ li, .mobile_search_list > li:nth-child(10) ~ li { 114 /* this rule targets the rows after the 10th .row */ 115 display: none; 116 } 117 .search_list li:nth-last-child(1), .mobile_search_list li:nth-last-child(1) { 118 display: block !important; 119 } 120 a.search_result { 121 font-weight: bold !important; 122 text-transform: capitalize !important; 73 123 letter-spacing: 1px !important; 74 75 font-size: 15px !important; 76 77 width: 55% !important; 78 124 font-size: 14px !important; 125 } 126 .list_type, .list_status { 127 letter-spacing: .5px !important; 128 } 129 .list_type { 130 text-transform: capitalize !important; 131 } 132 .post_search_box { 133 display: block !important; 134 } 135 #wpadminbar .ab-top-menu>li#wp-admin-bar-search_form:hover>.ab-item { 136 background: transparent !important; 137 } 138 .fa-search { 139 font: normal normal normal 14px/1 FontAwesome !important; 140 } 141 .ajax-loader { 142 visibility: hidden; 143 background-color: rgba(255,255,255,0.7); 144 position: absolute; 145 z-index: +100 !important; 146 width: 100%; 147 height:100%; 148 } 149 .ajax-loader img { 150 position: relative; 151 top:50%; 152 left:50%; 153 } 154 .search_result { 155 white-space: nowrap; 156 overflow: hidden; 157 text-overflow: ellipsis; 158 } 159 .advance_search_box .sf-d label { 160 position: absolute !important; 161 right: 0px; 162 width: 30px !important; 163 text-align: center; 164 height: 30px !important; 165 top: 1px; 166 background: linear-gradient(45deg, #0eaed4, #0eaed4,#0eaed4); 167 } 168 .advance_search_box #post_search_box { 169 height: 28px !important; 170 margin: 0 !important; 171 } 172 #wp-admin-bar-search_form:hover label > .dashicons-search { 173 color: #ffffff !important; 174 } 175 .ajax-loader img.img-responsive, .ajax-loading img { 176 display: block; 177 margin: 0 auto !important; 178 height: 30px !important; 179 } 180 a.count_post.media_list { 181 min-width: 280px; 182 } 183 .ajax-loading { 184 background-color: #ffffff; 185 } 186 .dashicons-search { 187 font: 24px dashicons !important; 188 font-family: dashicons !important; 189 color: #ffffff; 190 } 191 .dashicons-external:before { 192 content: "\f504"; 193 top: 5px; 194 left: 8px; 195 position: relative; 196 } 197 ul.search_list::-webkit-scrollbar { 198 display: none; 199 } 200 ul.search_list { 201 -ms-overflow-style: none; /* IE and Edge */ 202 scrollbar-width: none; /* Firefox */ 203 } 204 /*error*/ 205 .php-error #adminmenuback, .php-error #adminmenuwrap{ 206 margin-top: 0 !important; 207 } 208 @media only screen and (max-width: 2560px) { 209 ul.search_list { 210 height: 780px !important; 211 } 212 } 213 @media only screen and (max-width: 1440px){ 214 ul.search_list { 215 height: 600px !important; 216 overflow: auto; 217 } 218 } 219 @media only screen and (max-width: 1024px){ 220 ul.search_list { 221 height: 540px !important; 222 overflow: auto; 223 } 224 .table_type { 225 width: 13% !important; 226 } 227 .table_type1 { 228 width: 11% !important; 229 } 230 } 231 @media screen and (max-width: 768px) { 232 .input_search,.select1{ 233 width: 153px !important; 234 } 235 .select1 { 236 margin: 1px 5px 8px 5px !important; 237 } 238 .input_search{ 239 margin: 4px 5px 5px 5px !important; 240 } 241 .btn1 { 242 width: 153px !important; 243 padding: 8px 5px 8px 5px !important; 244 margin: 0px 4px 4px 4px !important; 245 } 246 .table_type2 { 247 width: 24% !important; 248 } 249 } 250 @media screen and (max-width: 600px) { 251 .sf-m { 252 padding-top: 50px; 253 } 254 #wpbody { 255 padding-top: 0 !important; 256 } 257 } 258 @media screen and (min-width: 600px) and (max-width: 782px) { 259 #search_fields { 260 margin-top: 5px; 261 } 262 } 263 @media screen and (max-width: 782px) { 264 #wp-toolbar>ul>li#wp-admin-bar-search_form{ 265 display: block !important; 266 } 267 .sf-d { 268 display: none; 269 } 270 .advance_search_box { 271 width: 50px !important; 272 top: 4px; 273 } 274 #wp-admin-bar-search_form.hover #post_search_box { 275 display: block; 276 } 277 .sf-m { 278 margin-right: 12px; 279 } 280 #mobile_search_fields { 281 height: 40px; 282 width: 90%; 283 } 284 .mobile_search_list li:last-child a.count_post { 285 color: inherit; 286 text-decoration: none; 287 } 288 .mobile_search_list, .mobile_search_list li, .list_type, .list_status { 289 margin: 0; 290 } 291 .mobile_search_list li a { 292 font-size: 16px; 293 } 294 .dashicons-search { 295 font: 40px dashicons !important; 296 font-family: dashicons !important; 297 color: #ccc; 298 } 299 .sf-m .dashicons-search { 300 margin-right: 10px; 301 font-size: 30px !important; 302 margin-top: 5px !important; 303 } 304 .search_result { 305 color: #fff; 306 text-decoration: none; 307 } 308 .list_type, .list_status { 309 font-weight: normal; 310 } 311 .search_result { 312 width: auto !important; 313 display: block; 314 } 315 #search_fields { 316 position: relative; 317 } 318 #search_fields label { 319 background: #0077A4; 320 display: inline-block; 321 position: absolute; 322 width: 10%; 323 text-align: center; 324 line-height: 41px; 325 color: #ffffff; 326 min-width: 40px; 327 right: 0px; 328 margin-bottom: 0; 329 } 330 .ajax-loading img { 331 margin-top: 10px !important; 332 } 333 } 334 @media screen and (min-width: 783px) { 335 .dashicons-search, .sf-m { 336 display: none !important; 337 } 338 input#post_search_box { 339 max-width: 100%; 340 text-indent: 8px; 341 } 342 .dashicons-search { 343 margin-top: 3px !important; 344 } 345 .ajax-loader img.img-responsive, .ajax-loading img { 346 padding: 10px !important; 347 } 348 } 349 @media screen and (max-width: 425px) { 350 .advanced-admin-wrapper form input, .advanced-admin-wrapper form select { 351 max-width: 45% !important; 352 } 353 input#mobile_search_fields{ 354 outline: none; 355 } 356 input#open_advance_search { 357 max-width: 10px !important; 358 height: 16px; 359 } 360 .input_search{ 361 margin:4px 5px 8px 5px !important 362 } 363 .btn1 { 364 width: 153px !important; 365 padding: 8px 5px 8px 5px !important; 366 margin: 5px 4px 4px 4px !important; 367 } 368 .select1 { 369 margin: 1px 5px 6px 5px !important; 370 } 371 .page_title { 372 line-height: 32px; 373 } 374 } 375 @media only screen and (max-width: 330px) { 376 p.list_type { 377 width: 50% !important; 378 } 379 } 380 ul.search_list3 li { 381 display:inline; 382 } 383 /* CSS Changes for page view */ 384 .input_search { 385 margin: 10px 5px 5px 0; 386 width:169px; 387 } 388 .select1 { 389 margin:2px 5px 5px 5px; 390 width: 169px; 391 } 392 .input_value { 393 margin-left: 5px; 394 margin-top: 5px; 395 margin-right: 6px; 396 } 397 .input_key { 398 margin-right: 5px; 399 } 400 .btn1 { 401 width: 169px; 402 padding: 3px 5px 6px 5px; 403 margin:0 1px 0px 5px; 404 background: #0075A7; 405 font-weight: bold; 406 border: 1px solid #7da7ccf2; 407 color: white; 408 } 409 .input_page { 410 margin-left: 5px; 411 } 412 .center { 413 text-align: center; 414 margin-top: 20px; 415 } 416 .pagination { 417 display: inline-block; 418 } 419 .pagination a { 420 /* color: black;*/ 421 float: left; 422 padding: 8px 16px; 423 text-decoration: none; 424 transition: background-color .3s; 425 border: 1px solid #ddd; 426 margin: 0 0px; 427 font-family: sans-serif; 428 } 429 .pagination a.active { 430 background-color: #0075A7; 431 color: white; 432 /* border: 1px solid #0075A7;*/ 433 outline: none; 434 } 435 .pagination a.isDisabled { 436 cursor: not-allowed; 437 background-color: #c1c1c1; 438 color: white; 439 } 440 .pagination a.isDisabled:hover{ 441 background-color: #c1c1c1; 442 color: white !important; 443 } 444 .pagination a:hover:not(.active) { 445 background-color: #c1c1c1; 446 color:#00a0d2; 447 outline: none; 448 } 449 .btn-color{ 450 background: #86939f; 451 color: white; 452 } 453 .wp-core-ui select { 454 border-radius: 0px; 455 } 456 .tb-heading { 457 background: #23282d; 458 color: white; 459 font-size: 15px; 460 letter-spacing: 0.3px; 461 word-wrap: break-word; 462 } 463 .image_thumb1 { 464 width: 40px !important; 465 height: 40px !important; 466 } 467 .search_rows1{ 468 text-align: center; 469 } 470 .list_title1 { 471 font-weight: bold !important; 472 text-transform: capitalize !important; 473 letter-spacing: 0.2px !important; 474 font-size: 14px !important; 475 width: 90% !important; 79 476 white-space: nowrap; 80 81 477 overflow: hidden; 82 83 478 text-overflow: ellipsis; 84 85 479 float: left; 86 87 480 padding: 0px!important; 88 89 481 margin: 0px!important; 90 91 } 92 93 94 95 p.list_status { 96 97 width: 25% !important; 98 99 } 100 101 .search_list li a, .mobile_search_list li{ 102 103 background-color: #0073aa !important; 104 105 color: #ffffff; 106 107 } 108 109 .search_list li a { 110 111 height: 40px !important; 112 113 padding: 10px 20px 20px 20px !important; 114 115 116 117 } 118 119 .mobile_search_list li a { 120 121 height: 40px !important; 122 123 padding: 10px 20px 20px 20px !important; 124 125 display: block; 126 127 box-sizing: content-box; 128 129 } 130 131 .search_list li a .list_status, .mobile_search_list li a .list_status{ 132 133 float: right; 134 135 text-transform: uppercase !important; 136 137 } 138 139 .search_list li a .list_status, .search_list li a .list_type, .mobile_search_list li a .list_status, .mobile_search_list li a .list_type { 140 141 font-size: 13px !important; 142 143 font-family: arial; 144 145 } 146 147 .search_list li a:hover, .search_list li a.count_post, .mobile_search_list li.count_result { 148 149 background-color: #23282d !important; 150 151 color: #fff; 152 153 } 154 155 .search_list li a.count_post, .mobile_search_list li.count_result { 156 157 text-align: center; 158 159 } 160 161 .search_list li a.count_post{ 162 163 height: 20px !important; 164 165 } 166 167 .search_list li a.count_post, .search_list li a.count_post .result-count, .mobile_search_list li a.count_post, .mobile_search_list li a.count_post .result-count{ 168 169 font-weight: bold !important; 170 171 } 172 173 .search_result, .none_result { 174 175 width: 280px !important; 176 482 text-align: left; 483 } 484 input[type=text]{ 485 border-radius: 0px !important; 486 } 487 table.table_fxd{ 488 table-layout: fixed; 489 width: 100%; 490 margin-top: 10px; 491 padding: 0px; 492 } 493 #wpcontent { 494 padding-right: 20px; 495 } 496 .td_rows { 177 497 word-wrap: break-word; 178 179 } 180 181 .image_thumb { 182 183 float: left; 184 185 width: 40px !important; 186 187 height: 40px !important; 188 189 margin-top: 5px !important; 190 191 display: block; 192 193 margin-right: 12px !important; 194 195 } 196 197 } 198 199 .result-count { 200 201 line-height: normal !important; 202 203 } 204 205 .search_list > li:nth-child(10) ~ li, .mobile_search_list > li:nth-child(10) ~ li { 206 207 /* this rule targets the rows after the 10th .row */ 208 209 display: none; 210 211 } 212 213 .search_list li:nth-last-child(1), .mobile_search_list li:nth-last-child(1) { 214 215 display: block !important; 216 217 } 218 219 a.search_result { 220 221 font-weight: bold !important; 222 223 text-transform: capitalize !important; 224 225 letter-spacing: 1px !important; 226 227 font-size: 14px !important; 228 229 } 230 231 .list_type, .list_status { 232 233 letter-spacing: .5px !important; 234 235 } 236 237 .list_type { 238 239 text-transform: capitalize !important; 240 241 } 242 243 .post_search_box { 244 245 display: block !important; 246 247 } 248 249 #wpadminbar .ab-top-menu>li#wp-admin-bar-search_form:hover>.ab-item { 250 251 background: transparent !important; 252 253 } 254 255 .fa-search { 256 257 font: normal normal normal 14px/1 FontAwesome !important; 258 259 } 260 261 .ajax-loader { 262 263 visibility: hidden; 264 265 background-color: rgba(255,255,255,0.7); 266 267 position: absolute; 268 269 z-index: +100 !important; 270 271 width: 100%; 272 273 height:100%; 274 275 } 276 277 .ajax-loader img { 278 279 position: relative; 280 281 top:50%; 282 283 left:50%; 284 285 } 286 287 .search_result { 288 289 white-space: nowrap; 290 291 overflow: hidden; 292 293 text-overflow: ellipsis; 294 295 } 296 297 .advance_search_box .sf-d label { 298 299 position: absolute !important; 300 301 right: 0px; 302 303 width: 30px !important; 304 305 text-align: center; 306 307 height: 30px !important; 308 309 top: 1px; 310 311 background: #0075A7; 312 313 } 314 315 .advance_search_box #post_search_box { 316 317 height: 28px !important; 318 319 margin: 0 !important; 320 321 } 322 323 #wp-admin-bar-search_form:hover label > .dashicons-search { 324 325 color: #ffffff !important; 326 327 } 328 329 .ajax-loader img.img-responsive, .ajax-loading img { 330 331 display: block; 332 333 margin: 0 auto !important; 334 335 height: 30px !important; 336 337 } 338 339 a.count_post.media_list { 340 341 min-width: 280px; 342 343 } 344 345 .ajax-loading { 346 347 background-color: #ffffff; 348 349 } 350 351 .dashicons-search { 352 353 font: 24px dashicons !important; 354 355 font-family: dashicons !important; 356 357 color: #ccc; 358 359 } 360 361 @media only screen and (max-width: 2560px) { 362 363 ul.search_list { 364 365 height: 780px !important; 366 367 } 368 369 } 370 371 @media only screen and (max-width: 1440px){ 372 373 ul.search_list { 374 375 height: 600px !important; 376 377 overflow: auto; 378 379 } 380 381 } 382 383 @media only screen and (max-width: 1024px){ 384 385 ul.search_list { 386 387 height: 540px !important; 388 389 overflow: auto; 390 391 } 392 393 } 394 395 @media screen and (max-width: 600px) { 396 397 .sf-m { 398 399 padding-top: 50px; 400 401 } 402 403 #wpbody { 404 405 padding-top: 0 !important; 406 407 } 408 409 } 410 411 @media screen and (min-width: 600px) and (max-width: 782px) { 412 413 #search_fields { 414 415 margin-top: 5px; 416 417 } 418 419 } 420 421 @media screen and (max-width: 782px) { 422 423 #wp-toolbar>ul>li#wp-admin-bar-search_form{ 424 425 display: block !important; 426 427 } 428 429 .sf-d { 430 431 display: none; 432 433 } 434 435 .advance_search_box { 436 437 width: 50px !important; 438 439 top: 4px; 440 441 } 442 443 #wp-admin-bar-search_form.hover #post_search_box { 444 445 display: block; 446 447 } 448 449 .sf-m { 450 451 margin-right: 12px; 452 453 } 454 455 #mobile_search_fields { 456 457 height: 40px; 458 459 width: 90%; 460 461 } 462 463 .mobile_search_list li:last-child a.count_post { 464 465 color: inherit; 466 467 text-decoration: none; 468 469 } 470 471 .mobile_search_list, .mobile_search_list li, .list_type, .list_status { 472 473 margin: 0; 474 475 } 476 477 .mobile_search_list li a { 478 479 font-size: 16px; 480 481 } 482 483 484 485 .dashicons-search { 486 487 font: 40px dashicons !important; 488 489 font-family: dashicons !important; 490 491 color: #ccc; 492 493 } 494 495 .sf-m .dashicons-search { 496 497 margin-right: 10px; 498 499 font-size: 30px !important; 500 501 margin-top: 5px !important; 502 503 } 504 505 .search_result { 506 507 color: #fff; 508 509 text-decoration: none; 510 511 } 512 513 .list_type, .list_status { 514 515 font-weight: normal; 516 517 } 518 519 .search_result { 520 521 width: auto !important; 522 523 display: block; 524 525 } 526 527 #search_fields { 528 529 position: relative; 530 531 } 532 533 #search_fields label { 534 535 background: #0077A4; 536 537 display: inline-block; 538 539 position: absolute; 540 541 width: 10%; 542 543 text-align: center; 544 545 line-height: 41px; 546 547 color: #ffffff; 548 549 min-width: 40px; 550 551 right: 0px; 552 553 margin-bottom: 0; 554 555 } 556 557 .ajax-loading img { 558 559 margin-top: 10px !important; 560 561 } 562 563 } 564 565 @media screen and (min-width: 783px) { 566 567 .dashicons-search, .sf-m { 568 569 display: none !important; 570 571 } 572 573 input#post_search_box { 574 575 max-width: 100%; 576 577 text-indent: 8px; 578 579 } 580 581 .dashicons-search { 582 583 margin-top: 3px !important; 584 585 } 586 587 .ajax-loader img.img-responsive, .ajax-loading img { 588 589 padding: 10px !important; 590 591 } 592 593 } 594 595 @media only screen and (max-width: 330px) { 596 597 p.list_type { 598 599 width: 50% !important; 600 } 601 } 498 } 499 td { 500 padding: 0px 10px 0px 10px; 501 border: 0px solid #c7cad6bf; 502 } 503 table { 504 border-spacing: 0px; 505 border: 0px solid #c7cad6bf; 506 } 507 tr:nth-child(even) { 508 background-color: #c6d2e4b3; 509 } 510 th { 511 padding: 15px 0px !important; 512 } 513 .page_title { 514 font-family: sans-serif; 515 text-align: left; 516 font-size: 26px; 517 color: #0075a7; 518 font-weight: 700; 519 } 520 .table_type { 521 width: 10%; 522 } 523 .table_type1 { 524 width: 10%; 525 } 526 .table_type2 { 527 width: 35%; 528 } 529 .color { 530 border-radius: 8px !important; 531 padding: 2px 10px; 532 font-weight: 700; 533 letter-spacing: 0.6px; 534 color: white; 535 } 536 td.result_row { 537 text-transform: uppercase; 538 font-size: 14px; 539 letter-spacing: 1px; 540 font-weight: 700; 541 text-align: center; 542 padding: 10px 0 10px; 543 background: #ffffff; 544 margin-top: 0; 545 margin-bottom: 0; 546 color: red; 547 } 548 /*Form design*/ 549 .advanced-admin-wrapper { 550 width: 100%; 551 max-width: 100%; 552 margin-top: 20px; 553 } 554 .advanced-admin-wrapper img.banner-image { 555 width: 100%; 556 border: 1px solid #933afb; 557 } 558 h2.page_title_AASKP { 559 margin: 0; 560 padding: 20px; 561 background: linear-gradient(45deg, #9538fc, #0eaed4,#0eaed4); 562 color: #ffffff; 563 text-transform: uppercase; 564 letter-spacing: 1px; 565 } 566 .advanced-admin-wrapper form input, .advanced-admin-wrapper form select { 567 width: 100%; 568 max-width: 23%; 569 padding: 10px; 570 border: 1px solid #cecece; 571 letter-spacing: 1px; 572 font-size: 13px; 573 } 574 .advanced-admin-wrapper form select{ 575 text-transform: capitalize; 576 } 577 .button_AASKP { 578 padding: 15px !important; 579 background: linear-gradient(45deg, #9538fc, #0eaed4,#0eaed4); 580 letter-spacing: 1px; 581 cursor: pointer; 582 outline: none; 583 } 584 .button_AASKP:hover { 585 background: #0fafd5; 586 transition: 1s ease; 587 } 588 .advanced-admin-wrapper form { 589 background: white; 590 padding: 20px; 591 } 592 tr.search_rows.tb-heading th { 593 color: #ffffff; 594 text-transform: uppercase; 595 letter-spacing: 1px; 596 font-size: 12px; 597 } 598 .advanced-admin-wrapper form p { 599 padding: 0; 600 margin-top: 0; 601 font-size: 12px; 602 letter-spacing: 1px; 603 margin-bottom: 0; 604 text-transform: uppercase; 605 font-weight: 500; 606 } 607 h2.search_result_count { 608 text-transform: uppercase; 609 font-size: 14px; 610 letter-spacing: 1px; 611 font-weight: 700; 612 text-align: center; 613 padding: 10px 0 20px; 614 background: #ffffff; 615 margin-top: 0; 616 margin-bottom: 0; 617 } 618 h2.search_result_count span { 619 background: linear-gradient(45deg, #9538fc, #0eaed4); 620 color: #ffffff; 621 border-radius: 8px; 622 padding: 2px 10px; 623 } 624 .advanced-admin-wrapper form input:disabled{ 625 color: #a0a5aa; 626 border-color: #ddd; 627 background-color: #f1f1f1; 628 box-shadow: none; 629 text-shadow: 0 1px 0 #fff; 630 cursor: default; 631 transform: none; 632 cursor: not-allowed; 633 } 634 .advanced-admin-wrapper form select:disabled { 635 color: #23282d !important; 636 border-color: #ddd; 637 background-color: #efefef !important; 638 background-image: url(data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23a0a5aa%22%2F%3E%3C%2Fsvg%3E); 639 box-shadow: none; 640 text-shadow: 0 1px 0 #fff; 641 cursor: default; 642 transform: none; 643 cursor: not-allowed; 644 } 645 .advanced_search p { 646 font-size: 12px !important; 647 margin-bottom: 0; 648 margin-top: 8px !important; 649 text-transform: uppercase; 650 } 651 input#open_advance_search { 652 width: 100%; 653 max-width: 10px; 654 position: relative; 655 top: -1px; 656 border: 1px solid #cecece; 657 left: 0; 658 } 659 label.highlighted_adv_label { 660 margin-left: 0; 661 position: relative; 662 top: -1px; 663 font-size: 11px; 664 text-transform: initial; 665 color: red; 666 } -
advanced-admin-search/trunk/index.php
r2207029 r2474185 1 <?php 2 3 // Silence is golden 1 <?php // Silence is golden -
advanced-admin-search/trunk/js/jquery-admin-desktop-search.js
r2207029 r2474185 85 85 var search=jsonData['search']; 86 86 87 var myCustomsearch='"'+jsonData['search']+'"'; 88 87 89 88 90 … … 94 96 95 97 "</span> Result not Found. Please Refine Your Search</a></li>"); 96 97 98 }else{ //display the found results 98 99 99 $.each(jsonData['data'], function(key, values){ 100 100 … … 161 161 }); 162 162 163 jQuery( ".search_list" ).append("<li class='count_result' onclick='A lertMessage()'><a class='count_post media_list' href='#'>"+search+" search has <span class='result-count'>"+count+"</span> results.</a></li> ");163 jQuery( ".search_list" ).append("<li class='count_result' onclick='ASAK_pageView("+myCustomsearch+")'><a class='count_post media_list' href='#'>View all <span class='result-count'>"+count+"</span> search results</a></li> "); 164 164 165 165 } … … 243 243 244 244 245 function AlertMessage(){ 246 247 alert('This feature is coming soon.'); 248 245 function ASAK_pageView(myCustomsearch){ 246 247 window.location.href="tools.php?page=advanced-admin-search&keyword="+myCustomsearch; 249 248 } 250 249 -
advanced-admin-search/trunk/js/jquery-admin-mobile-search.js
r2207029 r2474185 84 84 var search=jsonData['search']; 85 85 86 var myCustomsearch='"'+jsonData['search']+'"'; 86 87 87 88 … … 160 161 }); 161 162 162 jQuery( ".mobile_search_list" ).append("<li class='count_result' onclick='A lertMessage()'><a class='count_post media_list' href='#'>"+search+" search has <span class='result-count'>"+count+"</span> results.</a></li> ");163 jQuery( ".mobile_search_list" ).append("<li class='count_result' onclick='ASAK_pageView("+myCustomsearch+")'><a class='count_post media_list' href='#'>View all <span class='result-count'>"+count+"</span> search results</a></li> "); 163 164 164 165 } … … 244 245 245 246 246 function AlertMessage(){ 247 248 alert('This feature is coming soon.'); 249 250 } 251 247 function ASAK_pageView(myCustomsearch){ 248 249 window.location.href="tools.php?page=advanced-admin-search&keyword="+myCustomsearch; 250 } 251 -
advanced-admin-search/trunk/scripts.php
r2207029 r2474185 1 1 <?php 2 3 2 namespace Kuroit\AdvancedAdminSearch; 4 5 6 7 3 class AASKP_SearchData 8 9 4 { 10 11 5 public function __construct() 12 13 6 { 14 15 7 // Hooks to get the searching data like admin menu, media labraries, post, pages. 16 8 17 9 add_action('admin_bar_menu', array($this, 'AASKP_desktopSearchJavascript')); 18 19 10 add_action('in_admin_header', array($this, 'AASKP_mobileSearchJavascript')); 20 21 22 11 //add_action('in_admin_header', array($this, 'AASKP_pageSearchJavascript')); 23 12 // Hooks to add javascript. 24 25 13 add_action('admin_enqueue_scripts', array($this, "AASKP_adminJavascript")); 26 27 14 add_action('wp_enqueue_scripts', array($this, "AASKP_adminJavascript")); 28 29 30 31 15 } 32 33 16 public function AASKP_desktopSearchJavascript() 34 35 17 { 36 37 18 echo '<script type="text/javascript"> AASKP_desktopSearch(); </script>'; 38 39 19 } 40 20 // public function AASKP_pageSearchJavascript() 21 // { 22 // echo '<script type="text/javascript"> AASKP_pageSearch(); </script>'; 23 // } 41 24 public function AASKP_mobileSearchJavascript() 42 43 25 { 44 45 26 echo '<script type="text/javascript"> AASKP_mobileSearch(); </script>'; 46 47 27 } 48 49 28 function AASKP_adminJavascript() 50 51 29 { 52 53 30 wp_enqueue_style( 'advanced_admin_search_style', plugin_dir_url( __FILE__ ) . 'css/style.css' ); 54 55 31 wp_register_script('advanced_admin_desktop_search_script' , plugin_dir_url( __FILE__ ) . 'js/jquery-admin-desktop-search.js' ); 56 57 32 wp_register_script('advanced_admin_mobile_search_script' , plugin_dir_url( __FILE__ ) . 'js/jquery-admin-mobile-search.js' ); 58 59 60 33 wp_register_script('advanced_admin_page_search_script' , plugin_dir_url( __FILE__ ) . 'js/jquery-admin-page-search.js' ); 61 34 $params = array( 62 63 35 'ajaxurl' => admin_url('admin-ajax.php'), 64 65 36 'ajax_nonce' => wp_create_nonce('advanced_search_submit'), 66 67 37 ); 68 69 70 71 38 wp_localize_script( 'advanced_admin_desktop_search_script', 'advanced_admin_search', $params ); 72 73 39 wp_localize_script( 'advanced_admin_mobile_search_script', 'advanced_admin_search', $params ); 74 75 40 wp_localize_script( 'advanced_admin_page_search_script', 'advanced_admin_search', $params ); 76 41 //register and enqueue script 77 42 wp_enqueue_script( 'advanced_admin_desktop_search_script' ); 78 79 43 wp_enqueue_script( 'advanced_admin_mobile_search_script' ); 80 81 82 44 45 wp_enqueue_script( 'advanced_admin_page_search_script' ); 83 46 } 84 85 47 } 86 -
advanced-admin-search/trunk/searchbox.php
r2207029 r2474185 1 1 <?php 2 3 2 namespace Kuroit\AdvancedAdminSearch; 4 5 6 7 3 class AASKP_SearchBox 8 9 4 { 10 11 5 public function __construct() 12 13 6 { 14 7 //hooks to add search box to admin bar 15 8 add_action('admin_bar_menu', array($this, 'AASKP_displaySearchBox')); 16 17 9 add_action('in_admin_header', array($this, 'AASKP_displayInput')); 18 19 10 } 20 21 11 22 12 public function AASKP_displaySearchBox() 23 24 13 { 25 26 14 global $wp_admin_bar; 27 28 15 $wp_admin_bar->add_menu(array('id' => 'search_form', 29 30 16 'parent' => 'top-secondary', 31 32 17 'title' => '<ul class="post_search_box"> 33 34 18 <li class="advance_search_box"><span class="dashicons dashicons-search" 35 36 19 onclick="AASKP_displayInputBox()"></span><div class="sf-d"><input 37 38 20 name="autocomplete" type="text" placeholder="Search Database" 39 40 21 id="post_search_box" autocomplete="off" style="height:20px;margin:5px 41 42 22 0;"/><label for="submit"><span class="dashicons dashicons-search" 43 44 23 style="display:block !important;"></span></label><input type="submit" 45 46 24 id="submit" name="search" value="Search" style="display:none;"><div 47 48 25 class="ajax-loader" style="display: none;"><img src="'.plugin_dir_url 49 50 26 (__FILE__).'image/loading.gif" class="img-responsive" /></div><ul 51 52 27 class="search_list"></ul></div></li> 53 54 28 </ul>')); 55 56 29 } 57 58 30 public function AASKP_displayInput() 59 60 31 { 61 62 32 echo '<div class="sf-m"><div id="search_fields" style="display:none;"> 63 64 33 <input type="text" placeholder="Search Database" id="mobile_search_fields" 65 66 34 autocomplete="off" style="line-height:1em;"/><label for="submit"><span 67 68 35 class="dashicons dashicons-search"></span></label><input type="submit" 69 70 36 id="submit" name="search" value="Search" style="display:none;"></div> 71 72 37 <div class="ajax-loading"><img src="'.plugin_dir_url(__FILE__).'image/loading.gif" 73 74 38 class="img-responsive" /></div><ul class="mobile_search_list"> 75 76 39 </ul></div>'; 77 78 40 } 79 80 41 } 81 -
advanced-admin-search/trunk/searchresults.php
r2207029 r2474185 1 1 <?php 2 3 2 namespace Kuroit\AdvancedAdminSearch; 4 5 3 //class for searching results 6 4 class AASKP_searchResults 7 8 5 { 9 6 protected static $instance = false; 10 7 public function __construct() // instantiation 11 12 { 13 8 { 14 9 add_action('wp_ajax_search_result', array($this, 'AASKP_searchAction')); 15 16 } 17 18 19 10 } 20 11 public function AASKP_searchAction() //retrieve the results 21 22 { 23 24 25 12 { 26 13 if (isset($_POST['post_search']) && isset($_POST['security'])) { 27 28 $post_search = sanitize_text_field($_POST['post_search']); 29 30 $security_check = sanitize_text_field($_POST['security']); 31 32 $check = wp_create_nonce('advanced_search_submit'); 33 14 $post_search = sanitize_text_field($_POST['post_search']); 15 $security_check = sanitize_text_field($_POST['security']); 16 $check = wp_create_nonce('advanced_search_submit'); 34 17 if ($security_check == $check) { 35 36 18 $results = array(); // all results available for search 37 38 19 if (!empty($post_search)) { 39 40 $post_types = get_post_types(array('public' => true)); 41 42 $post_types = array_values($post_types); 43 44 // get pre search results from hook 45 46 $pre_filtered_result = apply_filters('aaskp_pre_search', $post_search); 47 20 $filters=array(); 21 $post_types = get_post_types(array('public' => true)); 22 $post_types = array_values($post_types); 23 // get pre search results from hook 24 $pre_filtered_result = apply_filters('aaskp_pre_search', $post_search); 25 48 26 if (is_array($pre_filtered_result)) { 49 50 $results = array_merge($results, $pre_filtered_result); 51 52 } 53 54 55 56 $results = array_merge( 57 58 $results, // pre search 59 60 $this->AASKP_getUsers($post_search), // user results 61 62 $this->AASKP_getPostsAndPages($post_search), // post types 63 64 $this->AASKP_getMedia($post_search), // attachments 65 66 $this->AASKP_getTaxonomies($post_search), // taxonomies 67 68 $this->AASKP_getPostMeta($post_search), // post meta 69 70 $this->AASKP_getComments($post_search) // comments 71 72 ); 73 74 // get post search results from hook 75 76 $post_filtered_result = apply_filters('aaskp_post_search', $post_search); 77 27 $results = array_merge($results, $pre_filtered_result); 28 } 29 $results = array_merge( 30 $results, // pre search 31 $this->AASKP_getUsers($post_search,$filters), // user results 32 $this->AASKP_getPostsAndPages($post_search,$filters), // post types 33 $this->AASKP_getMedia($post_search,$filters), // attachments 34 $this->AASKP_getTaxonomies($post_search,$filters), // taxonomies 35 $this->AASKP_getPostMeta($post_search,$filters), // post meta 36 $this->AASKP_getComments($post_search,$filters) // comments 37 ); 38 $post_filtered_result = apply_filters('aaskp_post_search', $post_search); 78 39 if (is_array($post_filtered_result)) { 79 80 $results = array_merge($results, $post_filtered_result); 81 82 } 83 40 $results = array_merge($results, $post_filtered_result); 41 } 84 42 //results conversion to json 85 43 echo json_encode(array('result'=>'success', 'data'=>$results, 'count'=>count($results), 'search'=>$post_search)); 86 87 } 88 89 else { 90 91 echo json_encode(array('result'=>'success', 'count'=> count($results))); 92 93 } 94 44 } 45 else { 46 echo json_encode(array('result'=>'success', 'count'=> count($results))); 47 } 95 48 } else { 96 97 49 echo json_encode(array('result'=>'error', 'message'=>'Invalid Request')); 98 99 } 100 50 } 101 51 } else { 102 103 echo json_encode(array('result'=>'none', 'message'=>'Refine Your Search')); 104 105 } 106 107 wp_die(); 108 109 } 110 111 112 113 public function AASKP_getUsers($post_search) 114 115 { 116 52 echo json_encode(array('result'=>'none', 'message'=>'Refine Your Search')); 53 } 54 wp_die(); 55 } 56 public function AASKP_getUsers($post_search,$filters,$flag = false) 57 { 58 59 $output = array(); 60 if($flag) { 61 if(!empty($filters['status']) || !empty($filters['user']) || !empty($filters['metaKey']) || !empty($filters['metaValue'])) { 62 return $output; 63 } 64 } 65 66 $users = get_users(array('search' => "*{$post_search}*", 'fields' => array('display_name', 'user_registered', 'id'))); 67 foreach ($users as $user) { 68 $url = admin_url('user-edit.php?user_id='.$user->id); 69 $getUser = get_userdata($user->id); 70 $role = $getUser->roles; 71 foreach ($role as $value) { 72 $output[] = array( 73 'link' => $url, 74 'title' => $user->display_name, 75 'status' => $value, 76 'info' => $user->user_registered, 77 'image' => esc_url(get_avatar_url($user->id)), 78 'type' => 'User' 79 ); 80 } 81 } 82 return $output; 83 } 84 public function AASKP_getPostsAndPages($post_search,$filters,$flag = false) 85 { 86 $output = array(); 87 $args = array( 88 's' => $post_search, 89 'post_type' => 'any', 90 'post_status' => array('publish', 'pending', 'draft', 91 'auto-draft', 'future', 'private', 'trash'), 92 'posts_per_page' => -1 93 ); 94 if($flag) { 95 if(!empty($filters['status'])) { 96 $args['post_status']=$filters['status']; 97 } 98 if(!empty($filters['user'])) { 99 if(is_numeric($filters['user'])) { 100 $args['author'] = $filters['user']; 101 } 102 else { 103 $args['author_name'] = $filters['user']; 104 } 105 } 106 107 $metaQuery= array(); 108 if (!empty($filters['metaKey'])) { 109 $metaQuery=array( 110 'key' => $filters['metaKey'] 111 ); 112 } 113 if (!empty($filters['metaValue'])) { 114 $value=$filters['metaValue']; 115 $matchType=$filters['matchType']; 116 switch($matchType) { 117 case "starting": 118 $compare='REGEXP'; 119 $value='^'.$value; 120 break; 121 case "ending": 122 $compare='REGEXP'; 123 $value=$value.'$'; 124 break; 125 case 0: 126 case "exact": 127 $compare='='; 128 } 129 $metaValueQuery=array( 130 'value' => $value, 131 'compare' => $compare 132 ); 133 $metaQuery= array_merge($metaQuery,$metaValueQuery); 134 } 135 if(!empty($metaQuery)) { 136 137 $args['meta_query']=array($metaQuery); 138 } 139 } 140 $query = new \WP_Query($args); 141 142 $posts = $query->posts; 143 foreach ($posts as $post) { 144 $url = admin_url('post.php?post='.$post->ID.'&action=edit'); 145 $post_type = $post->post_type; 146 $output[]=array( 147 'link' => $url, 148 'title' => $post->post_title, 149 'status' => $post->post_status, 150 'info' => 'Type: '.$post->post_type, 151 'type' => 'Post' 152 ); 153 } 154 return $output; 155 } 156 public function AASKP_getMedia($post_search,$filters,$flag = false) 157 { 158 $output = array(); 159 $args=array( 160 's' => $post_search, 161 'post_type' => 'attachment', 162 'post_status' => 'inherit', 163 'posts_per_page' => -1 164 ); 165 if($flag) { 166 if(!empty($filters['metaKey']) || !empty($filters['metaValue'])) { 167 return $output; 168 } 169 if(!empty($filters['status'])) { 170 $args['post_status']=$filters['status']; 171 } 172 173 if(!empty($filters['user'])) { 174 if(is_numeric($filters['user'])) { 175 $args['author'] = $filters['user']; 176 } 177 else { 178 $args['author_name'] = $filters['user']; 179 } 180 } 181 } 182 $mediaPosts = get_posts($args); 183 foreach ($mediaPosts as $mediaPost) { 184 $url = admin_url('post.php?post='.$mediaPost->ID.'&action=edit'); 185 $post_type = $mediaPost->post_type; 186 $image_url = wp_get_attachment_image_src($mediaPost->ID); 187 $image_url_main = $image_url[0]; 188 if($image_url_main == false){ 189 $image_url = ''; 190 } 191 $output[]=array( 192 'link' => $url, 193 'title' => $mediaPost->post_title, 194 'info' => $mediaPost->post_date, 195 'image'=> $image_url_main, 196 'type' => 'Media' 197 ); 198 } 199 return $output; 200 } 201 public function AASKP_getTaxonomies($post_search,$filters,$flag = false) 202 { 117 203 $output = array(); 118 119 120 121 $users = get_users(array('search' => "*{$post_search}*", 'fields' 122 123 => array('display_name', 'user_registered', 'id'))); 124 125 126 127 foreach ($users as $user) { 128 129 $url = admin_url('user-edit.php?user_id='.$user->id); 130 131 $getUser = get_userdata($user->id); 132 133 $role = $getUser->roles; 134 135 136 137 foreach ($role as $value) { 138 139 $output[] = array( 140 204 if($flag) { 205 if(!empty($filters['status']) || !empty($filters['user']) || !empty($filters['metaKey']) || !empty($filters['metaValue'])) { 206 return $output; 207 } 208 } 209 210 $taxonomies = get_terms( 211 array('search' => $post_search) 212 ); 213 foreach ($taxonomies as $taxonomy) { 214 $url = admin_url('term.php?taxonomy='.$taxonomy->taxonomy. 215 '&tag_ID='.$taxonomy->term_id.'&post_type=post&wp_http_referer 216 =%2Fwp-admin%2Fedit-tags.php%3Ftaxonomy%3Dcategory'); 217 $output[]=array( 218 'link' => $url, 219 'title' => $taxonomy->name, 220 'info' => 'Taxonomy: '.$taxonomy->taxonomy, 221 'type' => 'Taxonomy' 222 ); 223 } 224 return $output; 225 } 226 public function AASKP_getPostMeta($post_search,$filters,$flag = false) 227 { 228 $output = array(); 229 if($flag) { 230 if(!empty($filters['user']) || !empty($filters['user']) || !empty($filters['metaKey']) || !empty($filters['metaValue'])) { 231 return $output; 232 } 233 } 234 global $wpdb; 235 $postMeta = $wpdb->get_results("SELECT * FROM ".$wpdb->prefix."postmeta WHERE meta_key LIKE '%".$post_search."%' OR meta_value LIKE '%".$post_search."%'"); 236 foreach ($postMeta as $meta) { 237 $url = admin_url('post.php?post='.$meta->post_id.'&action=edit'); 238 $getPost = get_post($meta->post_id); 239 if($flag) 240 { 241 if ((strpos($meta->meta_key, $post_search) !== false)) { 242 if(empty($filters['status'])) { 243 $output[]=array( 244 'link' => $url, 245 'title' => $getPost->post_title, 246 'status' =>'PostMeta', 247 'info' => strip_tags($meta->meta_value), 248 'type' => 'PostMeta' 249 ); 250 } 251 } 252 else { 253 if(empty($filters['status'])) { 254 $output[]=array( 255 'link' => $url, 256 'title' => $getPost->post_title, 257 'status' => $getPost->post_status, 258 'info' => 'Meta Value: '.strip_tags($meta->meta_value), 259 'type' => 'PostMeta' 260 ); 261 } 262 else { 263 if(strcmp($getPost->post_status, $filters['status']) == 0) { 264 $output[]=array( 265 'link' => $url, 266 'title' => $getPost->post_title, 267 'status' => $getPost->post_status, 268 'info' => 'Meta Value: '.strip_tags($meta->meta_value), 269 'type' => 'PostMeta' 270 ); 271 } 272 } 273 } 274 } 275 276 else { 277 if (strpos($meta->meta_key, $post_search) !== false) { 278 279 $output[]=array( 280 'link' => $url, 281 'title' => $getPost->post_title, 282 'status' =>'PostMeta', 283 'info' => strip_tags($meta->meta_value), 284 'type' => 'PostMeta' 285 ); 286 } 287 else { 288 289 $output[]=array( 141 290 'link' => $url, 142 143 'title' => $user->display_name, 144 145 'status' => $value, 146 147 'info' => $user->user_registered, 148 149 'image' => esc_url(get_avatar_url($user->ID)) 150 291 'title' => $getPost->post_title, 292 'status' => $getPost->post_status, 293 'info' => 'Meta Value: '.strip_tags($meta->meta_value), 294 'type' => 'PostMeta' 151 295 ); 152 153 } 154 155 } 156 157 return $output; 158 159 } 160 161 162 163 public function AASKP_getPostsAndPages($post_search) 164 165 { 166 167 $output = array(); 168 169 $posts = get_posts( 170 171 array( 172 173 's' => $post_search, 174 175 'post_status' => array('publish', 'pending', 'draft', 176 177 'auto-draft', 'future', 'private', 'trash'), 178 179 'post_type' => 'any', 180 181 'posts_per_page' => -1 182 183 ) 184 296 } 297 } 298 } 299 return $output; 300 } 301 public function AASKP_getComments($post_search,$filters,$flag = false) 302 { 303 $output = array(); 304 $args=array('search' => $post_search); 305 if($flag){ 306 if(!empty($filters['status']) || !empty($filters['metaKey']) || !empty($filters['metaValue'])) { 307 return $output; 308 } 309 if(!empty($filters['user'])) { 310 $user=$filters['user']; 311 if(is_numeric($user)) { 312 $args['user_id'] = $user; 313 } 314 else { 315 $userData=get_user_by('login', $user); 316 $args['user_id'] = $userData->ID; 317 } 318 } 319 } 320 $comments = get_comments($args); 321 foreach ($comments as $comment) { 322 $url = admin_url('edit-comments.php'); 323 $output[]=array( 324 'link' => $url, 325 'title' => $comment->comment_author_email, 326 'info' =>'Comment'. $comment->comment_content, 327 'type' => 'Comment' 185 328 ); 186 187 foreach ($posts as $post) { 188 189 $url = admin_url('post.php?post='.$post->ID.'&action=edit'); 190 191 $post_type = $post->post_type; 192 193 $output[]=array( 194 195 'link' => $url, 196 197 'title' => $post->post_title, 198 199 'status' => $post->post_status, 200 201 'info' => 'Type: '.$post->post_type, 202 203 204 205 ); 206 207 } 208 209 return $output; 210 211 } 212 213 214 215 public function AASKP_getMedia($post_search) 216 217 { 218 219 $output = array(); 220 221 $mediaPosts = get_posts( 222 223 array( 224 225 's' => $post_search, 226 227 'post_type' => 'attachment', 228 229 'post_status' => 'inherit', 230 231 'posts_per_page' => -1 232 233 ) 234 235 ); 236 237 foreach ($mediaPosts as $mediaPost) { 238 239 $url = admin_url('post.php?post='.$mediaPost->ID.'&action=edit'); 240 241 $post_type = $mediaPost->post_type; 242 243 $image_url = wp_get_attachment_image_src($mediaPost->ID); 244 245 246 247 $output[]=array( 248 249 'link' => $url, 250 251 'title' => $mediaPost->post_title, 252 253 254 255 'info' => $mediaPost->post_date, 256 257 'image'=> $image_url[0] 258 259 ); 260 261 } 262 263 return $output; 264 265 } 266 267 268 269 public function AASKP_getTaxonomies($post_search) 270 271 { 272 273 $output = array(); 274 275 $taxonomies = get_terms( 276 277 array('search' => $post_search) 278 279 ); 280 281 282 283 foreach ($taxonomies as $taxonomy) { 284 285 $url = admin_url('term.php?taxonomy='.$taxonomy->taxonomy. 286 287 '&tag_ID='.$taxonomy->term_id.'&post_type=post&wp_http_referer 288 289 =%2Fwp-admin%2Fedit-tags.php%3Ftaxonomy%3Dcategory'); 290 291 $output[]=array( 292 293 'link' => $url, 294 295 'title' => $taxonomy->name, 296 297 'info' => 'Taxonomy: '.$taxonomy->taxonomy, 298 299 300 301 ); 302 303 } 304 305 306 307 return $output; 308 309 } 310 311 312 313 public function AASKP_getPostMeta($post_search) 314 315 { 316 317 global $wpdb; 318 319 $output = array(); 320 321 322 323 $postMeta = $wpdb->get_results("SELECT * FROM ".$wpdb->prefix."postmeta WHERE meta_key 324 325 LIKE '%".$post_search."%' OR meta_value LIKE '%".$post_search."%'"); 326 327 foreach ($postMeta as $meta) { 328 329 $url = admin_url('post.php?post='.$meta->post_id.'&action=edit'); 330 331 $getPost = get_post($meta->post_id); 332 333 if (strpos($meta->meta_key, $post_search) !== false) { 334 335 $output[]=array( 336 337 'link' => $url, 338 339 'title' => $getPost->post_title, 340 341 'status' =>'PostMeta', 342 343 'info' => strip_tags($meta->meta_value), 344 345 346 347 ); 348 349 } 350 351 else { 352 353 $output[]=array( 354 355 'link' => $url, 356 357 'title' => $getPost->post_title, 358 359 'status' => $getPost->post_status, 360 361 'info' => 'Meta Value: '.strip_tags($meta->meta_value), 362 363 ); 364 365 } 366 367 } 368 369 return $output; 370 371 } 372 373 374 375 public function AASKP_getComments($post_search) 376 377 { 378 379 $output = array(); 380 381 $comments = get_comments(array('search' => $post_search)); 382 383 384 385 foreach ($comments as $comment) { 386 387 $url = admin_url('edit-comments.php'); 388 389 $output[]=array( 390 391 'link' => $url, 392 393 'title' => $comment->comment_author_email, 394 395 'info' =>'Comment'. $comment->comment_content, 396 397 398 399 ); 400 401 } 402 403 404 405 return $output; 406 407 } 408 329 } 330 return $output; 331 } 332 public static function getInstance(){ 333 if(self::$instance == false){ 334 self::$instance = new AASKP_searchResults(); 335 } 336 return self::$instance; 337 } 409 338 } 410 339 AASKP_searchResults::getInstance();
Note: See TracChangeset
for help on using the changeset viewer.