Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions admin-ui.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
*/

$dir = dirname(__FILE__);
require_once("${dir}/feedwordpressadminpage.class.php");
require_once("${dir}/feedwordpresssettingsui.class.php");
require_once("{$dir}/feedwordpressadminpage.class.php");
require_once("{$dir}/feedwordpresssettingsui.class.php");

function fwp_update_set_results_message ($delta, $joiner = ';') {
$mesg = array();
Expand Down Expand Up @@ -68,10 +68,10 @@ function fwp_tags_box ($tags, $object, $params = array()) {
$params['textarea_name'] = "tax_input[$tax_name]";
endif;
if (is_null($params['textarea_id'])) :
$params['textarea_id'] = "tax-input-${tax_name}";
$params['textarea_id'] = "tax-input-{$tax_name}";
endif;
if (is_null($params['input_id'])) :
$params['input_id'] = "new-tag-${tax_name}";
$params['input_id'] = "new-tag-{$tax_name}";
endif;
if (is_null($params['input_name'])) :
$params['input_name'] = "newtag[$tax_name]";
Expand Down Expand Up @@ -260,7 +260,7 @@ function fwp_syndication_manage_page_links_table_rows ($links, $page, $visible =
<th class="check-column" scope="col"><input type="checkbox" /></th>
<?php
foreach ($fwp_syndicated_sources_columns as $col) :
print "\t<th scope='col'>${col}</th>\n";
print "\t<th scope='col'>{$col}</th>\n";
endforeach;
print "</tr>\n";
print "</thead>\n";
Expand Down
4 changes: 2 additions & 2 deletions authors-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,15 +301,15 @@ function fix_mismatch ($post) {
WHERE ({$wpdb->posts}.id IN $post_set
$parent_in_clause)
");
$this->mesg = sprintf(__("Re-assigned %d ${posts}."), $N);
$this->mesg = sprintf(__("Re-assigned %d {$posts}."), $N);

// ... and kill them all
elseif ('filter'==$to) :
foreach ($post_ids as $post_id) :
wp_delete_post($post_id);
endforeach;

$this->mesg = sprintf(__("Deleted %d ${posts}."), $N);
$this->mesg = sprintf(__("Deleted %d {$posts}."), $N);
endif;
else :
$this->mesg = __("Couldn't find any posts that matched your criteria.");
Expand Down
8 changes: 4 additions & 4 deletions extend/SimplePie/feedwordpie_item.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
$ver = SIMPLEPIE_VERSION;;
$mod = basename(__FILE__);

if ( is_readable("${subdir}/${ver}/${mod}") ) :
$modClassPath = "${subdir}/${ver}/${mod}";
if ( is_readable("{$subdir}/{$ver}/{$mod}") ) :
$modClassPath = "{$subdir}/{$ver}/{$mod}";
else :
$modClassPath = "${subdir}/default/${mod}";
$modClassPath = "{$subdir}/default/{$mod}";
endif;

require_once("${modClassPath}");
require_once("{$modClassPath}");
8 changes: 4 additions & 4 deletions extend/SimplePie/feedwordpie_parser.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
$ver = SIMPLEPIE_VERSION;
$mod = basename(__FILE__);

if ( is_readable("${subdir}/${ver}/${mod}") ) :
$modClassPath = "${subdir}/${ver}/${mod}";
if ( is_readable("{$subdir}/{$ver}/{$mod}") ) :
$modClassPath = "{$subdir}/{$ver}/{$mod}";
else :
$modClassPath = "${subdir}/default/${mod}";
$modClassPath = "{$subdir}/default/{$mod}";
endif;

require_once("${modClassPath}");
require_once("{$modClassPath}");
2 changes: 1 addition & 1 deletion feeds-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ function display_feedfinder () {
else:
foreach ($finder as $url => $ff) :
$url = esc_html($url);
print "<h3>Searched for feeds at ${url}</h3>\n";
print "<h3>Searched for feeds at {$url}</h3>\n";
print "<p><strong>".__('Error').":</strong> ".__("FeedWordPress couldn't find any feeds at").' <code><a href="'.htmlspecialchars($lookup).'">'.htmlspecialchars($lookup).'</a></code>';
print ". ".__('Try another URL').".</p>";

Expand Down
60 changes: 30 additions & 30 deletions feedwordpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@

$dependencyMet = (('class'==$unitType) ? class_exists($unitName) : function_exists($unitName));
if (!$dependencyMet) :
$phpFileName = ABSPATH . WPINC . "/${fileSlug}.php";
$phpFileName = ABSPATH . WPINC . "/{$fileSlug}.php";
if (file_exists($phpFileName)) :
require_once($phpFileName);
else :
Expand All @@ -126,28 +126,28 @@

// Dependences: modules packaged with FeedWordPress plugin
$dir = dirname(__FILE__);
require_once("${dir}/externals/myphp/myphp.class.php");
require_once("${dir}/feedwordpressadminpage.class.php");
require_once("${dir}/feedwordpresssettingsui.class.php");
require_once("${dir}/feedwordpressdiagnostic.class.php");
require_once("${dir}/admin-ui.php");
require_once("${dir}/template-functions.php");
require_once("${dir}/feedwordpresssyndicationpage.class.php");
require_once("${dir}/compatability.php"); // Legacy API
require_once("${dir}/syndicatedpost.class.php");
require_once("${dir}/syndicatedlink.class.php");
require_once("${dir}/feedwordpresshtml.class.php");
require_once("${dir}/inspectpostmeta.class.php");
require_once("${dir}/syndicationdataqueries.class.php");
require_once("${dir}/extend/SimplePie/feedwordpie.class.php");
require_once("${dir}/extend/SimplePie/feedwordpie_cache.class.php");
require_once("${dir}/extend/SimplePie/feedwordpie_item.class.php");
require_once("${dir}/extend/SimplePie/feedwordpie_file.class.php");
require_once("${dir}/extend/SimplePie/feedwordpie_parser.class.php");
require_once("${dir}/extend/SimplePie/feedwordpie_content_type_sniffer.class.php");
require_once("${dir}/feedwordpressrpc.class.php");
require_once("${dir}/feedwordpresshttpauthenticator.class.php");
require_once("${dir}/feedwordpresslocalpost.class.php");
require_once("{$dir}/externals/myphp/myphp.class.php");
require_once("{$dir}/feedwordpressadminpage.class.php");
require_once("{$dir}/feedwordpresssettingsui.class.php");
require_once("{$dir}/feedwordpressdiagnostic.class.php");
require_once("{$dir}/admin-ui.php");
require_once("{$dir}/template-functions.php");
require_once("{$dir}/feedwordpresssyndicationpage.class.php");
require_once("{$dir}/compatability.php"); // Legacy API
require_once("{$dir}/syndicatedpost.class.php");
require_once("{$dir}/syndicatedlink.class.php");
require_once("{$dir}/feedwordpresshtml.class.php");
require_once("{$dir}/inspectpostmeta.class.php");
require_once("{$dir}/syndicationdataqueries.class.php");
require_once("{$dir}/extend/SimplePie/feedwordpie.class.php");
require_once("{$dir}/extend/SimplePie/feedwordpie_cache.class.php");
require_once("{$dir}/extend/SimplePie/feedwordpie_item.class.php");
require_once("{$dir}/extend/SimplePie/feedwordpie_file.class.php");
require_once("{$dir}/extend/SimplePie/feedwordpie_parser.class.php");
require_once("{$dir}/extend/SimplePie/feedwordpie_content_type_sniffer.class.php");
require_once("{$dir}/feedwordpressrpc.class.php");
require_once("{$dir}/feedwordpresshttpauthenticator.class.php");
require_once("{$dir}/feedwordpresslocalpost.class.php");

####################################################################################
## GLOBAL PARAMETERS ###############################################################
Expand Down Expand Up @@ -222,7 +222,7 @@ function debug_out_human_readable_bytes ($quantity) {
$quantity = floor($quantity / 1024);
$magnitude = array_shift($orders);
endwhile;
return "${quantity} ${magnitude}";
return "{$quantity} {$magnitude}";
}

function debug_out_feedwordpress_footer () {
Expand Down Expand Up @@ -429,16 +429,16 @@ function syndication_comments_feed_link ($link) {
return $link;
} /* function syndication_comments_feed_link() */

require_once("${dir}/feedwordpress.pings.functions.php");
require_once("{$dir}/feedwordpress.pings.functions.php");

require_once("${dir}/feedwordpress.wp-admin.post-edit.functions.php");
require_once("{$dir}/feedwordpress.wp-admin.post-edit.functions.php");

################################################################################
## class FeedWordPressBoilerplateReformatter ###################################
################################################################################

require_once("${dir}/feedwordpressboilerplatereformatter.class.php");
require_once("${dir}/feedwordpressboilerplatereformatter.shortcode.functions.php");
require_once("{$dir}/feedwordpressboilerplatereformatter.class.php");
require_once("{$dir}/feedwordpressboilerplatereformatter.shortcode.functions.php");

################################################################################
## class FeedWordPress #########################################################
Expand Down Expand Up @@ -2129,7 +2129,7 @@ public function email_diagnostic_log ($params = array()) {
$cell = date('j-M-y, h:i a', $cell);
endif;
$class = strtolower(preg_replace('/\s+/', '-', $col));
$body .= "<td class=\"$class\">${cell}</td>";
$body .= "<td class=\"$class\">{$cell}</td>";
endforeach;
$body .= "</tr>\n";
endforeach;
Expand Down Expand Up @@ -2255,7 +2255,7 @@ static function menu_cap ($sub = false) {

public function plugin_dir_path ($path = '') {
$dir = plugin_dir_path( __FILE__ );
$file_path = "${dir}${path}";
$file_path = "{$dir}{$path}";
return apply_filters( "feedwordpress_plugin_dir_path", $file_path );
} /* FeedWordPress::plugin_dir_path () */

Expand Down
2 changes: 1 addition & 1 deletion feedwordpress.pings.functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function fwp_release_pings () {
if (!is_null($diag_message)) :
FeedWordPress::diagnostic(
'syndicated_posts:do_pings',
"FeedWordPress ${diag_message}, fwp_held_ping=".json_encode($fwp_held_ping)
"FeedWordPress {$diag_message}, fwp_held_ping=".json_encode($fwp_held_ping)
);
endif;
}
Expand Down
2 changes: 1 addition & 1 deletion feedwordpressadminpage.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public function display_feed_settings_page_links ($params = array()) {
if ($link['page']==basename($this->filename)) :
print "<strong>";
else :
print "<a href=\"${url}\">";
print "<a href=\"{$url}\">";
endif;

if ($params['long']) : print esc_html(__($link['long']));
Expand Down
12 changes: 6 additions & 6 deletions feedwordpressdiagnostic.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static function feed_error ($error, $old, $link) {
$mesg = esc_html($mesg);
FeedWordPress::diagnostic(
'updated_feeds:errors',
"Feed Error: [${url}] update returned error: $mesg"
"Feed Error: [{$url}] update returned error: $mesg"
);

$hours = get_option('feedwordpress_diagnostics_persistent_errors_hours', 2);
Expand All @@ -27,8 +27,8 @@ public static function feed_error ($error, $old, $link) {
$mostRecent = date('r', $error['ts']);
FeedWordPress::diagnostic(
'updated_feeds:errors:persistent',
"Feed Update Error: [${url}] returning errors"
." since ${since}:<br/><code>$mesg</code>",
"Feed Update Error: [{$url}] returning errors"
." since {$since}:<br/><code>$mesg</code>",
$url, $error['since'], $error['ts']
);
endif;
Expand Down Expand Up @@ -60,14 +60,14 @@ public static function critical_bug ($varname, $var, $line, $file = NULL) {
global $wp_version;

if (!is_null($file)) :
$location = "line # ${line} of ".basename($file);
$location = "line # {$line} of ".basename($file);
else :
$location = "line # ${line}";
$location = "line # {$line}";
endif;

print '<p><strong>Critical error:</strong> There may be a bug in FeedWordPress. Please <a href="'.FEEDWORDPRESS_AUTHOR_CONTACT.'">contact the author</a> and paste the following information into your e-mail:</p>';
print "\n<plaintext>";
print "Triggered at ${location}\n";
print "Triggered at {$location}\n";
print "FeedWordPress: ".FEEDWORDPRESS_VERSION."\n";
print "WordPress: {$wp_version}\n";
print "PHP: ".phpversion()."\n";
Expand Down
10 changes: 5 additions & 5 deletions feedwordpresssettingsui.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ static function is_admin () {
$fwp = preg_quote(FeedWordPress::path());
$admin_page = (
is_admin()
and preg_match("|^${fwp}/|", MyPHP::request('page'))
and preg_match("|^{$fwp}/|", MyPHP::request('page'))
);
endif;
return $admin_page;
Expand Down Expand Up @@ -95,21 +95,21 @@ static function fix_toggles_js ($context) {
static public function get_template_part ( $slug, $name = null, $type = null, $args = array() ) {
global $feedwordpress;

do_action( "feedwordpress_get_template_part_${slug}", $slug, $name, $type, $args );
do_action( "feedwordpress_get_template_part_{$slug}", $slug, $name, $type, $args );

$templates = array();
$name = (string) $name;
$type = (string) $type;

$ext = ".php";
if ( strlen($type) > 0 ):
$ext = ".${type}${ext}";
$ext = ".{$type}{$ext}";
endif;

if ( strlen($name) > 0 ) :
$templates[] = "${slug}-${name}${ext}";
$templates[] = "{$slug}-{$name}{$ext}";
endif;
$templates[] = "${slug}${ext}";
$templates[] = "{$slug}{$ext}";

do_action( "feedwordpress_get_template_part", $slug, $name, $type, $args );

Expand Down
8 changes: 4 additions & 4 deletions feedwordpresssyndicationpage.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function updates_requested () {
// $link_list has previously been sanitized for html by self::requested_link_ids_sql
$targets = $wpdb->get_results("
SELECT * FROM $wpdb->links
WHERE link_id IN ${link_list}
WHERE link_id IN {$link_list}
");
if (is_array($targets)) :
foreach ($targets as $target) :
Expand Down Expand Up @@ -874,7 +874,7 @@ function multidelete_page () {
// $link_list has previously been sanitized for html by self::requested_link_ids_sql
$targets = $wpdb->get_results("
SELECT * FROM $wpdb->links
WHERE link_id IN ${link_list}
WHERE link_id IN {$link_list}
");
?>
<form action="<?php print $this->form_action(); ?>" method="post">
Expand Down Expand Up @@ -997,7 +997,7 @@ function multiundelete_page () {
// $link_list has previously been sanitized for html by self::requested_link_ids_sql
$targets = $wpdb->get_results("
SELECT * FROM $wpdb->links
WHERE link_id IN ${link_list}
WHERE link_id IN {$link_list}
");
?>
<form action="<?php print $this->form_action(); ?>" method="post">
Expand Down Expand Up @@ -1092,7 +1092,7 @@ function fwp_dashboard_update_if_requested ($object) {
else :
$display_uri = esc_html(feedwordpress_display_url($uri));
$uri = esc_html($uri);
echo "<li><p><strong>Error:</strong> There was a problem updating <code><a href=\"$uri\">${display_uri}</a></code></p></li>\n";
echo "<li><p><strong>Error:</strong> There was a problem updating <code><a href=\"$uri\">{$display_uri}</a></code></p></li>\n";
endif;
endforeach;
echo "</ul>\n";
Expand Down
4 changes: 2 additions & 2 deletions posts-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ function formatting_box ($page, $box = NULL) {
'closed' => sprintf(__("Don't ".strtolower($how['accept'])." %s"), __($onThesePosts)),
);
$params[$what] = array(
'input-name' => "feed_${what}_status",
'input-name' => "feed_{$what}_status",
'setting-default' => NULL,
'global-setting-default' => FeedWordPress::syndicated_status($what, /*default=*/ 'closed'),
'labels' => array(
Expand All @@ -377,7 +377,7 @@ function formatting_box ($page, $box = NULL) {
<tr><th scope="row"><?php print $how['label']; ?>:</th>
<td><?php
$this->setting_radio_control(
"$what status", "syndicated_${what}_status",
"$what status", "syndicated_{$what}_status",
$settings[$what], $params[$what]
);
?></td></tr>
Expand Down
4 changes: 2 additions & 2 deletions syndicatedlink.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ public function poll ($crash_ts = NULL) {

$suffix = ($crashed ? 'crashed' : 'completed');
do_action('update_syndicated_feed_items', $this->id, $this);
do_action("update_syndicated_feed_items_${suffix}", $this->id, $this);
do_action("update_syndicated_feed_items_{$suffix}", $this->id, $this);

$this->update_setting('update/processed', $processed);
if (!$crashed) :
Expand Down Expand Up @@ -880,7 +880,7 @@ public function postmeta ($params = array()) {

// Now, run through and parse them all.
foreach ($this->postmeta[/*parsed=*/ false] as $key => $meta) :
$meta = apply_filters("syndicated_link_post_meta_${key}_pre", $meta, $this);
$meta = apply_filters("syndicated_link_post_meta_{$key}_pre", $meta, $this);
$this->postmeta[/*parsed=*/ false][$key] = $meta;
$this->postmeta[/*parsed=*/ true][$key] = new FeedWordPressParsedPostMeta($meta);
endforeach;
Expand Down
6 changes: 3 additions & 3 deletions syndicatedpost.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@ public function __construct ($item, $source) {
if (!is_null($value)) :
if ($what=='title') : $key = 'syndication_source';
elseif ($what=='feed') : $key = 'syndication_feed';
else : $key = "syndication_source_${what}";
else : $key = "syndication_source_{$what}";
endif;

$sourcemeta["${key}_original"] = apply_filters(
$sourcemeta["{$key}_original"] = apply_filters(
'syndicated_item_original_source_'.$what,
$value,
$this
Expand Down Expand Up @@ -1530,7 +1530,7 @@ protected function secure_term_ids () {

// Allow FWP add-on filters to control the taxonomies we use to search for a term
$taxonomies = apply_filters("syndicated_post_terms_match", $taxonomies, $what, $this);
$taxonomies = apply_filters("syndicated_post_terms_match_${what}", $taxonomies, $this);
$taxonomies = apply_filters("syndicated_post_terms_match_{$what}", $taxonomies, $this);

// Allow FWP add-on filters to control with greater precision what happens on unmatched
$unmatched = apply_filters("syndicated_post_terms_unfamiliar",
Expand Down