Changeset 2890042
- Timestamp:
- 03/30/2023 09:55:03 AM (3 years ago)
- Location:
- which-blocks
- Files:
-
- 27 added
- 2 deleted
- 8 edited
- 1 copied
-
assets/banner-1544x500.png (added)
-
assets/banner-772x250.png (added)
-
assets/icon-128x128.png (added)
-
assets/icon-256x256.png (added)
-
assets/screenshot-1.png (added)
-
tags/1.0.1 (copied) (copied from which-blocks/trunk)
-
tags/1.0.1/.wordpress-org (added)
-
tags/1.0.1/.wordpress-org/banner-1544x500.png (added)
-
tags/1.0.1/.wordpress-org/banner-772x250.png (added)
-
tags/1.0.1/.wordpress-org/icon-128x128.png (added)
-
tags/1.0.1/.wordpress-org/icon-256x256.png (added)
-
tags/1.0.1/.wordpress-org/screenshot-1.png (added)
-
tags/1.0.1/CHANGELOG.md (added)
-
tags/1.0.1/CODE_OF_CONDUCT.md (added)
-
tags/1.0.1/CONTRIBUTING.md (added)
-
tags/1.0.1/CREDITS.md (added)
-
tags/1.0.1/README.md (added)
-
tags/1.0.1/readme.txt (modified) (3 diffs)
-
tags/1.0.1/src/class-plugin.php (modified) (2 diffs)
-
tags/1.0.1/src/class-stats.php (modified) (2 diffs)
-
tags/1.0.1/vendor (deleted)
-
tags/1.0.1/which-blocks.php (modified) (2 diffs)
-
trunk/.wordpress-org (added)
-
trunk/.wordpress-org/banner-1544x500.png (added)
-
trunk/.wordpress-org/banner-772x250.png (added)
-
trunk/.wordpress-org/icon-128x128.png (added)
-
trunk/.wordpress-org/icon-256x256.png (added)
-
trunk/.wordpress-org/screenshot-1.png (added)
-
trunk/CHANGELOG.md (added)
-
trunk/CODE_OF_CONDUCT.md (added)
-
trunk/CONTRIBUTING.md (added)
-
trunk/CREDITS.md (added)
-
trunk/README.md (added)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/src/class-plugin.php (modified) (2 diffs)
-
trunk/src/class-stats.php (modified) (2 diffs)
-
trunk/vendor (deleted)
-
trunk/which-blocks.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
which-blocks/tags/1.0.1/readme.txt
r2862550 r2890042 3 3 Tags: block, block editor, blocks usage, statistics 4 4 Requires at least: 5.7 5 Tested up to: 6. 15 Tested up to: 6.2 6 6 Requires PHP: 7.0 7 Stable tag: 1.0. 07 Stable tag: 1.0.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 21 21 Admin menu: Tools > Which Blocks 22 22 23 == Screenshots == 24 25 1. This is an example of the plugin results screen. 26 23 27 == Installation == 28 24 29 1. Install the plugin via the plugin installer, either by searching for it or uploading a .zip file. 25 30 2. Activate the plugin. … … 28 33 == Changelog == 29 34 35 = 1.0.1 - 2023-03-30 = 36 * **Changed** PHP Unit Tests (props [@cadic](https://github.com/cadic) via [#12](https://github.com/cadic/which-blocks/pull/12)) 37 * **Changed** Readmes and github templates (props [@cadic](https://github.com/cadic) via [#14](https://github.com/cadic/which-blocks/pull/14)) 38 * **Changed** Remove composer autoloader (props [@cadic](https://github.com/cadic) via [#13](https://github.com/cadic/which-blocks/pull/13)) 39 * **Changed** Replace Cypress WP Utils with the NPM package (props [@cadic](https://github.com/cadic) via [#11](https://github.com/cadic/which-blocks/pull/11)) 40 * **Security** Bump webpack from 5.75.0 to 5.76.1 (props [@dependabot[bot]](https://github.com/apps/dependabot), [@cadic](https://github.com/cadic) via [#15](https://github.com/cadic/which-blocks/pull/15)) 41 30 42 = 1.0.0 - 09.02.2023 = 31 43 * Initial plugin release. -
which-blocks/tags/1.0.1/src/class-plugin.php
r2862550 r2890042 14 14 15 15 /** 16 * Instance of the Tools Page 17 * 18 * @var Tools_Page 19 */ 20 public $tools_page = null; 21 22 /** 16 23 * Constructor 17 24 */ … … 26 33 */ 27 34 public function init() { 28 new Tools_Page();35 $this->tools_page = new Tools_Page(); 29 36 } 30 37 } -
which-blocks/tags/1.0.1/src/class-stats.php
r2862550 r2890042 24 24 global $wpdb; 25 25 26 $args = wp_parse_args( 27 $args, 28 array( 29 'post_type' => array( 'post', 'page' ), 30 'post_status' => 'publish', 31 'blocks' => 'any', 32 'orderby' => 'cnt', 33 'order' => 'DESC', 34 ) 35 ); 26 $args = self::prepare_args( $args ); 36 27 37 if ( 'any' === $args['post_type'] ) { 38 $args['post_type'] = array(); 39 } elseif ( ! is_array( $args['post_type'] ) ) { 40 $args['post_type'] = array( $args['post_type'] ); 41 } 42 43 if ( 'any' === $args['post_status'] ) { 44 $args['post_status'] = array(); 45 } elseif ( ! is_array( $args['post_status'] ) ) { 46 $args['post_status'] = array( $args['post_status'] ); 47 } 48 49 if ( 'any' === $args['blocks'] ) { 50 $blocks = array_keys( WP_Block_Type_Registry::get_instance()->get_all_registered() ); 51 } elseif ( is_array( $args['blocks'] ) ) { 52 $blocks = $args['blocks']; 53 } elseif ( is_string( $args['blocks'] ) ) { 54 $blocks = array( $args['blocks'] ); 55 } 56 57 /** 58 * Filter wich blocks get usage arguments before building the SQL 59 * 60 * @param array $args Arguments array. 61 * @return array 62 */ 63 $args = apply_filters( 'which_blocks_get_usage_args', $args ); 64 65 if ( ! is_array( $blocks ) || ! count( $blocks ) ) { 28 if ( ! is_array( $args['blocks'] ) || ! count( $args['blocks'] ) ) { 66 29 return array(); 67 30 } 68 31 69 $where_clauses = array(); 70 71 if ( count( $args['post_type'] ) ) { 72 $where_clauses[] .= $wpdb->prepare( 'post_type IN (' . implode( ',', array_fill( 0, count( $args['post_type'] ), '%s' ) ) . ')', $args['post_type'] ); 73 } 74 75 if ( count( $args['post_status'] ) ) { 76 $where_clauses[] .= $wpdb->prepare( 'post_status IN (' . implode( ',', array_fill( 0, count( $args['post_status'] ), '%s' ) ) . ')', $args['post_status'] ); 77 } 78 79 if ( count( $where_clauses ) ) { 80 $where = join( ' AND ', $where_clauses ); 81 } else { 82 $where = ''; 83 } 84 85 $queries = array(); 86 87 foreach ( $blocks as $block ) { 88 if ( 'core/' === substr( $block, 0, 5 ) ) { 89 $block_name = substr( $block, 5 ); 90 } else { 91 $block_name = $block; 92 } 93 $search_pattern = '<!-- wp:' . $block_name . ' '; 94 95 $block_where = $wpdb->prepare( 'WHERE post_content LIKE %s', '%' . $wpdb->esc_like( $search_pattern ) . '%' ); 96 if ( $where ) { 97 $block_where .= ' AND ' . $where; 98 } 99 100 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- $block_where is prepared. 101 $queries[] = $wpdb->prepare( "(SELECT %s as block_name, COUNT(*) as cnt FROM {$wpdb->posts} " . $block_where . ' GROUP BY %s)', $block, $block ); 102 } 103 104 $sql = join( ' UNION ', $queries ) . ' ORDER BY cnt DESC'; 32 $sql = self::prepare_sql( $args ); 105 33 106 34 $results = $wpdb->get_results( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Prepared on previous steps. … … 123 51 124 52 /** 53 * Prepare where clauses 54 * 55 * @param array $args Arguments. 56 * @return array 57 */ 58 public static function where_clauses( $args ) { 59 global $wpdb; 60 61 $where_clauses = array(); 62 63 if ( isset( $args['post_type'] ) && is_array( $args['post_type'] ) && count( $args['post_type'] ) ) { 64 $where_clauses[] = $wpdb->prepare( 'post_type IN (' . implode( ',', array_fill( 0, count( $args['post_type'] ), '%s' ) ) . ')', $args['post_type'] ); 65 } 66 67 if ( isset( $args['post_status'] ) && is_array( $args['post_status'] ) && count( $args['post_status'] ) ) { 68 $where_clauses[] = $wpdb->prepare( 'post_status IN (' . implode( ',', array_fill( 0, count( $args['post_status'] ), '%s' ) ) . ')', $args['post_status'] ); 69 } 70 71 return $where_clauses; 72 } 73 74 /** 75 * Prepare SQL 76 * 77 * @param array $args Arguments. 78 * @return string 79 */ 80 public static function prepare_sql( $args ) { 81 global $wpdb; 82 83 $where_clauses = self::where_clauses( $args ); 84 85 if ( count( $where_clauses ) ) { 86 $where = join( ' AND ', $where_clauses ); 87 } else { 88 $where = ''; 89 } 90 91 $queries = array(); 92 93 foreach ( $args['blocks'] as $block ) { 94 if ( 'core/' === substr( $block, 0, 5 ) ) { 95 $block_name = substr( $block, 5 ); 96 } else { 97 $block_name = $block; 98 } 99 $search_pattern = '<!-- wp:' . $block_name . ' '; 100 101 $block_where = $wpdb->prepare( 'WHERE post_content LIKE %s', '%' . $wpdb->esc_like( $search_pattern ) . '%' ); 102 if ( $where ) { 103 $block_where .= ' AND ' . $where; 104 } 105 106 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- $block_where is prepared. 107 $queries[] = $wpdb->prepare( "(SELECT %s as block_name, COUNT(*) as cnt FROM {$wpdb->posts} " . $block_where . ' GROUP BY %s)', $block, $block ); 108 } 109 110 return join( ' UNION ', $queries ) . ' ORDER BY cnt DESC'; 111 } 112 113 /** 114 * Prepare arguments for get_usage 115 * 116 * @param array $args Search arguments. 117 * @return array 118 */ 119 public static function prepare_args( $args ) { 120 $args = wp_parse_args( 121 $args, 122 array( 123 'post_type' => array( 'post', 'page' ), 124 'post_status' => array( 'publish' ), 125 'blocks' => 'any', 126 'orderby' => 'cnt', 127 'order' => 'DESC', 128 ) 129 ); 130 131 if ( 'any' === $args['post_type'] ) { 132 $args['post_type'] = array(); 133 } elseif ( ! is_array( $args['post_type'] ) ) { 134 $args['post_type'] = array( $args['post_type'] ); 135 } 136 137 if ( 'any' === $args['post_status'] ) { 138 $args['post_status'] = array(); 139 } elseif ( ! is_array( $args['post_status'] ) ) { 140 $args['post_status'] = array( $args['post_status'] ); 141 } 142 143 if ( 'any' === $args['blocks'] ) { 144 $args['blocks'] = array_keys( WP_Block_Type_Registry::get_instance()->get_all_registered() ); 145 } elseif ( is_array( $args['blocks'] ) ) { 146 $args['blocks'] = $args['blocks']; 147 } elseif ( is_string( $args['blocks'] ) ) { 148 $args['blocks'] = array( $args['blocks'] ); 149 } 150 151 /** 152 * Filter wich blocks get usage arguments before building the SQL 153 * 154 * @param array $args Arguments array. 155 * @return array 156 */ 157 return apply_filters( 'which_blocks_get_usage_args', $args ); 158 } 159 160 /** 125 161 * Sort the block statistics elements 126 162 * -
which-blocks/tags/1.0.1/which-blocks.php
r2862550 r2890042 9 9 * Domain Path: /languages 10 10 * Version: 1.0.0 11 * Tested up to: 6.2 11 12 * 12 13 * @package Which_Blocks … … 15 16 namespace WhichBlocks; 16 17 17 require_once dirname( __FILE__ ) . '/vendor/autoload.php'; 18 if ( ! class_exists( 'WP_List_Table' ) ) { 19 require_once ABSPATH . 'wp-admin/includes/screen.php'; 20 require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php'; 21 } 22 23 require_once dirname( __FILE__ ) . '/src/class-blocks-list-table.php'; 24 require_once dirname( __FILE__ ) . '/src/class-plugin.php'; 25 require_once dirname( __FILE__ ) . '/src/class-stats.php'; 26 require_once dirname( __FILE__ ) . '/src/class-tools-page.php'; 18 27 19 28 new Plugin(); -
which-blocks/trunk/readme.txt
r2862550 r2890042 3 3 Tags: block, block editor, blocks usage, statistics 4 4 Requires at least: 5.7 5 Tested up to: 6. 15 Tested up to: 6.2 6 6 Requires PHP: 7.0 7 Stable tag: 1.0. 07 Stable tag: 1.0.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 21 21 Admin menu: Tools > Which Blocks 22 22 23 == Screenshots == 24 25 1. This is an example of the plugin results screen. 26 23 27 == Installation == 28 24 29 1. Install the plugin via the plugin installer, either by searching for it or uploading a .zip file. 25 30 2. Activate the plugin. … … 28 33 == Changelog == 29 34 35 = 1.0.1 - 2023-03-30 = 36 * **Changed** PHP Unit Tests (props [@cadic](https://github.com/cadic) via [#12](https://github.com/cadic/which-blocks/pull/12)) 37 * **Changed** Readmes and github templates (props [@cadic](https://github.com/cadic) via [#14](https://github.com/cadic/which-blocks/pull/14)) 38 * **Changed** Remove composer autoloader (props [@cadic](https://github.com/cadic) via [#13](https://github.com/cadic/which-blocks/pull/13)) 39 * **Changed** Replace Cypress WP Utils with the NPM package (props [@cadic](https://github.com/cadic) via [#11](https://github.com/cadic/which-blocks/pull/11)) 40 * **Security** Bump webpack from 5.75.0 to 5.76.1 (props [@dependabot[bot]](https://github.com/apps/dependabot), [@cadic](https://github.com/cadic) via [#15](https://github.com/cadic/which-blocks/pull/15)) 41 30 42 = 1.0.0 - 09.02.2023 = 31 43 * Initial plugin release. -
which-blocks/trunk/src/class-plugin.php
r2862550 r2890042 14 14 15 15 /** 16 * Instance of the Tools Page 17 * 18 * @var Tools_Page 19 */ 20 public $tools_page = null; 21 22 /** 16 23 * Constructor 17 24 */ … … 26 33 */ 27 34 public function init() { 28 new Tools_Page();35 $this->tools_page = new Tools_Page(); 29 36 } 30 37 } -
which-blocks/trunk/src/class-stats.php
r2862550 r2890042 24 24 global $wpdb; 25 25 26 $args = wp_parse_args( 27 $args, 28 array( 29 'post_type' => array( 'post', 'page' ), 30 'post_status' => 'publish', 31 'blocks' => 'any', 32 'orderby' => 'cnt', 33 'order' => 'DESC', 34 ) 35 ); 26 $args = self::prepare_args( $args ); 36 27 37 if ( 'any' === $args['post_type'] ) { 38 $args['post_type'] = array(); 39 } elseif ( ! is_array( $args['post_type'] ) ) { 40 $args['post_type'] = array( $args['post_type'] ); 41 } 42 43 if ( 'any' === $args['post_status'] ) { 44 $args['post_status'] = array(); 45 } elseif ( ! is_array( $args['post_status'] ) ) { 46 $args['post_status'] = array( $args['post_status'] ); 47 } 48 49 if ( 'any' === $args['blocks'] ) { 50 $blocks = array_keys( WP_Block_Type_Registry::get_instance()->get_all_registered() ); 51 } elseif ( is_array( $args['blocks'] ) ) { 52 $blocks = $args['blocks']; 53 } elseif ( is_string( $args['blocks'] ) ) { 54 $blocks = array( $args['blocks'] ); 55 } 56 57 /** 58 * Filter wich blocks get usage arguments before building the SQL 59 * 60 * @param array $args Arguments array. 61 * @return array 62 */ 63 $args = apply_filters( 'which_blocks_get_usage_args', $args ); 64 65 if ( ! is_array( $blocks ) || ! count( $blocks ) ) { 28 if ( ! is_array( $args['blocks'] ) || ! count( $args['blocks'] ) ) { 66 29 return array(); 67 30 } 68 31 69 $where_clauses = array(); 70 71 if ( count( $args['post_type'] ) ) { 72 $where_clauses[] .= $wpdb->prepare( 'post_type IN (' . implode( ',', array_fill( 0, count( $args['post_type'] ), '%s' ) ) . ')', $args['post_type'] ); 73 } 74 75 if ( count( $args['post_status'] ) ) { 76 $where_clauses[] .= $wpdb->prepare( 'post_status IN (' . implode( ',', array_fill( 0, count( $args['post_status'] ), '%s' ) ) . ')', $args['post_status'] ); 77 } 78 79 if ( count( $where_clauses ) ) { 80 $where = join( ' AND ', $where_clauses ); 81 } else { 82 $where = ''; 83 } 84 85 $queries = array(); 86 87 foreach ( $blocks as $block ) { 88 if ( 'core/' === substr( $block, 0, 5 ) ) { 89 $block_name = substr( $block, 5 ); 90 } else { 91 $block_name = $block; 92 } 93 $search_pattern = '<!-- wp:' . $block_name . ' '; 94 95 $block_where = $wpdb->prepare( 'WHERE post_content LIKE %s', '%' . $wpdb->esc_like( $search_pattern ) . '%' ); 96 if ( $where ) { 97 $block_where .= ' AND ' . $where; 98 } 99 100 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- $block_where is prepared. 101 $queries[] = $wpdb->prepare( "(SELECT %s as block_name, COUNT(*) as cnt FROM {$wpdb->posts} " . $block_where . ' GROUP BY %s)', $block, $block ); 102 } 103 104 $sql = join( ' UNION ', $queries ) . ' ORDER BY cnt DESC'; 32 $sql = self::prepare_sql( $args ); 105 33 106 34 $results = $wpdb->get_results( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- Prepared on previous steps. … … 123 51 124 52 /** 53 * Prepare where clauses 54 * 55 * @param array $args Arguments. 56 * @return array 57 */ 58 public static function where_clauses( $args ) { 59 global $wpdb; 60 61 $where_clauses = array(); 62 63 if ( isset( $args['post_type'] ) && is_array( $args['post_type'] ) && count( $args['post_type'] ) ) { 64 $where_clauses[] = $wpdb->prepare( 'post_type IN (' . implode( ',', array_fill( 0, count( $args['post_type'] ), '%s' ) ) . ')', $args['post_type'] ); 65 } 66 67 if ( isset( $args['post_status'] ) && is_array( $args['post_status'] ) && count( $args['post_status'] ) ) { 68 $where_clauses[] = $wpdb->prepare( 'post_status IN (' . implode( ',', array_fill( 0, count( $args['post_status'] ), '%s' ) ) . ')', $args['post_status'] ); 69 } 70 71 return $where_clauses; 72 } 73 74 /** 75 * Prepare SQL 76 * 77 * @param array $args Arguments. 78 * @return string 79 */ 80 public static function prepare_sql( $args ) { 81 global $wpdb; 82 83 $where_clauses = self::where_clauses( $args ); 84 85 if ( count( $where_clauses ) ) { 86 $where = join( ' AND ', $where_clauses ); 87 } else { 88 $where = ''; 89 } 90 91 $queries = array(); 92 93 foreach ( $args['blocks'] as $block ) { 94 if ( 'core/' === substr( $block, 0, 5 ) ) { 95 $block_name = substr( $block, 5 ); 96 } else { 97 $block_name = $block; 98 } 99 $search_pattern = '<!-- wp:' . $block_name . ' '; 100 101 $block_where = $wpdb->prepare( 'WHERE post_content LIKE %s', '%' . $wpdb->esc_like( $search_pattern ) . '%' ); 102 if ( $where ) { 103 $block_where .= ' AND ' . $where; 104 } 105 106 // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- $block_where is prepared. 107 $queries[] = $wpdb->prepare( "(SELECT %s as block_name, COUNT(*) as cnt FROM {$wpdb->posts} " . $block_where . ' GROUP BY %s)', $block, $block ); 108 } 109 110 return join( ' UNION ', $queries ) . ' ORDER BY cnt DESC'; 111 } 112 113 /** 114 * Prepare arguments for get_usage 115 * 116 * @param array $args Search arguments. 117 * @return array 118 */ 119 public static function prepare_args( $args ) { 120 $args = wp_parse_args( 121 $args, 122 array( 123 'post_type' => array( 'post', 'page' ), 124 'post_status' => array( 'publish' ), 125 'blocks' => 'any', 126 'orderby' => 'cnt', 127 'order' => 'DESC', 128 ) 129 ); 130 131 if ( 'any' === $args['post_type'] ) { 132 $args['post_type'] = array(); 133 } elseif ( ! is_array( $args['post_type'] ) ) { 134 $args['post_type'] = array( $args['post_type'] ); 135 } 136 137 if ( 'any' === $args['post_status'] ) { 138 $args['post_status'] = array(); 139 } elseif ( ! is_array( $args['post_status'] ) ) { 140 $args['post_status'] = array( $args['post_status'] ); 141 } 142 143 if ( 'any' === $args['blocks'] ) { 144 $args['blocks'] = array_keys( WP_Block_Type_Registry::get_instance()->get_all_registered() ); 145 } elseif ( is_array( $args['blocks'] ) ) { 146 $args['blocks'] = $args['blocks']; 147 } elseif ( is_string( $args['blocks'] ) ) { 148 $args['blocks'] = array( $args['blocks'] ); 149 } 150 151 /** 152 * Filter wich blocks get usage arguments before building the SQL 153 * 154 * @param array $args Arguments array. 155 * @return array 156 */ 157 return apply_filters( 'which_blocks_get_usage_args', $args ); 158 } 159 160 /** 125 161 * Sort the block statistics elements 126 162 * -
which-blocks/trunk/which-blocks.php
r2862550 r2890042 9 9 * Domain Path: /languages 10 10 * Version: 1.0.0 11 * Tested up to: 6.2 11 12 * 12 13 * @package Which_Blocks … … 15 16 namespace WhichBlocks; 16 17 17 require_once dirname( __FILE__ ) . '/vendor/autoload.php'; 18 if ( ! class_exists( 'WP_List_Table' ) ) { 19 require_once ABSPATH . 'wp-admin/includes/screen.php'; 20 require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php'; 21 } 22 23 require_once dirname( __FILE__ ) . '/src/class-blocks-list-table.php'; 24 require_once dirname( __FILE__ ) . '/src/class-plugin.php'; 25 require_once dirname( __FILE__ ) . '/src/class-stats.php'; 26 require_once dirname( __FILE__ ) . '/src/class-tools-page.php'; 18 27 19 28 new Plugin();
Note: See TracChangeset
for help on using the changeset viewer.