Changeset 2053475
- Timestamp:
- 03/19/2019 02:46:10 PM (7 years ago)
- Location:
- term-pages/trunk
- Files:
-
- 5 added
- 2 edited
-
README.md (modified) (2 diffs)
-
languages (added)
-
languages/term-pages-de_DE.mo (added)
-
languages/term-pages-de_DE.po (added)
-
languages/term-pages.pot (added)
-
remove.js (added)
-
term-pages.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
term-pages/trunk/README.md
r1596370 r2053475 5 5 Requires at least: 4.0 6 6 Tested up to: 4.7.2 7 Stable tag: 1.0 7 Stable tag: 1.0.1 8 8 License: GPLv3 9 9 License URI: http://www.gnu.org/licenses/gpl … … 34 34 == Changelog == 35 35 36 = 1.0.1 = 37 * Bugfix: Missing argument 2 for Term_Pages::save_extra_field() 38 36 39 = 1.0 = 37 40 * First release -
term-pages/trunk/term-pages.php
r1596370 r2053475 4 4 * Plugin Name: Term-Pages 5 5 * Description: Overwrites first page of term archives with a page. 6 * Version: 1.0 6 * Version: 1.0.1 7 7 * Author: PALASTHOTEL <rezeption@palasthotel.de> 8 8 * Author URI: http://www.palasthotel.de 9 9 * Requires at least: 4.0 10 * Text Domain: term-pages 11 * Domain Path: /languages 10 12 * @copyright Copyright (c) 2016, Palasthotel 11 13 */ … … 22 24 add_action( 'wp_ajax_nopriv_tp_lookup', array( $this, 'lookup_pages' ), 8 ); 23 25 add_action( 'admin_footer', array( $this, 'render_frontend_js' ), 9 ); 24 25 26 } 26 27 … … 29 30 */ 30 31 function add_taxonomie_fields() { 32 33 load_plugin_textdomain( 'term-pages', FALSE, 'term-pages/languages' ); 34 31 35 $taxonomies = get_taxonomies(); 32 36 … … 35 39 add_action( $taxonomy . '_add_form_fields', array( $this, 'add_extra_taxonomy_field' ) ); 36 40 add_action( $taxonomy . '_edit_form_fields', array( $this, 'admin_render_taxonomy_field' ), 10, 2 ); 37 add_action( 'created_' . $taxonomy, array( $this, 'save_extra_field' ) );41 add_action( 'created_' . $taxonomy, array( $this, 'save_extra_field' ), 10 , 2 ); 38 42 add_action( 'edited_' . $taxonomy, array( $this, 'update_extra_field' ), 10, 2 ); 39 43 … … 47 51 wp_enqueue_script( 'suggest' ); 48 52 wp_enqueue_style( 'suggest' ); 53 wp_enqueue_script('remove', plugin_dir_url(__FILE__) . 'remove.js'); 49 54 } 50 55 … … 72 77 ?> 73 78 <div class="form-field term-group"> 74 <label for="feature-group"><?php _e( 'overriding page', 'term-pages' ); ?></label>75 <input type="text" class="or-page-id" name="or-page-id" size="20" value="<?php echo esc_attr( $orpageid ); ?>">79 <label for="feature-group"><?php _e( 'overriding page', 'term-pages' ); ?></label> 80 <input type="text" placeholder="<?= _e( 'Please insert the title of the published page', 'term-pages' ); ?>" class="or-page-id" name="or-page-id" size="20" value="<?php echo esc_attr( $orpageid ); ?>"> 76 81 </div> 77 82 … … 110 115 111 116 ?> 112 <tr class="form-field term-group-wrap"> 113 <th scope="row"><label for="feature-group"><?php _e( 'Overwrite first page of taxonomie with page:', 'term-pages' ); ?></label></th> 114 115 116 <td><input type="text" class="or-page-id" name="or-page-id" size="20" 117 value="<?php echo esc_attr( $orpageid ); ?>"> 118 </tr><?php 117 <tr> 118 <td colspan="2"> 119 <div class="form-field term-group"> 120 <label for="feature-group"><?php _e( 'overriding page', 'term-pages' ); ?></label> 121 <input type="text" placeholder="<?= _e( 'Please insert the title of the published page', 'term-pages' ); ?>" class="or-page-id" name="or-page-id" size="20" value="<?php echo esc_attr( $orpageid ); ?>"> 122 </div> 123 </tr> 124 <?php 119 125 } 120 126 … … 162 168 163 169 164 echo $post_title . ' : ' . $id . "\n";170 echo $post_title . ' : ' . $id ."\n"; 165 171 } 166 172
Note: See TracChangeset
for help on using the changeset viewer.