Skip to content

Commit

Permalink
replace tribe-apm with advanced-post-manager
Browse files Browse the repository at this point in the history
  • Loading branch information
lucatume committed Oct 5, 2016
1 parent 9e1d2e9 commit 9af8cab
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 42 deletions.
4 changes: 2 additions & 2 deletions demo/demo.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
class Tribe_Demo_APM {

private $post_type = 'tribe_movie';
private $textdomain = 'tribe-apm';
private $textdomain = 'advanced-post-manager';

public function __construct() {
add_action( 'init', array( $this, 'test_filters' ) );
Expand All @@ -27,7 +27,7 @@ public function notice() {
$url = home_url( $path ) . '/demo_data.xml';
$import_url = admin_url( 'import.php' );
echo '<div id="messsage" class="updated"><p>';
printf( __( 'It looks like you might not have any demo data. <a href="%s">Download our data</a> and use the <a href="%s">WordPress Importer</a>.', 'tribe-apm' ), esc_url( $url ), esc_url( $import_url ) );
printf( __( 'It looks like you might not have any demo data. <a href="%s">Download our data</a> and use the <a href="%s">WordPress Importer</a>.', 'advanced-post-manager' ), esc_url( $url ), esc_url( $import_url ) );
echo '</p></div>';
}
}
Expand Down
4 changes: 2 additions & 2 deletions lib/tribe-columns.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __construct( $post_type, $columns = array(), $active = array(),

$this->columns_example = array(
'column_id' => array(
'name' => __( 'Column Name', 'tribe-apm' ),
'name' => __( 'Column Name', 'advanced-post-manager' ),
'meta' => '_some_meta', // in most cases, this piece of meta will be queried to provide column contents
),
);
Expand Down Expand Up @@ -155,7 +155,7 @@ public function output_form() {
</ul>
</div>
<span class="apm-select-wrap"><select name="tribe-cols-drop" id="tribe-cols-drop"><?php
echo '<option value="0">' . esc_html__( 'Add a Column', 'tribe-apm' ) . '</option>';
echo '<option value="0">' . esc_html__( 'Add a Column', 'advanced-post-manager' ) . '</option>';
foreach ( $inactive as $key => $value ) {
$name = ( is_string( $value ) ) ? $value : $value['name'];
if ( empty( $name ) ) {
Expand Down
28 changes: 14 additions & 14 deletions lib/tribe-filters.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ class Tribe_Filters {
public function __construct( $post_type, $filters = array() ) {

$this->query_options = array(
'is' => __( 'Is', 'tribe-apm' ),
'not' => __( 'Is Not', 'tribe-apm' ),
'is' => __( 'Is', 'advanced-post-manager' ),
'not' => __( 'Is Not', 'advanced-post-manager' ),
'gt' => '>',
'lt' => '<',
'gte' => '>=',
Expand All @@ -68,9 +68,9 @@ public function __construct( $post_type, $filters = array() ) {
);

$this->query_search_options = array(
'like' => __( 'Search', 'tribe-apm' ),
'is' => __( 'Is', 'tribe-apm' ),
'not' => __( 'Is Not', 'tribe-apm' ),
'like' => __( 'Search', 'advanced-post-manager' ),
'is' => __( 'Is', 'advanced-post-manager' ),
'not' => __( 'Is Not', 'advanced-post-manager' ),
'gt' => '>',
'lt' => '<',
'gte' => '>=',
Expand All @@ -79,20 +79,20 @@ public function __construct( $post_type, $filters = array() ) {

$this->filters_example = array(
'filter_key' => array(
'name' => __( 'Member Type', 'tribe-apm' ), // text label
'name' => __( 'Member Type', 'advanced-post-manager' ), // text label
'meta' => '_type', // the meta key to query
'taxonomy' => 'some_taxonomy',// the taxonomy to query. Would never be set alongside meta above
'options' => array( // options for a meta query. Restricts them.
'cafe' => __( 'Cafe', 'tribe-apm' ),
'desk' => __( 'Private Desk', 'tribe-apm' ),
'office' => __( 'Office', 'tribe-apm' ),
'cafe' => __( 'Cafe', 'advanced-post-manager' ),
'desk' => __( 'Private Desk', 'advanced-post-manager' ),
'office' => __( 'Office', 'advanced-post-manager' ),
),
),
);

$this->active_example = array(
'filter_key' => array( // array key corresponds to key in $filters
'value' => __( 'what i’m querying. probably a key in the options array in $filters', 'tribe-apm' ),
'value' => __( 'what i’m querying. probably a key in the options array in $filters', 'advanced-post-manager' ),
'query_option' => 'is/is not,etc.',
),
);
Expand Down Expand Up @@ -178,7 +178,7 @@ public function output_form() {
$this->inactive = array_diff_key( $this->filters, $this->active );

echo '<div class="apm-inactive-filters">';
echo '<h4>' . esc_html__( 'Active Filters', 'tribe-apm' ) . '</h4>';
echo '<h4>' . esc_html__( 'Active Filters', 'advanced-post-manager' ) . '</h4>';
echo '<table id="tribe-filters-active" class="table-form">';
foreach ( $this->active as $k => $v ) {
echo $this->table_row( $k, $v );
Expand Down Expand Up @@ -534,9 +534,9 @@ protected function saved_filters_dropdown() {
// @TODO: this is an inappropriate way to do pluralization
?>
<div class="apm-saved-filters">
<h2 class="select-saved-filter"><?php echo esc_html__( 'Saved Filter Set', 'tribe-apm' ); ?><span>s</span></h2>
<h2 class="select-saved-filter"><?php echo esc_html__( 'Saved Filter Set', 'advanced-post-manager' ); ?><span>s</span></h2>
<span class="apm-select-wrap"><select id="tribe-saved-filters" name="tribe-saved-filters" data:submit_url="<?php echo esc_url( $url ); ?>">
<option value="0"><?php echo esc_html__( 'Choose a Saved Filter', 'tribe-apm' ); ?></option>
<option value="0"><?php echo esc_html__( 'Choose a Saved Filter', 'advanced-post-manager' ); ?></option>
<?php
foreach ( $filters as $filter ) {
?>
Expand Down Expand Up @@ -655,7 +655,7 @@ public static function select_field( $name, $options = null, $active = '', $allo
protected function inactive_dropdown() {
$inactive = $this->inactive;
echo '<span class="apm-select-wrap"><select name="tribe-filters-inactive" id="tribe-filters-inactive">';
echo '<option value="0">' . esc_html__( 'Add a Filter', 'tribe-apm' ) . '</option>';
echo '<option value="0">' . esc_html__( 'Add a Filter', 'advanced-post-manager' ) . '</option>';
foreach ( $inactive as $k => $v ) {
echo $this->dropdown_row( $k, $v );
}
Expand Down
2 changes: 1 addition & 1 deletion lib/tribe-meta-box-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected function create_meta_boxes() {
protected function map_meta_boxes() {
$return_boxes = array();
$default_id = self::PREFIX . $this->post_type . '_metabox';
$default_box = array( $default_id => __( 'Extended Information', 'tribe-apm' ) );
$default_box = array( $default_id => __( 'Extended Information', 'advanced-post-manager' ) );
$metaboxes = $this->metaboxes;
if ( is_string( $metaboxes ) ) {
$default_box[ $default_id ] = $metaboxes;
Expand Down
16 changes: 8 additions & 8 deletions lib/tribe-meta-box.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function insert_images() {

$li = "<li id='item_$attachment_id'>";
$li .= "<img src='{$attachment['url']}' />";
$li .= "<a title='" . __( 'Delete this image', 'tribe-apm' ) . "' class='tribe-delete-file' href='#' rel='$nonce|$post_id|$id|$attachment_id'>" . __( 'Delete', 'tribe-apm' ) . '</a>';
$li .= "<a title='" . __( 'Delete this image', 'advanced-post-manager' ) . "' class='tribe-delete-file' href='#' rel='$nonce|$post_id|$id|$attachment_id'>" . __( 'Delete', 'advanced-post-manager' ) . '</a>';
$li .= "<input type='hidden' name='{$id}[]' value='$attachment_id' />";
$li .= '</li>';
$html .= $li;
Expand Down Expand Up @@ -381,19 +381,19 @@ public function show_field_file( $field, $meta ) {

if ( ! empty( $meta ) ) {
$nonce = wp_create_nonce( 'tribe_ajax_delete' );
echo '<div style="margin-bottom: 10px"><strong>' . esc_html__( 'Uploaded files', 'tribe-apm' ) . '</strong></div>';
echo '<div style="margin-bottom: 10px"><strong>' . esc_html__( 'Uploaded files', 'advanced-post-manager' ) . '</strong></div>';
echo '<ol class="tribe-upload">';
foreach ( $meta as $att ) {
echo '<li>' . wp_get_attachment_link( $att, '', false, false, ' ' ) . " (<a class='tribe-delete-file' href='#' rel='$nonce|{$post->ID}|{$field['meta']}|$att'>" . esc_html__( 'Delete', 'tribe-apm' ) . '</a>)</li>';
echo '<li>' . wp_get_attachment_link( $att, '', false, false, ' ' ) . " (<a class='tribe-delete-file' href='#' rel='$nonce|{$post->ID}|{$field['meta']}|$att'>" . esc_html__( 'Delete', 'advanced-post-manager' ) . '</a>)</li>';
}
echo '</ol>';
}

// show form upload
echo '<div style="clear: both"><strong>' . esc_html__( 'Upload new files', 'tribe-apm' ) . "</strong></div>
echo '<div style="clear: both"><strong>' . esc_html__( 'Upload new files', 'advanced-post-manager' ) . "</strong></div>
<div class='new-files'>
<div class='file-input'><input type='file' name='{$field['meta']}[]' /></div>
<a class='tribe-add-file' href='#'>" . esc_html__( 'Add another file', 'tribe-apm' ) . '</a>
<a class='tribe-add-file' href='#'>" . esc_html__( 'Add another file', 'advanced-post-manager' ) . '</a>
</div>
</td>';
}
Expand Down Expand Up @@ -431,14 +431,14 @@ public function show_field_image( $field, $meta ) {

echo "<li id='item_$image'>
<img src='$src' />
<a title='" . esc_attr__( 'Delete this image', 'tribe-apm' ) . "' class='tribe-delete-file' href='#' rel='$nonce_delete|{$post->ID}|{$field['meta']}|$image'>" . esc_html__( 'Delete', 'tribe-apm' ) . "</a>
<a title='" . esc_attr__( 'Delete this image', 'advanced-post-manager' ) . "' class='tribe-delete-file' href='#' rel='$nonce_delete|{$post->ID}|{$field['meta']}|$image'>" . esc_html__( 'Delete', 'advanced-post-manager' ) . "</a>
<input type='hidden' name='{$field['meta']}[]' value='$image' />
</li>";
}
}
echo '</ul>';

echo "<a href='#' class='tribe-upload-button button' rel='{$post->ID}|{$field['meta']}'>" . esc_html__( 'Add more images', 'tribe-apm' ) . '</a>';
echo "<a href='#' class='tribe-upload-button button' rel='{$post->ID}|{$field['meta']}'>" . esc_html__( 'Add more images', 'advanced-post-manager' ) . '</a>';
echo '</td>';
}

Expand All @@ -449,7 +449,7 @@ public function show_field_color( $field, $meta ) {

$this->show_field_begin( $field, $meta );
echo "<input class='tribe-color' type='text' name='{$field['meta']}' id='{$field['meta']}' value='$meta' size='8' />
<a href='#' class='tribe-color-select' rel='{$field['meta']}'>" . esc_html__( 'Select a color', 'tribe-apm' ) . "</a>
<a href='#' class='tribe-color-select' rel='{$field['meta']}'>" . esc_html__( 'Select a color', 'advanced-post-manager' ) . "</a>
<div style='display:none' class='tribe-color-picker' rel='{$field['meta']}'></div>";
$this->show_field_end( $field, $meta );
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"_zipfoldername": "advanced-post-manager",
"_resourcepath": "src/resources",
"_domainPath": "lang",
"_textDomain": "tribe-apm",
"_textDomain": "advanced-post-manager",
"_glotPressUrl": "http://translations.theeventscalendar.com",
"_glotPressSlug": "tribe-apm",
"_glotPressFileFormat": "%textdomain%-%wp_locale%.%format%",
Expand Down
6 changes: 3 additions & 3 deletions tribe-apm.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
Version: 4.3rc2
Author: Modern Tribe, Inc.
Author URI: http://m.tri.be/4n
Text Domain: tribe-apm
Text Domain: advanced-post-manager
*/

define( 'TRIBE_APM_PATH', plugin_dir_path( __FILE__ ) );
define( 'TRIBE_APM_LIB_PATH', TRIBE_APM_PATH . 'lib/' );

class Tribe_APM {

protected $textdomain = 'tribe-apm';
protected $textdomain = 'advanced-post-manager';
protected $args;
protected $metaboxes;
protected $url;
Expand Down Expand Up @@ -84,7 +84,7 @@ public function init() {
}

private function load_text_domain() {
load_plugin_textdomain( 'tribe-apm', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );
load_plugin_textdomain( 'advanced-post-manager', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' );
}//end load_text_domain

public function resources_url( $unused_resource_url ) {
Expand Down
22 changes: 11 additions & 11 deletions views/edit-filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,32 @@
?>
<div id="tribe-filters" class="metabox-holder meta-box-sortables">
<div id="filters-wrap" class="postbox">
<div class="handlediv" title="<?php esc_attr_e( 'Click to toggle', 'tribe-apm' ); ?>"></div>
<h3 title="<?php esc_attr_e( 'Click to toggle', 'tribe-apm' ); ?>"><?php esc_html_e( 'Filters & Columns', 'tribe-apm' ); ?></h3>
<div class="handlediv" title="<?php esc_attr_e( 'Click to toggle', 'advanced-post-manager' ); ?>"></div>
<h3 title="<?php esc_attr_e( 'Click to toggle', 'advanced-post-manager' ); ?>"><?php esc_html_e( 'Filters & Columns', 'advanced-post-manager' ); ?></h3>
<form id="the-filters" action="<?php echo esc_url( $action_url ); ?>" method="post">
<div class="filters">
<?php $this->filters->output_form(); ?>
</div>
<div class="columns">
<h2><?php esc_html_e( 'Active Columns', 'tribe-apm' ); ?></h2>
<p><?php esc_html_e( 'Drag and drop to order and select which columns are displayed in the entries table.', 'tribe-apm' ); ?></p>
<h2><?php esc_html_e( 'Active Columns', 'advanced-post-manager' ); ?></h2>
<p><?php esc_html_e( 'Drag and drop to order and select which columns are displayed in the entries table.', 'advanced-post-manager' ); ?></p>
<?php $this->columns->output_form(); ?>
</div>
<div class="apm-actions">
<div class="alignleft actions">
<input type="submit" name="tribe-apply" value="<?php esc_attr_e( 'Apply', 'tribe-apm' ); ?>" class="button-primary" />
<input type="submit" name="save" value="<?php esc_attr_e( 'Save Filter Set', 'tribe-apm' ); ?>" class="button-secondary save" />
<input type="submit" name="tribe-apply" value="<?php esc_attr_e( 'Apply', 'advanced-post-manager' ); ?>" class="button-primary" />
<input type="submit" name="save" value="<?php esc_attr_e( 'Save Filter Set', 'advanced-post-manager' ); ?>" class="button-secondary save" />
<?php if ( $this->export ) : ?>
<input type="submit" name="csv" value="Export" title="<?php esc_attr_e( 'Export to CSV', 'tribe-apm' ); ?>" class="button-secondary csv" />
<input type="submit" name="csv" value="Export" title="<?php esc_attr_e( 'Export to CSV', 'advanced-post-manager' ); ?>" class="button-secondary csv" />
<?php endif; ?>
</div>
<div class="alignleft save-options">
<label for="filter_name"><?php esc_html_e( 'Filter Name', 'tribe-apm' ); ?> </label><input type="text" name="filter_name" value="" id="filter_name" />
<input type="submit" name="tribe-save" value="<?php esc_attr_e( 'Save', 'tribe-apm' ); ?>" class="button-primary save" />
<a href="#" id="cancel-save"><?php esc_html_e( 'Cancel', 'tribe-apm' ); ?></a>
<label for="filter_name"><?php esc_html_e( 'Filter Name', 'advanced-post-manager' ); ?> </label><input type="text" name="filter_name" value="" id="filter_name" />
<input type="submit" name="tribe-save" value="<?php esc_attr_e( 'Save', 'advanced-post-manager' ); ?>" class="button-primary save" />
<a href="#" id="cancel-save"><?php esc_html_e( 'Cancel', 'advanced-post-manager' ); ?></a>
</div>
<div class="alignright clear-action">
<input type="submit" name="tribe-clear" value="<?php esc_attr_e( 'Reset to Default', 'tribe-apm' ); ?>" class="button-primary button-apm-reset" />
<input type="submit" name="tribe-clear" value="<?php esc_attr_e( 'Reset to Default', 'advanced-post-manager' ); ?>" class="button-primary button-apm-reset" />
</div>
</div>
</form>
Expand Down

0 comments on commit 9af8cab

Please sign in to comment.