Changeset 1240183
- Timestamp:
- 09/07/2015 09:44:07 PM (11 years ago)
- Location:
- acf-tablepress/trunk
- Files:
-
- 7 added
- 4 edited
-
acf-tablepress.php (modified) (3 diffs)
-
languages (added)
-
languages/acf-tablepress-pt_BR.mo (added)
-
languages/acf-tablepress-pt_BR.po (added)
-
languages/acf-tablepress-pt_PT.mo (added)
-
languages/acf-tablepress-pt_PT.po (added)
-
languages/acf-tablepress.pot (added)
-
languages/index.php (added)
-
readme.txt (modified) (4 diffs)
-
tablepress-v4.php (modified) (6 diffs)
-
tablepress-v5.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
acf-tablepress/trunk/acf-tablepress.php
r1153182 r1240183 3 3 Plugin Name: Advanced Custom Fields: TablePress 4 4 Description: ACF field to select one or many TablePress Tables 5 Version: 1. 05 Version: 1.1 6 6 Author: Tyler Digital 7 7 Author URI: http://tylerdigital.com 8 8 Author Email: [email protected] 9 Text Domain: a dvanced-custom-fields-tablepress9 Text Domain: acf-tablepress 10 10 License: 11 11 Copyright 2015 Tyler Digital … … 80 80 'message' => '', // Message to output right before the plugins table. 81 81 'strings' => array( 82 'page_title' => __( 'Install Required Plugins for ACF TablePress Add-On', 'a dvanced-custom-fields-tablepress' ),83 'menu_title' => __( 'Install ACF TablePress Plugins', 'a dvanced-custom-fields-tablepress' ),84 'installing' => __( 'Installing Plugin: %s', 'a dvanced-custom-fields-tablepress' ), // %s = plugin name.85 'oops' => __( 'Something went wrong with the plugin API.', 'a dvanced-custom-fields-tablepress' ),86 'notice_can_install_required' => _n_noop( 'The ACF: TablePress add-on requires the following plugin: %1$s.', 'The ACF: TablePress add-on requires the following plugins: %1$s.', 'a dvanced-custom-fields-tablepress' ), // %1$s = plugin name(s).87 'notice_can_install_recommended' => _n_noop( 'The ACF: TablePress add-on recommends the following plugin: %1$s.', 'The ACF: TablePress add-on recommends the following plugins: %1$s.', 'a dvanced-custom-fields-tablepress' ), // %1$s = plugin name(s).88 'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.', 'a dvanced-custom-fields-tablepress' ), // %1$s = plugin name(s).89 'notice_can_activate_required' => _n_noop( 'The ACF: TablePress add-on requires the plugin %1$s to be active.', 'The ACF: TablePress add-on requires the plugins %1$s to be active', 'a dvanced-custom-fields-tablepress' ), // %1$s = plugin name(s).90 'notice_can_activate_recommended' => _n_noop( 'The ACF: TablePress add-on recommends the plugin %1$s to be active.', 'The following recommended plugins are currently inactive: %1$s.', 'a dvanced-custom-fields-tablepress' ), // %1$s = plugin name(s).91 'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.', 'a dvanced-custom-fields-tablepress' ), // %1$s = plugin name(s).92 'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this plugin: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this plugin: %1$s.', 'a dvanced-custom-fields-tablepress' ), // %1$s = plugin name(s).93 'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.', 'a dvanced-custom-fields-tablepress' ), // %1$s = plugin name(s).94 'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins', 'a dvanced-custom-fields-tablepress' ),95 'activate_link' => _n_noop( 'Begin activating plugin', 'Begin activating plugins', 'a dvanced-custom-fields-tablepress' ),96 'return' => __( 'Return to Required Plugins Installer', 'a dvanced-custom-fields-tablepress' ),97 'plugin_activated' => __( 'Plugin activated successfully.', 'a dvanced-custom-fields-tablepress' ),98 'complete' => __( 'All plugins installed and activated successfully. %s', 'a dvanced-custom-fields-tablepress' ), // %s = dashboard link.82 'page_title' => __( 'Install Required Plugins for ACF TablePress Add-On', 'acf-tablepress' ), 83 'menu_title' => __( 'Install ACF TablePress Plugins', 'acf-tablepress' ), 84 'installing' => __( 'Installing Plugin: %s', 'acf-tablepress' ), // %s = plugin name. 85 'oops' => __( 'Something went wrong with the plugin API.', 'acf-tablepress' ), 86 'notice_can_install_required' => _n_noop( 'The ACF: TablePress add-on requires the following plugin: %1$s.', 'The ACF: TablePress add-on requires the following plugins: %1$s.', 'acf-tablepress' ), // %1$s = plugin name(s). 87 'notice_can_install_recommended' => _n_noop( 'The ACF: TablePress add-on recommends the following plugin: %1$s.', 'The ACF: TablePress add-on recommends the following plugins: %1$s.', 'acf-tablepress' ), // %1$s = plugin name(s). 88 'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.', 'acf-tablepress' ), // %1$s = plugin name(s). 89 'notice_can_activate_required' => _n_noop( 'The ACF: TablePress add-on requires the plugin %1$s to be active.', 'The ACF: TablePress add-on requires the plugins %1$s to be active', 'acf-tablepress' ), // %1$s = plugin name(s). 90 'notice_can_activate_recommended' => _n_noop( 'The ACF: TablePress add-on recommends the plugin %1$s to be active.', 'The following recommended plugins are currently inactive: %1$s.', 'acf-tablepress' ), // %1$s = plugin name(s). 91 'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.', 'acf-tablepress' ), // %1$s = plugin name(s). 92 'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this plugin: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this plugin: %1$s.', 'acf-tablepress' ), // %1$s = plugin name(s). 93 'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.', 'acf-tablepress' ), // %1$s = plugin name(s). 94 'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins', 'acf-tablepress' ), 95 'activate_link' => _n_noop( 'Begin activating plugin', 'Begin activating plugins', 'acf-tablepress' ), 96 'return' => __( 'Return to Required Plugins Installer', 'acf-tablepress' ), 97 'plugin_activated' => __( 'Plugin activated successfully.', 'acf-tablepress' ), 98 'complete' => __( 'All plugins installed and activated successfully. %s', 'acf-tablepress' ), // %s = dashboard link. 99 99 'nag_type' => 'updated', // Determines admin notice type - can only be 'updated', 'update-nag' or 'error'. 100 100 ) … … 110 110 } 111 111 add_filter('tgmpa_admin_menu_use_add_theme_page', '__return_false' ); 112 113 add_action( 'init', 'acftp_load_plugin_textdomain' ); 114 function acftp_load_plugin_textdomain() { 115 116 $domain = 'acf-tablepress'; 117 $locale = apply_filters( 'plugin_locale', get_locale(), $domain ); 118 119 load_textdomain( $domain, WP_LANG_DIR . '/' .$domain. '/' . $domain . '-' . $locale . '.mo' ); 120 load_plugin_textdomain( $domain, FALSE, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); 121 122 } 123 -
acf-tablepress/trunk/readme.txt
r1154955 r1240183 4 4 Requires at least: 4.0 5 5 Tested up to: 4.2 6 Stable tag: 1. 06 Stable tag: 1.1 7 7 8 8 ACF field type to select a TablePress table … … 20 20 *Just to be sure there's no confusion...* **This plugin does nothing unless [ACF](https://wordpress.org/plugins/advanced-custom-fields/) and [TablePress](https://wordpress.org/plugins/tablepress/) are both active on your site** 21 21 22 **Follow this plugin on [GitHub](https://github.com/tylerdigital/acf-tablepress)** 23 24 22 25 == Installation == 23 1. Copy the `a dvanced-custom-fields-tablepress` folder into your plugins folder26 1. Copy the `acf-tablepress` folder into your plugins folder 24 27 2. Activate the plugin via the Plugins admin page 25 28 … … 40 43 $args = array( 41 44 'id' => $tablepress_id, 42 'use_datatables' => true,43 'print_name' => false44 45 ); 45 46 if ( function_exists( 'tablepress_print_table' ) ) { … … 56 57 == Changelog == 57 58 59 = 1.1 = 60 * New: Added i18n support 61 * New: Added Portuguese translations (pt_PT, pt_BR) 62 * Update: Changed text domain to match the plugin slug ('acf-tablepress') 63 * Update: Removed hard-coded settings in rendered tables 64 58 65 = 1.0 = 59 66 * Initial Release -
acf-tablepress/trunk/tablepress-v4.php
r1153182 r1240183 7 7 function __construct() { 8 8 $this->name = 'tablepress_field'; 9 $this->label = __('TablePress', 'a dvanced-custom-fields-tablepress' );9 $this->label = __('TablePress', 'acf-tablepress' ); 10 10 $this->category = __("Relational",'acf'); 11 11 $this->defaults = array( … … 47 47 <tr class="field_option field_option_<?php echo $this->name; ?>"> 48 48 <td class="label"> 49 <label><?php _e("Return Format?",'a dvanced-custom-fields-tablepress'); ?></label>49 <label><?php _e("Return Format?",'acf-tablepress'); ?></label> 50 50 </td> 51 51 <td> … … 56 56 'value' => $field['return_format'], 57 57 'choices' => array( 58 'table_id' => __("Table ID - Output only the Table ID Number",'a dvanced-custom-fields-tablepress'),59 'rendered_html' => __("HTML - Output the rendered HTML of the table itself. Equivalent to do_shortcode(), but does not use that function.",'a dvanced-custom-fields-tablepress'),58 'table_id' => __("Table ID - Output only the Table ID Number",'acf-tablepress'), 59 'rendered_html' => __("HTML - Output the rendered HTML of the table itself. Equivalent to do_shortcode(), but does not use that function.",'acf-tablepress'), 60 60 ), 61 61 'layout' => 'vertical', … … 73 73 /* Exits function if TablePress not active */ 74 74 if ( !defined( 'TABLEPRESS_ABSPATH' ) ) { 75 echo __('TablePress must be activated for this ACF field to work', 'a dvanced-custom-fields-tablepress');75 echo __('TablePress must be activated for this ACF field to work', 'acf-tablepress'); 76 76 return; 77 77 } … … 84 84 /* Get table titles for list of choices */ 85 85 if ( !is_array( $tables ) || empty( $tables ) ) { 86 echo sprintf( __('No TablePress tables found, once you <a href="%s">add some tables</a> they\'ll show up here.', 'a dvanced-custom-fields-tablepress' ), admin_url( 'admin.php?page=tablepress' ) );86 echo sprintf( __('No TablePress tables found, once you <a href="%s">add some tables</a> they\'ll show up here.', 'acf-tablepress' ), admin_url( 'admin.php?page=tablepress' ) ); 87 87 return; 88 88 } … … 109 109 $value = tablepress_get_table( array( 110 110 'id' => $value, 111 'use_datatables' => true,112 'print_name' => false113 111 ) ); 114 112 return $value; -
acf-tablepress/trunk/tablepress-v5.php
r1153182 r1240183 29 29 // return_format 30 30 acf_render_field_setting( $field, array( 31 'label' => __('Return Format','a dvanced-custom-fields-tablepress'),31 'label' => __('Return Format','acf-tablepress'), 32 32 'instructions' => '', 33 33 'type' => 'radio', 34 34 'name' => 'return_format', 35 35 'choices' => array( 36 'table_id' => __("Table ID - Output only the Table ID Number",'a dvanced-custom-fields-tablepress'),37 'rendered_html' => __("HTML - Output the rendered HTML of the table itself. Equivalent to do_shortcode(), but does not use that function.",'a dvanced-custom-fields-tablepress'),36 'table_id' => __("Table ID - Output only the Table ID Number",'acf-tablepress'), 37 'rendered_html' => __("HTML - Output the rendered HTML of the table itself. Equivalent to do_shortcode(), but does not use that function.",'acf-tablepress'), 38 38 ), 39 39 … … 46 46 /* Exits function if TablePress not active */ 47 47 if ( !defined( 'TABLEPRESS_ABSPATH' ) ) { 48 echo __('TablePress must be activated for this ACF field to work', 'a dvanced-custom-fields-tablepress');48 echo __('TablePress must be activated for this ACF field to work', 'acf-tablepress'); 49 49 return; 50 50 } … … 58 58 $choices = array(); 59 59 if ( !is_array( $tables ) || empty( $tables ) ) { 60 echo sprintf( __('No TablePress tables found, once you <a href="%s">add some tables</a> they\'ll show up here.', 'a dvanced-custom-fields-tablepress' ), admin_url( 'admin.php?page=tablepress' ) );60 echo sprintf( __('No TablePress tables found, once you <a href="%s">add some tables</a> they\'ll show up here.', 'acf-tablepress' ), admin_url( 'admin.php?page=tablepress' ) ); 61 61 return; 62 62 } … … 73 73 <select id="<?php echo str_replace(array('[',']'), array('-',''), $field['name']);?>" name="<?php echo $field['name']; ?>"> 74 74 <?php 75 if ( $field['allow_null'] ) echo '<option value="">- '. __('Select', 'a dvanced-custom-fields-tablepress') .' -</option>';75 if ( $field['allow_null'] ) echo '<option value="">- '. __('Select', 'acf-tablepress') .' -</option>'; 76 76 foreach ($field['choices'] as $key => $value) : 77 77 $selected = ''; … … 95 95 $value = tablepress_get_table( array( 96 96 'id' => $value, 97 'use_datatables' => true,98 'print_name' => false99 97 ) ); 100 return $value; } 98 return $value; 99 } 101 100 } 102 101 }
Note: See TracChangeset
for help on using the changeset viewer.