' )
337 | .attr( 'data-term-id', newCat.term_id )
338 | .text( newCat.name ) );
339 |
340 | if ( newCat.parent ) {
341 | if ( ! $ul || ! $ul.length ) {
342 | $parent = $wrap.find( 'div[data-term-id="' + newCat.parent + '"]' ).parent();
343 | $ul = $parent.find( 'ul.children:first' );
344 |
345 | if ( ! $ul.length ) {
346 | $ul = $( '
' ).appendTo( $parent );
347 | }
348 | }
349 |
350 | $ul.prepend( $node );
351 | } else {
352 | $wrap.prepend( $node );
353 | }
354 |
355 | $node.focus();
356 | } );
357 |
358 | refreshCatsCache();
359 | }
360 | } );
361 | }
362 |
363 | /* ***************************************************************
364 | * RENDERING FUNCTIONS
365 | *************************************************************** */
366 |
367 | /**
368 | * Hide the form letting users enter a URL to be scanned, if a URL was already passed.
369 | */
370 | function renderToolsVisibility() {
371 | if ( data.hasData ) {
372 | $( '#scanbar' ).hide();
373 | }
374 | }
375 |
376 | /**
377 | * Render error notice
378 | *
379 | * @param msg string Notice/error message
380 | * @param error string error|notice CSS class for display
381 | */
382 | function renderNotice( msg, error ) {
383 | var $alerts = $( '.editor-wrapper div.alerts' ),
384 | className = error ? 'is-error' : 'is-notice';
385 |
386 | $alerts.append( $( '' ).text( msg ) );
387 | }
388 |
389 | /**
390 | * Render error notice
391 | *
392 | * @param msg string Error message
393 | */
394 | function renderError( msg ) {
395 | renderNotice( msg, true );
396 | }
397 |
398 | function clearNotices() {
399 | $( 'div.alerts' ).empty();
400 | }
401 |
402 | /**
403 | * Render notices on page load, if any already
404 | */
405 | function renderStartupNotices() {
406 | // Render errors sent in the data, if any
407 | if ( data.errors ) {
408 | $.each( data.errors, function( i, msg ) {
409 | renderError( msg );
410 | } );
411 | }
412 | }
413 |
414 | /**
415 | * Add an image to the list of found images.
416 | */
417 | function addImg( src, displaySrc, i ) {
418 | var $element = $mediaThumbWrap.clone().addClass( 'is-image' );
419 |
420 | $element.attr( 'data-wp-src', src ).css( 'background-image', 'url(' + displaySrc + ')' )
421 | .find( 'span' ).text( __( 'suggestedImgAlt' ).replace( '%d', i + 1 ) );
422 |
423 | $mediaList.append( $element );
424 | }
425 |
426 | /**
427 | * Render the detected images and embed for selection, if any
428 | */
429 | function renderDetectedMedia() {
430 | var found = 0;
431 |
432 | $mediaList = $( 'ul.media-list' );
433 | $mediaThumbWrap = $( '
' );
434 |
435 | if ( data._embeds ) {
436 | $.each( data._embeds, function ( i, src ) {
437 | var displaySrc = '',
438 | cssClass = '',
439 | $element = $mediaThumbWrap.clone().addClass( 'is-embed' );
440 |
441 | src = checkUrl( src );
442 |
443 | if ( src.indexOf( 'youtube.com/' ) > -1 ) {
444 | displaySrc = 'https://i.ytimg.com/vi/' + src.replace( /.+v=([^&]+).*/, '$1' ) + '/hqdefault.jpg';
445 | cssClass += ' is-video';
446 | } else if ( src.indexOf( 'youtu.be/' ) > -1 ) {
447 | displaySrc = 'https://i.ytimg.com/vi/' + src.replace( /\/([^\/])$/, '$1' ) + '/hqdefault.jpg';
448 | cssClass += ' is-video';
449 | } else if ( src.indexOf( 'dailymotion.com' ) > -1 ) {
450 | displaySrc = src.replace( '/video/', '/thumbnail/video/' );
451 | cssClass += ' is-video';
452 | } else if ( src.indexOf( 'soundcloud.com' ) > -1 ) {
453 | cssClass += ' is-audio';
454 | } else if ( src.indexOf( 'twitter.com' ) > -1 ) {
455 | cssClass += ' is-tweet';
456 | } else {
457 | cssClass += ' is-video';
458 | }
459 |
460 | $element.attr( 'data-wp-src', src ).find( 'span' ).text( __( 'suggestedEmbedAlt' ).replace( '%d', i + 1 ) );
461 |
462 | if ( displaySrc ) {
463 | $element.css( 'background-image', 'url(' + displaySrc + ')' );
464 | }
465 |
466 | $mediaList.append( $element );
467 | found++;
468 | } );
469 | }
470 |
471 | if ( data._images ) {
472 | $.each( data._images, function( i, src ) {
473 | var displaySrc, img = new Image();
474 |
475 | src = checkUrl( src );
476 | displaySrc = src.replace( /^(http[^\?]+)(\?.*)?$/, '$1' );
477 |
478 | if ( src.indexOf( 'files.wordpress.com/' ) > -1 ) {
479 | displaySrc = displaySrc.replace( /\?.*$/, '' ) + '?w=' + smallestWidth;
480 | } else if ( src.indexOf( 'gravatar.com/' ) > -1 ) {
481 | displaySrc = displaySrc.replace( /\?.*$/, '' ) + '?s=' + smallestWidth;
482 | } else {
483 | displaySrc = src;
484 | }
485 |
486 | img.onload = function() {
487 | if ( ( img.width && img.width < 256 ) ||
488 | ( img.height && img.height < 128 ) ) {
489 |
490 | return;
491 | }
492 |
493 | addImg( src, displaySrc, i );
494 | };
495 |
496 | img.src = src;
497 | found++;
498 | } );
499 | }
500 |
501 | if ( found ) {
502 | $( '.media-list-container' ).addClass( 'has-media' );
503 | }
504 | }
505 |
506 | /* ***************************************************************
507 | * MONITORING FUNCTIONS
508 | *************************************************************** */
509 |
510 | /**
511 | * Interactive navigation behavior for the options modal (post format, tags, categories)
512 | */
513 | function monitorOptionsModal() {
514 | var $postOptions = $( '.post-options' ),
515 | $postOption = $( '.post-option' ),
516 | $settingModal = $( '.setting-modal' ),
517 | $modalClose = $( '.modal-close' );
518 |
519 | $postOption.on( 'click', function() {
520 | var index = $( this ).index(),
521 | $targetSettingModal = $settingModal.eq( index );
522 |
523 | $postOptions.addClass( isOffScreen )
524 | .one( transitionEndEvent, function() {
525 | $( this ).addClass( isHidden );
526 | } );
527 |
528 | $targetSettingModal.removeClass( offscreenHidden )
529 | .one( transitionEndEvent, function() {
530 | $( this ).find( '.modal-close' ).focus();
531 | } );
532 | } );
533 |
534 | $modalClose.on( 'click', function() {
535 | var $targetSettingModal = $( this ).parent(),
536 | index = $targetSettingModal.index();
537 |
538 | $postOptions.removeClass( offscreenHidden );
539 | $targetSettingModal.addClass( isOffScreen );
540 |
541 | if ( transitionEndEvent ) {
542 | $targetSettingModal.one( transitionEndEvent, function() {
543 | $( this ).addClass( isHidden );
544 | $postOption.eq( index - 1 ).focus();
545 | } );
546 | } else {
547 | setTimeout( function() {
548 | $targetSettingModal.addClass( isHidden );
549 | $postOption.eq( index - 1 ).focus();
550 | }, 350 );
551 | }
552 | } );
553 | }
554 |
555 | /**
556 | * Interactive behavior for the sidebar toggle, to show the options modals
557 | */
558 | function openSidebar() {
559 | sidebarIsOpen = true;
560 |
561 | $( '.options' ).removeClass( 'closed' ).addClass( 'open' );
562 | $( '.press-this-actions, #scanbar' ).addClass( isHidden );
563 | $( '.options-panel-back' ).removeClass( isHidden );
564 |
565 | $( '.options-panel' ).removeClass( offscreenHidden )
566 | .one( transitionEndEvent, function() {
567 | $( '.post-option:first' ).focus();
568 | } );
569 | }
570 |
571 | function closeSidebar() {
572 | sidebarIsOpen = false;
573 |
574 | $( '.options' ).removeClass( 'open' ).addClass( 'closed' );
575 | $( '.options-panel-back' ).addClass( isHidden );
576 | $( '.press-this-actions, #scanbar' ).removeClass( isHidden );
577 |
578 | $( '.options-panel' ).addClass( isOffScreen )
579 | .one( transitionEndEvent, function() {
580 | $( this ).addClass( isHidden );
581 | // Reset to options list
582 | $( '.post-options' ).removeClass( offscreenHidden );
583 | $( '.setting-modal').addClass( offscreenHidden );
584 | });
585 | }
586 |
587 | /**
588 | * Interactive behavior for the post title's field placeholder
589 | */
590 | function monitorPlaceholder() {
591 | var $titleField = $( '#title-container' ),
592 | $placeholder = $( '.post-title-placeholder' );
593 |
594 | $titleField.on( 'focus', function() {
595 | $placeholder.addClass( 'is-hidden' );
596 | }).on( 'blur', function() {
597 | if ( ! $titleField.text() && ! $titleField.html() ) {
598 | $placeholder.removeClass( 'is-hidden' );
599 | }
600 | }).on( 'keyup', function() {
601 | saveAlert = true;
602 | }).on( 'paste', function( event ) {
603 | var text, range,
604 | clipboard = event.originalEvent.clipboardData || window.clipboardData;
605 |
606 | if ( clipboard ) {
607 | try{
608 | text = clipboard.getData( 'Text' ) || clipboard.getData( 'text/plain' );
609 |
610 | if ( text ) {
611 | text = $.trim( text.replace( /\s+/g, ' ' ) );
612 |
613 | if ( window.getSelection ) {
614 | range = window.getSelection().getRangeAt(0);
615 |
616 | if ( range ) {
617 | if ( ! range.collapsed ) {
618 | range.deleteContents();
619 | }
620 |
621 | range.insertNode( document.createTextNode( text ) );
622 | }
623 | } else if ( document.selection ) {
624 | range = document.selection.createRange();
625 |
626 | if ( range ) {
627 | range.text = text;
628 | }
629 | }
630 | }
631 | } catch ( er ) {}
632 |
633 | event.preventDefault();
634 | }
635 |
636 | saveAlert = true;
637 |
638 | setTimeout( function() {
639 | $titleField.text( getTitleText() );
640 | }, 50 );
641 | });
642 |
643 | if ( $titleField.text() || $titleField.html() ) {
644 | $placeholder.addClass('is-hidden');
645 | }
646 | }
647 |
648 | function toggleCatItem( $element ) {
649 | if ( $element.hasClass( 'selected' ) ) {
650 | $element.removeClass( 'selected' ).attr( 'aria-checked', 'false' );
651 | } else {
652 | $element.addClass( 'selected' ).attr( 'aria-checked', 'true' );
653 | }
654 | }
655 |
656 | function monitorCatList() {
657 | $( '.categories-select' ).on( 'click.press-this keydown.press-this', function( event ) {
658 | var $element = $( event.target );
659 |
660 | if ( $element.is( 'div.category' ) ) {
661 | if ( event.type === 'keydown' && event.keyCode !== 32 ) {
662 | return;
663 | }
664 |
665 | toggleCatItem( $element );
666 | event.preventDefault();
667 | }
668 | });
669 | }
670 |
671 | function splitButtonClose() {
672 | $( '.split-button' ).removeClass( 'is-open' );
673 | $( '.split-button-toggle' ).attr( 'aria-expanded', 'false' );
674 | }
675 |
676 | /* ***************************************************************
677 | * PROCESSING FUNCTIONS
678 | *************************************************************** */
679 |
680 | /**
681 | * Calls all the rendring related functions to happen on page load
682 | */
683 | function render(){
684 | // We're on!
685 | renderToolsVisibility();
686 | renderDetectedMedia();
687 | renderStartupNotices();
688 |
689 | if ( window.tagBox ) {
690 | window.tagBox.init();
691 | }
692 |
693 | // iOS doesn't fire click events on "standard" elements without this...
694 | if ( iOS ) {
695 | $( document.body ).css( 'cursor', 'pointer' );
696 | }
697 | }
698 |
699 | /**
700 | * Set app events and other state monitoring related code.
701 | */
702 | function monitor() {
703 | var $splitButton = $( '.split-button' );
704 |
705 | $document.on( 'tinymce-editor-init', function( event, ed ) {
706 | editor = ed;
707 |
708 | editor.on( 'nodechange', function() {
709 | hasSetFocus = true;
710 | });
711 |
712 | editor.on( 'focus', function() {
713 | splitButtonClose();
714 | });
715 |
716 | editor.on( 'show', function() {
717 | setTimeout( function() {
718 | editor.execCommand( 'wpAutoResize' );
719 | }, 300 );
720 | });
721 |
722 | editor.on( 'hide', function() {
723 | setTimeout( function() {
724 | textEditorResize( 'reset' );
725 | }, 100 );
726 | });
727 |
728 | editor.on( 'keyup', mceKeyup );
729 | editor.on( 'undo redo', mceScroll );
730 |
731 | }).on( 'click.press-this keypress.press-this', '.suggested-media-thumbnail', function( event ) {
732 | if ( event.type === 'click' || event.keyCode === 13 ) {
733 | insertSelectedMedia( $( this ) );
734 | }
735 | }).on( 'click.press-this', function( event ) {
736 | if ( ! $( event.target ).closest( 'button' ).hasClass( 'split-button-toggle' ) ) {
737 | splitButtonClose();
738 | }
739 | });
740 |
741 | // Publish, Draft and Preview buttons
742 | $( '.post-actions' ).on( 'click.press-this', function( event ) {
743 | var location,
744 | $target = $( event.target ),
745 | $button = $target.closest( 'button' );
746 |
747 | if ( $button.length ) {
748 | if ( $button.hasClass( 'draft-button' ) ) {
749 | $( '.publish-button' ).addClass( 'is-saving' );
750 | submitPost( 'draft' );
751 | } else if ( $button.hasClass( 'publish-button' ) ) {
752 | $button.addClass( 'is-saving' );
753 |
754 | if ( window.history.replaceState ) {
755 | location = window.location.href;
756 | location += ( location.indexOf( '?' ) !== -1 ) ? '&' : '?';
757 | location += 'wp-press-this-reload=true';
758 |
759 | window.history.replaceState( null, null, location );
760 | }
761 |
762 | submitPost( 'publish' );
763 | } else if ( $button.hasClass( 'preview-button' ) ) {
764 | prepareFormData();
765 | window.opener && window.opener.focus();
766 |
767 | $( '#wp-preview' ).val( 'dopreview' );
768 | $( '#pressthis-form' ).attr( 'target', '_blank' ).submit().attr( 'target', '' );
769 | $( '#wp-preview' ).val( '' );
770 | } else if ( $button.hasClass( 'standard-editor-button' ) ) {
771 | $( '.publish-button' ).addClass( 'is-saving' );
772 | $( '#pt-force-redirect' ).val( 'true' );
773 | submitPost( 'draft' );
774 | } else if ( $button.hasClass( 'split-button-toggle' ) ) {
775 | if ( $splitButton.hasClass( 'is-open' ) ) {
776 | $splitButton.removeClass( 'is-open' );
777 | $button.attr( 'aria-expanded', 'false' );
778 | } else {
779 | $splitButton.addClass( 'is-open' );
780 | $button.attr( 'aria-expanded', 'true' );
781 | }
782 | }
783 | }
784 | });
785 |
786 | monitorOptionsModal();
787 | monitorPlaceholder();
788 | monitorCatList();
789 |
790 | $( '.options' ).on( 'click.press-this', function() {
791 | if ( $( this ).hasClass( 'open' ) ) {
792 | closeSidebar();
793 | } else {
794 | openSidebar();
795 | }
796 | });
797 |
798 | // Close the sidebar when focus moves outside of it.
799 | $( '.options-panel, .options-panel-back' ).on( 'focusout.press-this', function() {
800 | setTimeout( function() {
801 | var node = document.activeElement,
802 | $node = $( node );
803 |
804 | if ( sidebarIsOpen && node && ! $node.hasClass( 'options-panel-back' ) &&
805 | ( node.nodeName === 'BODY' ||
806 | ( ! $node.closest( '.options-panel' ).length &&
807 | ! $node.closest( '.options' ).length ) ) ) {
808 |
809 | closeSidebar();
810 | }
811 | }, 50 );
812 | });
813 |
814 | $( '#post-formats-select input' ).on( 'change', function() {
815 | var $this = $( this );
816 |
817 | if ( $this.is( ':checked' ) ) {
818 | $( '#post-option-post-format' ).text( $( 'label[for="' + $this.attr( 'id' ) + '"]' ).text() || '' );
819 | }
820 | } );
821 |
822 | $window.on( 'beforeunload.press-this', function() {
823 | if ( saveAlert || ( editor && editor.isDirty() ) ) {
824 | return __( 'saveAlert' );
825 | }
826 | } ).on( 'resize.press-this', function() {
827 | if ( ! editor || editor.isHidden() ) {
828 | textEditorResize( 'reset' );
829 | }
830 | });
831 |
832 | $( 'button.add-cat-toggle' ).on( 'click.press-this', function() {
833 | var $this = $( this );
834 |
835 | $this.toggleClass( 'is-toggled' );
836 | $this.attr( 'aria-expanded', 'false' === $this.attr( 'aria-expanded' ) ? 'true' : 'false' );
837 | $( '.setting-modal .add-category, .categories-search-wrapper' ).toggleClass( 'is-hidden' );
838 | } );
839 |
840 | $( 'button.add-cat-submit' ).on( 'click.press-this', saveNewCategory );
841 |
842 | $( '.categories-search' ).on( 'keyup.press-this', function() {
843 | var search = $( this ).val().toLowerCase() || '';
844 |
845 | // Don't search when less thasn 3 extended ASCII chars
846 | if ( /[\x20-\xFF]+/.test( search ) && search.length < 2 ) {
847 | return;
848 | }
849 |
850 | $.each( catsCache, function( i, cat ) {
851 | cat.node.removeClass( 'is-hidden searched-parent' );
852 | } );
853 |
854 | if ( search ) {
855 | $.each( catsCache, function( i, cat ) {
856 | if ( cat.text.indexOf( search ) === -1 ) {
857 | cat.node.addClass( 'is-hidden' );
858 | } else {
859 | cat.parents.addClass( 'searched-parent' );
860 | }
861 | } );
862 | }
863 | } );
864 |
865 | $textEditor.on( 'focus.press-this input.press-this propertychange.press-this', textEditorResize );
866 |
867 | return true;
868 | }
869 |
870 | function refreshCatsCache() {
871 | $( '.categories-select' ).find( 'li' ).each( function() {
872 | var $this = $( this );
873 |
874 | catsCache.push( {
875 | node: $this,
876 | parents: $this.parents( 'li' ),
877 | text: $this.children( '.category' ).text().toLowerCase()
878 | } );
879 | } );
880 | }
881 |
882 | // Let's go!
883 | $document.ready( function() {
884 | render();
885 | monitor();
886 | refreshCatsCache();
887 | });
888 |
889 | // Expose public methods?
890 | return {
891 | renderNotice: renderNotice,
892 | renderError: renderError
893 | };
894 | };
895 |
896 | window.wp = window.wp || {};
897 | window.wp.pressThis = new PressThis();
898 |
899 | }( jQuery, window ));
900 |
--------------------------------------------------------------------------------
/assets/spinner-2x.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/press-this/79fad02b9b7d7ad31a49e3475c09548cc24d8c5f/assets/spinner-2x.gif
--------------------------------------------------------------------------------
/assets/spinner.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WordPress/press-this/79fad02b9b7d7ad31a49e3475c09548cc24d8c5f/assets/spinner.gif
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "wordpress/press-this",
3 | "description": "A little tool that lets you grab bits of the web and create new posts with ease.",
4 | "type": "project",
5 | "license": "GPL-2.0-or-later",
6 | "require": {},
7 | "require-dev": {
8 | "dealerdirect/phpcodesniffer-composer-installer": "v1.0.0",
9 | "phpcompatibility/phpcompatibility-wp": "2.1.0",
10 | "sirbrillig/phpcs-changed": "^2.11",
11 | "sirbrillig/phpcs-variable-analysis": "^2",
12 | "wp-coding-standards/wpcs": "3.0.1"
13 | },
14 | "scripts": {
15 | "php:compatibility": "vendor/bin/phpcs -p -s --runtime-set testVersion '5.6-' --standard=PHPCompatibilityWP --ignore=docker,tools,tests,node_modules,vendor --extensions=php",
16 | "php:lint": "vendor/bin/phpcs -p -s",
17 | "php:changed": "vendor/sirbrillig/phpcs-changed/bin/phpcs-changed --git",
18 | "php:autofix": "vendor/bin/phpcbf",
19 | "php:lint:errors": "vendor/bin/phpcs -p -s --runtime-set ignore_warnings_on_exit 1"
20 | },
21 | "config": {
22 | "allow-plugins": {
23 | "dealerdirect/phpcodesniffer-composer-installer": true
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/composer.lock:
--------------------------------------------------------------------------------
1 | {
2 | "_readme": [
3 | "This file locks the dependencies of your project to a known state",
4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5 | "This file is @generated automatically"
6 | ],
7 | "content-hash": "70555fd8a8be99b45a64f335372be9db",
8 | "packages": [],
9 | "packages-dev": [
10 | {
11 | "name": "dealerdirect/phpcodesniffer-composer-installer",
12 | "version": "v1.0.0",
13 | "source": {
14 | "type": "git",
15 | "url": "https://github.com/PHPCSStandards/composer-installer.git",
16 | "reference": "4be43904336affa5c2f70744a348312336afd0da"
17 | },
18 | "dist": {
19 | "type": "zip",
20 | "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/4be43904336affa5c2f70744a348312336afd0da",
21 | "reference": "4be43904336affa5c2f70744a348312336afd0da",
22 | "shasum": ""
23 | },
24 | "require": {
25 | "composer-plugin-api": "^1.0 || ^2.0",
26 | "php": ">=5.4",
27 | "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0"
28 | },
29 | "require-dev": {
30 | "composer/composer": "*",
31 | "ext-json": "*",
32 | "ext-zip": "*",
33 | "php-parallel-lint/php-parallel-lint": "^1.3.1",
34 | "phpcompatibility/php-compatibility": "^9.0",
35 | "yoast/phpunit-polyfills": "^1.0"
36 | },
37 | "type": "composer-plugin",
38 | "extra": {
39 | "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
40 | },
41 | "autoload": {
42 | "psr-4": {
43 | "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
44 | }
45 | },
46 | "notification-url": "https://packagist.org/downloads/",
47 | "license": [
48 | "MIT"
49 | ],
50 | "authors": [
51 | {
52 | "name": "Franck Nijhof",
53 | "email": "franck.nijhof@dealerdirect.com",
54 | "homepage": "http://www.frenck.nl",
55 | "role": "Developer / IT Manager"
56 | },
57 | {
58 | "name": "Contributors",
59 | "homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors"
60 | }
61 | ],
62 | "description": "PHP_CodeSniffer Standards Composer Installer Plugin",
63 | "homepage": "http://www.dealerdirect.com",
64 | "keywords": [
65 | "PHPCodeSniffer",
66 | "PHP_CodeSniffer",
67 | "code quality",
68 | "codesniffer",
69 | "composer",
70 | "installer",
71 | "phpcbf",
72 | "phpcs",
73 | "plugin",
74 | "qa",
75 | "quality",
76 | "standard",
77 | "standards",
78 | "style guide",
79 | "stylecheck",
80 | "tests"
81 | ],
82 | "support": {
83 | "issues": "https://github.com/PHPCSStandards/composer-installer/issues",
84 | "source": "https://github.com/PHPCSStandards/composer-installer"
85 | },
86 | "time": "2023-01-05T11:28:13+00:00"
87 | },
88 | {
89 | "name": "phpcompatibility/php-compatibility",
90 | "version": "9.3.5",
91 | "source": {
92 | "type": "git",
93 | "url": "https://github.com/PHPCompatibility/PHPCompatibility.git",
94 | "reference": "9fb324479acf6f39452e0655d2429cc0d3914243"
95 | },
96 | "dist": {
97 | "type": "zip",
98 | "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9fb324479acf6f39452e0655d2429cc0d3914243",
99 | "reference": "9fb324479acf6f39452e0655d2429cc0d3914243",
100 | "shasum": ""
101 | },
102 | "require": {
103 | "php": ">=5.3",
104 | "squizlabs/php_codesniffer": "^2.3 || ^3.0.2"
105 | },
106 | "conflict": {
107 | "squizlabs/php_codesniffer": "2.6.2"
108 | },
109 | "require-dev": {
110 | "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0"
111 | },
112 | "suggest": {
113 | "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.",
114 | "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
115 | },
116 | "type": "phpcodesniffer-standard",
117 | "notification-url": "https://packagist.org/downloads/",
118 | "license": [
119 | "LGPL-3.0-or-later"
120 | ],
121 | "authors": [
122 | {
123 | "name": "Wim Godden",
124 | "homepage": "https://github.com/wimg",
125 | "role": "lead"
126 | },
127 | {
128 | "name": "Juliette Reinders Folmer",
129 | "homepage": "https://github.com/jrfnl",
130 | "role": "lead"
131 | },
132 | {
133 | "name": "Contributors",
134 | "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors"
135 | }
136 | ],
137 | "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.",
138 | "homepage": "http://techblog.wimgodden.be/tag/codesniffer/",
139 | "keywords": [
140 | "compatibility",
141 | "phpcs",
142 | "standards"
143 | ],
144 | "support": {
145 | "issues": "https://github.com/PHPCompatibility/PHPCompatibility/issues",
146 | "source": "https://github.com/PHPCompatibility/PHPCompatibility"
147 | },
148 | "time": "2019-12-27T09:44:58+00:00"
149 | },
150 | {
151 | "name": "phpcompatibility/phpcompatibility-paragonie",
152 | "version": "1.3.2",
153 | "source": {
154 | "type": "git",
155 | "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git",
156 | "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26"
157 | },
158 | "dist": {
159 | "type": "zip",
160 | "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/bba5a9dfec7fcfbd679cfaf611d86b4d3759da26",
161 | "reference": "bba5a9dfec7fcfbd679cfaf611d86b4d3759da26",
162 | "shasum": ""
163 | },
164 | "require": {
165 | "phpcompatibility/php-compatibility": "^9.0"
166 | },
167 | "require-dev": {
168 | "dealerdirect/phpcodesniffer-composer-installer": "^0.7",
169 | "paragonie/random_compat": "dev-master",
170 | "paragonie/sodium_compat": "dev-master"
171 | },
172 | "suggest": {
173 | "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
174 | "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
175 | },
176 | "type": "phpcodesniffer-standard",
177 | "notification-url": "https://packagist.org/downloads/",
178 | "license": [
179 | "LGPL-3.0-or-later"
180 | ],
181 | "authors": [
182 | {
183 | "name": "Wim Godden",
184 | "role": "lead"
185 | },
186 | {
187 | "name": "Juliette Reinders Folmer",
188 | "role": "lead"
189 | }
190 | ],
191 | "description": "A set of rulesets for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by the Paragonie polyfill libraries.",
192 | "homepage": "http://phpcompatibility.com/",
193 | "keywords": [
194 | "compatibility",
195 | "paragonie",
196 | "phpcs",
197 | "polyfill",
198 | "standards",
199 | "static analysis"
200 | ],
201 | "support": {
202 | "issues": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie/issues",
203 | "source": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie"
204 | },
205 | "time": "2022-10-25T01:46:02+00:00"
206 | },
207 | {
208 | "name": "phpcompatibility/phpcompatibility-wp",
209 | "version": "2.1.0",
210 | "source": {
211 | "type": "git",
212 | "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git",
213 | "reference": "41bef18ba688af638b7310666db28e1ea9158b2f"
214 | },
215 | "dist": {
216 | "type": "zip",
217 | "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/41bef18ba688af638b7310666db28e1ea9158b2f",
218 | "reference": "41bef18ba688af638b7310666db28e1ea9158b2f",
219 | "shasum": ""
220 | },
221 | "require": {
222 | "phpcompatibility/php-compatibility": "^9.0",
223 | "phpcompatibility/phpcompatibility-paragonie": "^1.0"
224 | },
225 | "require-dev": {
226 | "dealerdirect/phpcodesniffer-composer-installer": "^0.5"
227 | },
228 | "suggest": {
229 | "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
230 | "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
231 | },
232 | "type": "phpcodesniffer-standard",
233 | "notification-url": "https://packagist.org/downloads/",
234 | "license": [
235 | "LGPL-3.0-or-later"
236 | ],
237 | "authors": [
238 | {
239 | "name": "Wim Godden",
240 | "role": "lead"
241 | },
242 | {
243 | "name": "Juliette Reinders Folmer",
244 | "role": "lead"
245 | }
246 | ],
247 | "description": "A ruleset for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.",
248 | "homepage": "http://phpcompatibility.com/",
249 | "keywords": [
250 | "compatibility",
251 | "phpcs",
252 | "standards",
253 | "wordpress"
254 | ],
255 | "support": {
256 | "issues": "https://github.com/PHPCompatibility/PHPCompatibilityWP/issues",
257 | "source": "https://github.com/PHPCompatibility/PHPCompatibilityWP"
258 | },
259 | "time": "2019-08-28T14:22:28+00:00"
260 | },
261 | {
262 | "name": "phpcsstandards/phpcsextra",
263 | "version": "1.2.1",
264 | "source": {
265 | "type": "git",
266 | "url": "https://github.com/PHPCSStandards/PHPCSExtra.git",
267 | "reference": "11d387c6642b6e4acaf0bd9bf5203b8cca1ec489"
268 | },
269 | "dist": {
270 | "type": "zip",
271 | "url": "https://api.github.com/repos/PHPCSStandards/PHPCSExtra/zipball/11d387c6642b6e4acaf0bd9bf5203b8cca1ec489",
272 | "reference": "11d387c6642b6e4acaf0bd9bf5203b8cca1ec489",
273 | "shasum": ""
274 | },
275 | "require": {
276 | "php": ">=5.4",
277 | "phpcsstandards/phpcsutils": "^1.0.9",
278 | "squizlabs/php_codesniffer": "^3.8.0"
279 | },
280 | "require-dev": {
281 | "php-parallel-lint/php-console-highlighter": "^1.0",
282 | "php-parallel-lint/php-parallel-lint": "^1.3.2",
283 | "phpcsstandards/phpcsdevcs": "^1.1.6",
284 | "phpcsstandards/phpcsdevtools": "^1.2.1",
285 | "phpunit/phpunit": "^4.5 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
286 | },
287 | "type": "phpcodesniffer-standard",
288 | "extra": {
289 | "branch-alias": {
290 | "dev-stable": "1.x-dev",
291 | "dev-develop": "1.x-dev"
292 | }
293 | },
294 | "notification-url": "https://packagist.org/downloads/",
295 | "license": [
296 | "LGPL-3.0-or-later"
297 | ],
298 | "authors": [
299 | {
300 | "name": "Juliette Reinders Folmer",
301 | "homepage": "https://github.com/jrfnl",
302 | "role": "lead"
303 | },
304 | {
305 | "name": "Contributors",
306 | "homepage": "https://github.com/PHPCSStandards/PHPCSExtra/graphs/contributors"
307 | }
308 | ],
309 | "description": "A collection of sniffs and standards for use with PHP_CodeSniffer.",
310 | "keywords": [
311 | "PHP_CodeSniffer",
312 | "phpcbf",
313 | "phpcodesniffer-standard",
314 | "phpcs",
315 | "standards",
316 | "static analysis"
317 | ],
318 | "support": {
319 | "issues": "https://github.com/PHPCSStandards/PHPCSExtra/issues",
320 | "security": "https://github.com/PHPCSStandards/PHPCSExtra/security/policy",
321 | "source": "https://github.com/PHPCSStandards/PHPCSExtra"
322 | },
323 | "funding": [
324 | {
325 | "url": "https://github.com/PHPCSStandards",
326 | "type": "github"
327 | },
328 | {
329 | "url": "https://github.com/jrfnl",
330 | "type": "github"
331 | },
332 | {
333 | "url": "https://opencollective.com/php_codesniffer",
334 | "type": "open_collective"
335 | }
336 | ],
337 | "time": "2023-12-08T16:49:07+00:00"
338 | },
339 | {
340 | "name": "phpcsstandards/phpcsutils",
341 | "version": "1.0.9",
342 | "source": {
343 | "type": "git",
344 | "url": "https://github.com/PHPCSStandards/PHPCSUtils.git",
345 | "reference": "908247bc65010c7b7541a9551e002db12e9dae70"
346 | },
347 | "dist": {
348 | "type": "zip",
349 | "url": "https://api.github.com/repos/PHPCSStandards/PHPCSUtils/zipball/908247bc65010c7b7541a9551e002db12e9dae70",
350 | "reference": "908247bc65010c7b7541a9551e002db12e9dae70",
351 | "shasum": ""
352 | },
353 | "require": {
354 | "dealerdirect/phpcodesniffer-composer-installer": "^0.4.1 || ^0.5 || ^0.6.2 || ^0.7 || ^1.0",
355 | "php": ">=5.4",
356 | "squizlabs/php_codesniffer": "^3.8.0 || 4.0.x-dev@dev"
357 | },
358 | "require-dev": {
359 | "ext-filter": "*",
360 | "php-parallel-lint/php-console-highlighter": "^1.0",
361 | "php-parallel-lint/php-parallel-lint": "^1.3.2",
362 | "phpcsstandards/phpcsdevcs": "^1.1.6",
363 | "yoast/phpunit-polyfills": "^1.1.0 || ^2.0.0"
364 | },
365 | "type": "phpcodesniffer-standard",
366 | "extra": {
367 | "branch-alias": {
368 | "dev-stable": "1.x-dev",
369 | "dev-develop": "1.x-dev"
370 | }
371 | },
372 | "autoload": {
373 | "classmap": [
374 | "PHPCSUtils/"
375 | ]
376 | },
377 | "notification-url": "https://packagist.org/downloads/",
378 | "license": [
379 | "LGPL-3.0-or-later"
380 | ],
381 | "authors": [
382 | {
383 | "name": "Juliette Reinders Folmer",
384 | "homepage": "https://github.com/jrfnl",
385 | "role": "lead"
386 | },
387 | {
388 | "name": "Contributors",
389 | "homepage": "https://github.com/PHPCSStandards/PHPCSUtils/graphs/contributors"
390 | }
391 | ],
392 | "description": "A suite of utility functions for use with PHP_CodeSniffer",
393 | "homepage": "https://phpcsutils.com/",
394 | "keywords": [
395 | "PHP_CodeSniffer",
396 | "phpcbf",
397 | "phpcodesniffer-standard",
398 | "phpcs",
399 | "phpcs3",
400 | "standards",
401 | "static analysis",
402 | "tokens",
403 | "utility"
404 | ],
405 | "support": {
406 | "docs": "https://phpcsutils.com/",
407 | "issues": "https://github.com/PHPCSStandards/PHPCSUtils/issues",
408 | "security": "https://github.com/PHPCSStandards/PHPCSUtils/security/policy",
409 | "source": "https://github.com/PHPCSStandards/PHPCSUtils"
410 | },
411 | "funding": [
412 | {
413 | "url": "https://github.com/PHPCSStandards",
414 | "type": "github"
415 | },
416 | {
417 | "url": "https://github.com/jrfnl",
418 | "type": "github"
419 | },
420 | {
421 | "url": "https://opencollective.com/php_codesniffer",
422 | "type": "open_collective"
423 | }
424 | ],
425 | "time": "2023-12-08T14:50:00+00:00"
426 | },
427 | {
428 | "name": "sirbrillig/phpcs-changed",
429 | "version": "v2.11.4",
430 | "source": {
431 | "type": "git",
432 | "url": "https://github.com/sirbrillig/phpcs-changed.git",
433 | "reference": "acc946731ec65053e49cb0d3185c8ffe74895f93"
434 | },
435 | "dist": {
436 | "type": "zip",
437 | "url": "https://api.github.com/repos/sirbrillig/phpcs-changed/zipball/acc946731ec65053e49cb0d3185c8ffe74895f93",
438 | "reference": "acc946731ec65053e49cb0d3185c8ffe74895f93",
439 | "shasum": ""
440 | },
441 | "require": {
442 | "php": "^7.1 || ^8.0"
443 | },
444 | "require-dev": {
445 | "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
446 | "phpunit/phpunit": "^6.4 || ^9.5",
447 | "sirbrillig/phpcs-variable-analysis": "^2.1.3",
448 | "squizlabs/php_codesniffer": "^3.2.1",
449 | "vimeo/psalm": "^0.2 || ^0.3 || ^1.1 || ^4.24 || ^5.0@beta"
450 | },
451 | "bin": [
452 | "bin/phpcs-changed"
453 | ],
454 | "type": "library",
455 | "autoload": {
456 | "files": [
457 | "PhpcsChanged/Cli.php",
458 | "PhpcsChanged/functions.php"
459 | ],
460 | "psr-4": {
461 | "PhpcsChanged\\": "PhpcsChanged/"
462 | }
463 | },
464 | "notification-url": "https://packagist.org/downloads/",
465 | "license": [
466 | "MIT"
467 | ],
468 | "authors": [
469 | {
470 | "name": "Payton Swick",
471 | "email": "payton@foolord.com"
472 | }
473 | ],
474 | "description": "Run phpcs on files, but only report warnings/errors from lines which were changed.",
475 | "support": {
476 | "issues": "https://github.com/sirbrillig/phpcs-changed/issues",
477 | "source": "https://github.com/sirbrillig/phpcs-changed/tree/v2.11.4"
478 | },
479 | "time": "2023-09-29T21:27:51+00:00"
480 | },
481 | {
482 | "name": "sirbrillig/phpcs-variable-analysis",
483 | "version": "v2.11.17",
484 | "source": {
485 | "type": "git",
486 | "url": "https://github.com/sirbrillig/phpcs-variable-analysis.git",
487 | "reference": "3b71162a6bf0cde2bff1752e40a1788d8273d049"
488 | },
489 | "dist": {
490 | "type": "zip",
491 | "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/3b71162a6bf0cde2bff1752e40a1788d8273d049",
492 | "reference": "3b71162a6bf0cde2bff1752e40a1788d8273d049",
493 | "shasum": ""
494 | },
495 | "require": {
496 | "php": ">=5.4.0",
497 | "squizlabs/php_codesniffer": "^3.5.6"
498 | },
499 | "require-dev": {
500 | "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || ^1.0",
501 | "phpcsstandards/phpcsdevcs": "^1.1",
502 | "phpstan/phpstan": "^1.7",
503 | "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.5 || ^7.0 || ^8.0 || ^9.0",
504 | "sirbrillig/phpcs-import-detection": "^1.1",
505 | "vimeo/psalm": "^0.2 || ^0.3 || ^1.1 || ^4.24 || ^5.0@beta"
506 | },
507 | "type": "phpcodesniffer-standard",
508 | "autoload": {
509 | "psr-4": {
510 | "VariableAnalysis\\": "VariableAnalysis/"
511 | }
512 | },
513 | "notification-url": "https://packagist.org/downloads/",
514 | "license": [
515 | "BSD-2-Clause"
516 | ],
517 | "authors": [
518 | {
519 | "name": "Sam Graham",
520 | "email": "php-codesniffer-variableanalysis@illusori.co.uk"
521 | },
522 | {
523 | "name": "Payton Swick",
524 | "email": "payton@foolord.com"
525 | }
526 | ],
527 | "description": "A PHPCS sniff to detect problems with variables.",
528 | "keywords": [
529 | "phpcs",
530 | "static analysis"
531 | ],
532 | "support": {
533 | "issues": "https://github.com/sirbrillig/phpcs-variable-analysis/issues",
534 | "source": "https://github.com/sirbrillig/phpcs-variable-analysis",
535 | "wiki": "https://github.com/sirbrillig/phpcs-variable-analysis/wiki"
536 | },
537 | "time": "2023-08-05T23:46:11+00:00"
538 | },
539 | {
540 | "name": "squizlabs/php_codesniffer",
541 | "version": "3.9.0",
542 | "source": {
543 | "type": "git",
544 | "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
545 | "reference": "d63cee4890a8afaf86a22e51ad4d97c91dd4579b"
546 | },
547 | "dist": {
548 | "type": "zip",
549 | "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/d63cee4890a8afaf86a22e51ad4d97c91dd4579b",
550 | "reference": "d63cee4890a8afaf86a22e51ad4d97c91dd4579b",
551 | "shasum": ""
552 | },
553 | "require": {
554 | "ext-simplexml": "*",
555 | "ext-tokenizer": "*",
556 | "ext-xmlwriter": "*",
557 | "php": ">=5.4.0"
558 | },
559 | "require-dev": {
560 | "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4"
561 | },
562 | "bin": [
563 | "bin/phpcbf",
564 | "bin/phpcs"
565 | ],
566 | "type": "library",
567 | "extra": {
568 | "branch-alias": {
569 | "dev-master": "3.x-dev"
570 | }
571 | },
572 | "notification-url": "https://packagist.org/downloads/",
573 | "license": [
574 | "BSD-3-Clause"
575 | ],
576 | "authors": [
577 | {
578 | "name": "Greg Sherwood",
579 | "role": "Former lead"
580 | },
581 | {
582 | "name": "Juliette Reinders Folmer",
583 | "role": "Current lead"
584 | },
585 | {
586 | "name": "Contributors",
587 | "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors"
588 | }
589 | ],
590 | "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
591 | "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer",
592 | "keywords": [
593 | "phpcs",
594 | "standards",
595 | "static analysis"
596 | ],
597 | "support": {
598 | "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues",
599 | "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy",
600 | "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer",
601 | "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki"
602 | },
603 | "funding": [
604 | {
605 | "url": "https://github.com/PHPCSStandards",
606 | "type": "github"
607 | },
608 | {
609 | "url": "https://github.com/jrfnl",
610 | "type": "github"
611 | },
612 | {
613 | "url": "https://opencollective.com/php_codesniffer",
614 | "type": "open_collective"
615 | }
616 | ],
617 | "time": "2024-02-16T15:06:51+00:00"
618 | },
619 | {
620 | "name": "wp-coding-standards/wpcs",
621 | "version": "3.0.1",
622 | "source": {
623 | "type": "git",
624 | "url": "https://github.com/WordPress/WordPress-Coding-Standards.git",
625 | "reference": "b4caf9689f1a0e4a4c632679a44e638c1c67aff1"
626 | },
627 | "dist": {
628 | "type": "zip",
629 | "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/b4caf9689f1a0e4a4c632679a44e638c1c67aff1",
630 | "reference": "b4caf9689f1a0e4a4c632679a44e638c1c67aff1",
631 | "shasum": ""
632 | },
633 | "require": {
634 | "ext-filter": "*",
635 | "ext-libxml": "*",
636 | "ext-tokenizer": "*",
637 | "ext-xmlreader": "*",
638 | "php": ">=5.4",
639 | "phpcsstandards/phpcsextra": "^1.1.0",
640 | "phpcsstandards/phpcsutils": "^1.0.8",
641 | "squizlabs/php_codesniffer": "^3.7.2"
642 | },
643 | "require-dev": {
644 | "php-parallel-lint/php-console-highlighter": "^1.0.0",
645 | "php-parallel-lint/php-parallel-lint": "^1.3.2",
646 | "phpcompatibility/php-compatibility": "^9.0",
647 | "phpcsstandards/phpcsdevtools": "^1.2.0",
648 | "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
649 | },
650 | "suggest": {
651 | "ext-iconv": "For improved results",
652 | "ext-mbstring": "For improved results"
653 | },
654 | "type": "phpcodesniffer-standard",
655 | "notification-url": "https://packagist.org/downloads/",
656 | "license": [
657 | "MIT"
658 | ],
659 | "authors": [
660 | {
661 | "name": "Contributors",
662 | "homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors"
663 | }
664 | ],
665 | "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions",
666 | "keywords": [
667 | "phpcs",
668 | "standards",
669 | "static analysis",
670 | "wordpress"
671 | ],
672 | "support": {
673 | "issues": "https://github.com/WordPress/WordPress-Coding-Standards/issues",
674 | "source": "https://github.com/WordPress/WordPress-Coding-Standards",
675 | "wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki"
676 | },
677 | "funding": [
678 | {
679 | "url": "https://opencollective.com/thewpcc/contribute/wp-php-63406",
680 | "type": "custom"
681 | }
682 | ],
683 | "time": "2023-09-14T07:06:09+00:00"
684 | }
685 | ],
686 | "aliases": [],
687 | "minimum-stability": "stable",
688 | "stability-flags": [],
689 | "prefer-stable": false,
690 | "prefer-lowest": false,
691 | "platform": [],
692 | "platform-dev": [],
693 | "plugin-api-version": "2.6.0"
694 | }
695 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "press-this",
3 | "version": "2.0.0-alpha",
4 | "description": "A little tool that lets you grab bits of the web and create new posts with ease.",
5 | "repository": {
6 | "type": "git",
7 | "url": "git+https://github.com/WordPress/press-this.git"
8 | },
9 | "author": "WordPress Contributors",
10 | "license": "GPL-2.0+",
11 | "bugs": {
12 | "url": "https://github.com/WordPress/press-this/issues"
13 | },
14 | "homepage": "https://github.com/WordPress/press-this#readme",
15 | "devDependencies": {
16 | "grunt-checktextdomain": "^1.0.1",
17 | "grunt-wp-i18n": "^1.0.0"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/press-this-plugin.php:
--------------------------------------------------------------------------------
1 | save_post();
44 | }
45 |
46 | /**
47 | * Ajax handler for creating new category from Press This.
48 | *
49 | * @since 1.0.0
50 | */
51 | function wp_ajax_press_this_plugin_add_category() {
52 | include_once plugin_dir_path( __FILE__ ) . 'class-wp-press-this-plugin.php';
53 | $wp_press_this = new WP_Press_This_Plugin();
54 | $wp_press_this->add_category();
55 | }
56 |
57 | /**
58 | * Adds metabox on wp-admin/tools.php
59 | *
60 | * @since 1.0.0
61 | */
62 | function press_this_tool_box() {
63 | if ( current_user_can( 'edit_posts' ) ) { ?>
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
119 |
120 | Add New as normal.
26 | 2. Visit the Tools page of wp-admin for additional installation steps.
27 |
28 | == Changelog ==
29 |
30 | = 1.1.2 =
31 | * Fixes the styling of the .press-this .modal-close class (props https://github.com/crishnakh)
32 | * Bumps the Tested up to version to 6.7.1
33 |
34 | = 1.1.1 =
35 | * Corrects an issue with the packaging of the plugin for SVN.
36 |
37 | = 1.1.0 =
38 | * Restores the bookmarklet functionality previously found in WordPress 4.8 and prior verions.
39 |
40 | = 1.0 =
41 | * Initial release as a plugin. Previously part of WordPress itself.
42 |
43 | == Upgrade Notice ==
44 |
45 | = 1.1.1 =
46 | Restores bookmarklet functionality.
47 |
48 | == History ==
49 |
50 | WordPress, from the earliest days, included some way to bring in snippets from other websites for you to post on your own.
51 |
52 | The original "Press It" was removed from WordPress 2.5 and a new "Press This" added in 2.6. It existed pretty much unchanged until WordPress 4.2, which completely refreshed Press This.
53 |
54 | In WordPress 4.9, Press This was spun out to a "canonical plugin" -- an official plugin from WordPress.org so sites who wanted to use it could, but streamline more niche functionality out of Core. This was previously done with the Importers.
55 |
--------------------------------------------------------------------------------