diff --git a/includes/class-tika-doc-pdf-indexer-functions.php b/includes/class-tika-doc-pdf-indexer-functions.php index 3412ec8..33a052c 100644 --- a/includes/class-tika-doc-pdf-indexer-functions.php +++ b/includes/class-tika-doc-pdf-indexer-functions.php @@ -314,3 +314,7 @@ function tdpi_save_tika_meta( $post_id, $post ) { // make the upload file required // default to upload and restric from selcting uploaded file or the recent file should be indexed. // Settings should file checks if correct or existing.. + +// Deploy phpcs runners +// use php unit testing +// minimize ignore diff --git a/includes/class-tika-doc-pdf-indexer-settings.php b/includes/class-tika-doc-pdf-indexer-settings.php index 9dc8133..d43f6d0 100644 --- a/includes/class-tika-doc-pdf-indexer-settings.php +++ b/includes/class-tika-doc-pdf-indexer-settings.php @@ -19,7 +19,7 @@ class Tika_Doc_PDF_Indexer_Settings { * * @var object * @access private - * @since 1.0.0 + * @since 1.0.1 */ private static $instance = null; //phpcs:ignore @@ -28,7 +28,7 @@ class Tika_Doc_PDF_Indexer_Settings { * * @var object * @access public - * @since 1.0.0 + * @since 1.0.1 */ public $parent = null; @@ -37,7 +37,7 @@ class Tika_Doc_PDF_Indexer_Settings { * * @var string * @access public - * @since 1.0.0 + * @since 1.0.1 */ public $base = ''; @@ -46,7 +46,7 @@ class Tika_Doc_PDF_Indexer_Settings { * * @var array * @access public - * @since 1.0.0 + * @since 1.0.1 */ public $settings = array(); @@ -194,7 +194,7 @@ public function settings_assets() { // If you're not including an image upload then you can leave this function call out. wp_enqueue_media(); - wp_register_script( $this->parent->_token . '-settings-js', $this->parent->assets_url . 'js/settings' . $this->parent->script_suffix . '.js', array( 'farbtastic', 'jquery' ), '1.0.0', true ); + wp_register_script( $this->parent->_token . '-settings-js', $this->parent->assets_url . 'js/settings' . $this->parent->script_suffix . '.js', array( 'farbtastic', 'jquery' ), '1.0.1', true ); wp_enqueue_script( $this->parent->_token . '-settings-js' ); } @@ -386,7 +386,7 @@ public function settings_page() { * * Ensures only one instance of Tika_Doc_PDF_Indexer_Settings is loaded or can be loaded. * - * @since 1.0.0 + * @since 1.0.1 * @static * @see Tika_Doc_PDF_Indexer() * @param object $parent Object instance. @@ -402,7 +402,7 @@ public static function instance( $parent ) { /** * Cloning is forbidden. * - * @since 1.0.0 + * @since 1.0.1 */ public function __clone() { _doing_it_wrong( __FUNCTION__, esc_html( __( 'Cheatin’ huh?' ), $this->parent->_version ) ); @@ -411,7 +411,7 @@ public function __clone() { /** * Unserializing instances of this class is forbidden. * - * @since 1.0.0 + * @since 1.0.1 */ public function __wakeup() { _doing_it_wrong( __FUNCTION__, esc_html( __( 'Cheatin’ huh?' ), $this->parent->_version ) ); diff --git a/includes/class-tika-doc-pdf-indexer.php b/includes/class-tika-doc-pdf-indexer.php index a8eafe9..0e08f17 100644 --- a/includes/class-tika-doc-pdf-indexer.php +++ b/includes/class-tika-doc-pdf-indexer.php @@ -312,7 +312,7 @@ public function enable_doc_cpt() { * @param string $file File constructor. * @param string $version Plugin version. */ - public function __construct( $file = '', $version = '1.0.3' ) { + public function __construct( $file = '', $version = '1.0.4' ) { $this->_version = $version; $this->_token = 'tika_doc_pdf_indexer'; diff --git a/includes/lib/class-tika-doc-pdf-indexer-post-type.php b/includes/lib/class-tika-doc-pdf-indexer-post-type.php index 4982103..8ce50ac 100644 --- a/includes/lib/class-tika-doc-pdf-indexer-post-type.php +++ b/includes/lib/class-tika-doc-pdf-indexer-post-type.php @@ -159,6 +159,7 @@ public function register_post_type() { */ public function updated_messages( $messages = array() ) { global $post, $post_ID; + //phpcs:disable $messages[ $this->post_type ] = array( 0 => '', 1 => sprintf( __( '%1$s updated. %2$sView %3$s%4$s.', 'tika-doc-pdf-indexer' ), $this->single, '', $this->single, '' ), @@ -172,6 +173,7 @@ public function updated_messages( $messages = array() ) { 9 => sprintf( __( '%1$s scheduled for: %2$s. %3$sPreview %4$s%5$s.', 'tika-doc-pdf-indexer' ), $this->single, '' . date_i18n( __( 'M j, Y @ G:i', 'tika-doc-pdf-indexer' ), strtotime( $post->post_date ) ) . '', '', $this->single, '' ), 10 => sprintf( __( '%1$s draft updated. %2$sPreview %3$s%4$s.', 'tika-doc-pdf-indexer' ), $this->single, '', $this->single, '' ), ); + //phpcs:enable return $messages; } diff --git a/readme.txt b/readme.txt index 2c3957e..8982fb8 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: carl-alberto Tags: wordpress, plugin Requires at least: 4.8 Tested up to: 5.2.3 -Stable tag: 1.0.3 +Stable tag: 1.0.4 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -32,6 +32,10 @@ After plugin installation: == Changelog == += 1.0.4 = +* 2019-11-6 +* Made sure that pdf attachments when uploaded are indexed by the WP Solr plugin + = 1.0.0 = * 2019-10-21 * Initial release diff --git a/tika-doc-pdf-indexer.php b/tika-doc-pdf-indexer.php index c7cdba6..4816a16 100644 --- a/tika-doc-pdf-indexer.php +++ b/tika-doc-pdf-indexer.php @@ -1,7 +1,7 @@ settings ) ) { $instance->settings = Tika_Doc_PDF_Indexer_Settings::instance( $instance );