Changeset 2045316
- Timestamp:
- 03/06/2019 02:37:23 PM (7 years ago)
- Location:
- semrush-seo-writing-assistant/trunk
- Files:
-
- 5 edited
-
admin/class-semrushswa-metabox.php (modified) (7 diffs)
-
admin/index.php (modified) (1 diff)
-
index.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
semrush-seo-writing-assistant.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
semrush-seo-writing-assistant/trunk/admin/class-semrushswa-metabox.php
r2030680 r2045316 2 2 /** 3 3 * The metabox functionality of the plugin 4 * php version 5.2.4 4 5 * 5 * @link https://www.semrush.com/ 6 * @since 1.0.0 7 * 6 * @category SemrushSwa 8 7 * @package SemrushSwa 9 8 * @subpackage SemrushSwa/metabox 9 * @author SEMrush CY LTD <apps@semrush.com> 10 * @license GPL-2.0+ <http://www.gnu.org/licenses/gpl-2.0.txt> 11 * @link https://www.semrush.com/ 10 12 */ 11 13 … … 15 17 * Adds metabox area with div. 16 18 * 19 * @category SemrushSwa 17 20 * @package SemrushSwa 18 21 * @subpackage SemrushSwa/metabox 19 * @author SEMrush <swa-feedback@semrush.com> 22 * @author SEMrush CY LTD <apps@semrush.com> 23 * @license GPL-2.0+ <http://www.gnu.org/licenses/gpl-2.0.txt> 24 * @link https://www.semrush.com/ 20 25 */ 21 26 class SemrushSwa_MetaBox { … … 36 41 private function get_metabox_post_types() { 37 42 $default_post_types = array( 'post', 'page', 'product' ); 38 $filtered_post_types = apply_filters( 'semrush_seo_writing_assistant_post_types', $default_post_types ); 43 $filtered_post_types = apply_filters( 44 'semrush_seo_writing_assistant_post_types', 45 $default_post_types 46 ); 39 47 40 48 return empty( $filtered_post_types ) … … 45 53 /** 46 54 * Adds the meta box. 55 * 56 * @return void 47 57 */ 48 58 public function add_metabox() { … … 58 68 wp_enqueue_script( 59 69 'swa_wordpress_js', 60 $custom_script_url ? $custom_script_url : '//www.semrush.com/swa/addon/nocache/js/wordpress.js', 70 $custom_script_url 71 ? $custom_script_url 72 : '//www.semrush.com/swa/addon/nocache/js/wordpress.js', 61 73 array(), 62 74 SEMRUSH_SEO_WRITING_ASSISTANT_VERSION, 63 75 true 64 76 ); 77 65 78 add_meta_box( 66 79 'swa-meta-box', … … 81 94 * Renders the meta box. 82 95 * 83 * @param WP_Post $post The current post.96 * @param WP_Post $post The current post. 84 97 * @param array $metabox With metabox id, title, callback, and args elements. 98 * 99 * @return void 85 100 */ 86 101 public function render_metabox( $post, $metabox ) { … … 88 103 $swa_docurl = $metabox['args']['swa_docurl']; 89 104 90 echo '<div id="swa-container" data-swa-docurl="' . esc_ attr( $swa_docurl ) . '" data-swa-docid="' . esc_attr( $swa_docid ) . '"></div>';105 echo '<div id="swa-container" data-swa-docurl="' . esc_url( $swa_docurl ) . '" data-swa-docid="' . esc_attr( $swa_docid ) . '"></div>'; 91 106 } 92 107 -
semrush-seo-writing-assistant/trunk/admin/index.php
r1950877 r2045316 1 <?php // Blank 1 <?php 2 /** 3 * The metabox functionality of the plugin 4 * php version 5.2.4 5 * 6 * @package SemrushSwa 7 */ 8 9 // Just an empty file to avoid directory listing. -
semrush-seo-writing-assistant/trunk/index.php
r1950877 r2045316 1 <?php // Blank 1 <?php 2 /** 3 * The metabox functionality of the plugin 4 * php version 5.2.4 5 * 6 * @package SemrushSwa 7 */ 8 9 // Just an empty file to avoid directory listing. -
semrush-seo-writing-assistant/trunk/readme.txt
r1971087 r2045316 5 5 Requires PHP: 5.2.4 6 6 Stable tag: trunk 7 Tested up to: 5. 07 Tested up to: 5.1 8 8 License: GPLv2 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
semrush-seo-writing-assistant/trunk/semrush-seo-writing-assistant.php
r2030680 r2045316 8 8 * that starts the plugin. 9 9 * 10 * @link https://www.semrush.com/ 11 * @since 1.0.0 12 * @package SemrushSwa 10 * php version 5.2.4 11 * 12 * @category SemrushSwa 13 * @package SemrushSwa 14 * @author SEMrush CY LTD <apps@semrush.com> 15 * @license GPL-2.0+ <http://www.gnu.org/licenses/gpl-2.0.txt> 16 * @link https://www.semrush.com/ 17 * @since 1.0.0 13 18 * 14 19 * @wordpress-plugin … … 41 46 * not affect the page life cycle. 42 47 * 43 * @since 1.0.0 48 * @since 1.0.0 49 * @return void 44 50 */ 45 51 function run_semrush_swa() { … … 47 53 * Load and initialize the metabox plugin. 48 54 */ 49 require_once dirname( __FILE__ ) . '/admin/class-semrushswa-metabox.php';55 include_once dirname( __FILE__ ) . '/admin/class-semrushswa-metabox.php'; 50 56 new SemrushSwa_MetaBox(); 51 57 }
Note: See TracChangeset
for help on using the changeset viewer.