Plugin Directory

Changeset 1240183


Ignore:
Timestamp:
09/07/2015 09:44:07 PM (11 years ago)
Author:
tylerdigital
Message:

Update to 1.1

Location:
acf-tablepress/trunk
Files:
7 added
4 edited

Legend:

Unmodified
Added
Removed
  • acf-tablepress/trunk/acf-tablepress.php

    r1153182 r1240183  
    33Plugin Name: Advanced Custom Fields: TablePress
    44Description: ACF field to select one or many TablePress Tables
    5 Version: 1.0
     5Version: 1.1
    66Author: Tyler Digital
    77Author URI: http://tylerdigital.com
    88Author Email: [email protected]
    9 Text Domain: advanced-custom-fields-tablepress
     9Text Domain: acf-tablepress
    1010License:
    1111  Copyright 2015 Tyler Digital
     
    8080        'message'      => '',                      // Message to output right before the plugins table.
    8181        'strings'      => array(
    82             'page_title'                      => __( 'Install Required Plugins for ACF TablePress Add-On', 'advanced-custom-fields-tablepress' ),
    83             'menu_title'                      => __( 'Install ACF TablePress Plugins', 'advanced-custom-fields-tablepress' ),
    84             'installing'                      => __( 'Installing Plugin: %s', 'advanced-custom-fields-tablepress' ), // %s = plugin name.
    85             'oops'                            => __( 'Something went wrong with the plugin API.', 'advanced-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.', 'advanced-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.', 'advanced-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.', 'advanced-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', 'advanced-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.', 'advanced-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.', 'advanced-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.', 'advanced-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.', 'advanced-custom-fields-tablepress' ), // %1$s = plugin name(s).
    94             'install_link'                    => _n_noop( 'Begin installing plugin', 'Begin installing plugins', 'advanced-custom-fields-tablepress' ),
    95             'activate_link'                   => _n_noop( 'Begin activating plugin', 'Begin activating plugins', 'advanced-custom-fields-tablepress' ),
    96             'return'                          => __( 'Return to Required Plugins Installer', 'advanced-custom-fields-tablepress' ),
    97             'plugin_activated'                => __( 'Plugin activated successfully.', 'advanced-custom-fields-tablepress' ),
    98             'complete'                        => __( 'All plugins installed and activated successfully. %s', 'advanced-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.
    9999            'nag_type'                        => 'updated', // Determines admin notice type - can only be 'updated', 'update-nag' or 'error'.
    100100        )
     
    110110}
    111111add_filter('tgmpa_admin_menu_use_add_theme_page', '__return_false' );
     112
     113add_action( 'init', 'acftp_load_plugin_textdomain' );
     114function 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  
    44Requires at least: 4.0
    55Tested up to: 4.2
    6 Stable tag: 1.0
     6Stable tag: 1.1
    77
    88ACF field type to select a TablePress table
     
    2020*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**
    2121
     22**Follow this plugin on [GitHub](https://github.com/tylerdigital/acf-tablepress)**
     23
     24
    2225== Installation ==
    23 1. Copy the `advanced-custom-fields-tablepress` folder into your plugins folder
     261. Copy the `acf-tablepress` folder into your plugins folder
    24272. Activate the plugin via the Plugins admin page
    2528
     
    4043    $args = array(
    4144      'id'                => $tablepress_id,
    42       'use_datatables'    => true,
    43       'print_name'        => false
    4445    );
    4546    if ( function_exists( 'tablepress_print_table' ) ) {
     
    5657== Changelog ==
    5758
     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
    5865= 1.0 =
    5966* Initial Release
  • acf-tablepress/trunk/tablepress-v4.php

    r1153182 r1240183  
    77    function __construct() {
    88        $this->name = 'tablepress_field';
    9         $this->label = __('TablePress', 'advanced-custom-fields-tablepress' );
     9        $this->label = __('TablePress', 'acf-tablepress' );
    1010        $this->category = __("Relational",'acf');
    1111        $this->defaults = array(
     
    4747        <tr class="field_option field_option_<?php echo $this->name; ?>">
    4848            <td class="label">
    49                 <label><?php _e("Return Format?",'advanced-custom-fields-tablepress'); ?></label>
     49                <label><?php _e("Return Format?",'acf-tablepress'); ?></label>
    5050            </td>
    5151            <td>
     
    5656                    'value' =>  $field['return_format'],
    5757                    'choices' =>  array(
    58                         'table_id' => __("Table ID - Output only the Table ID Number",'advanced-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.",'advanced-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'),
    6060                    ),
    6161                    'layout'  =>  'vertical',
     
    7373        /* Exits function if TablePress not active */
    7474        if ( !defined( 'TABLEPRESS_ABSPATH' ) ) {
    75           echo __('TablePress must be activated for this ACF field to work', 'advanced-custom-fields-tablepress');
     75          echo __('TablePress must be activated for this ACF field to work', 'acf-tablepress');
    7676          return;
    7777        }
     
    8484        /* Get table titles for list of choices */
    8585        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.', 'advanced-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' ) );
    8787          return;
    8888        }
     
    109109          $value = tablepress_get_table( array(
    110110            'id' => $value,
    111             'use_datatables' => true,
    112             'print_name' => false
    113111          ) );
    114112          return $value;
  • acf-tablepress/trunk/tablepress-v5.php

    r1153182 r1240183  
    2929    // return_format
    3030    acf_render_field_setting( $field, array(
    31       'label'      => __('Return Format','advanced-custom-fields-tablepress'),
     31      'label'      => __('Return Format','acf-tablepress'),
    3232      'instructions'  => '',
    3333      'type'       => 'radio',
    3434      'name'       => 'return_format',
    3535      'choices'    => array(
    36         'table_id' => __("Table ID - Output only the Table ID Number",'advanced-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.",'advanced-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'),
    3838      ),
    3939
     
    4646    /* Exits function if TablePress not active */
    4747    if ( !defined( 'TABLEPRESS_ABSPATH' ) ) {
    48       echo __('TablePress must be activated for this ACF field to work', 'advanced-custom-fields-tablepress');
     48      echo __('TablePress must be activated for this ACF field to work', 'acf-tablepress');
    4949      return;
    5050    }
     
    5858    $choices = array();
    5959    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.', 'advanced-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' ) );
    6161      return;
    6262    }
     
    7373      <select id="<?php echo str_replace(array('[',']'), array('-',''), $field['name']);?>" name="<?php echo $field['name']; ?>">
    7474        <?php
    75                     if ( $field['allow_null'] ) echo '<option value="">- '. __('Select', 'advanced-custom-fields-tablepress') .' -</option>';
     75                    if ( $field['allow_null'] ) echo '<option value="">- '. __('Select', 'acf-tablepress') .' -</option>';
    7676          foreach ($field['choices'] as $key => $value) :
    7777            $selected = '';
     
    9595      $value = tablepress_get_table( array(
    9696        'id' => $value,
    97         'use_datatables' => true,
    98         'print_name' => false
    9997      ) );
    100       return $value;    }
     98      return $value;
     99    }
    101100  }
    102101}
Note: See TracChangeset for help on using the changeset viewer.