Is it unethical to remove another plugin’s meta keys?

In doing some site optimization work for a client, I ran into a plugin that does replaces WP’s built-in featured image functionality with a separate meta box allowing you to specify an image URL rather than importing the image into your own Media Library.

Recent updates to this plugin broke my client’s site, where the posts that had external featured images would not display them. And examining the plugin code itself (poor documentation, direct SQL queries on the database) lends me to believe he doesn’t quite know what he’s doing.

For my client, I whipped together a custom plugin to loop through posts with that plugin’s meta keys, import the image into the media library, and attach it to the post. Finally, it deletes the other plugin’s meta key.

Now I have no qualms running the fix on my client’s site, but I’m thinking of putting the plugin on the WordPress Plugins Directory as well. And maybe even a “premium” version with monetization.

I scanned through the WP plugins code of conduct, but didn’t see anything listed about modifying another plugin’s meta entries. Is there anything unethical about this?

Do Onpage SEO Optimization, Meta Tags, H Tags, Alt, Sitemap for $5

Are you looking for the Most effective On page SEO Service to improve your website ranking in Google Search Results? If yes, then you are at the right Place. We will implement 25+ White hat result-driven Strategies to skyrocket your page Search Engine Optimization. Package Includes: 1. Website Audit Report: Full website in-depth Analysis Organic Search Analysis 2. Keyword Research: Long tail & LSI Keyword Research 3. Competitors Analysis: Organic traffic, Domain/Page rank, & backlinks analysis 4. Complete On-Page Optimization (25+ Strategies): Make website SEO Friendly Long tail and LSI Keywords Optimization Meta Tags Optimization(Meta Title & Description tags) Heading tags(H1, H2, H3) optimization Images Optimization, name, title and Alt Tags

by: mojibul44
Created: —
Category: Local SEO
Viewed: 165


How to skip any category in seo meta title template?

We have magento 2 on website we have 4 categories, we sell photocopier parts, let me give an example what issue we are facing and what we want.

Konica Minolta – Bizhub Color Series- Bizhub 203 – Toner Cartridges Category 1 – Category 2 – Category 3 – Category 4

We have magewrox seo suit installed on website , we made a template for meta titles when we call categories in this template the meta title goes like this

“Konica Minolta Bizhub Color Series Bizhub 203 Toner Cartridges”

We want to skip series category in seo templates , but when we change the sequence like Category 1 – Category 3 – Category 4 on different pages and stages it catches the sequence at current stage of ccategory breadcrumbs and does not skip. We want to show this category to customers but want to hide and skip it in meta titles. We talked with magewrox they said that it is not possible in their extension. Do we have any customization in which we can show category on front end but it should be hidden in seo templates. Like on any page when we call category 2 in any template it should not consider the series category it should consider next one as category 2. Hope it make sense if you dont understand I will try to elaborate it more

Using meta tags for Facebook in a SharePoint site

I have a public-facing SharePoint Foundation 2013 site, http://www.oceanview335.com. It is NOT a SharePoint Online site. I am trying to build meta tags in the master page so I can control the data shown when posting to Facebook. I have it working except for the image, which for me is the most important part.

Here are my meta tags in the master page:

<meta property="og:type" content="website" /> <meta property="og:url" content="http://www.oceanview335.com/SitePages/Home.aspx" /> <meta property="og:title" content="Ocean View Lodge No. 335" /> <meta property="og:site_name" content="Ocean View Lodge No. 335" /> <meta property="og:image" content="http://www.oceanview335.com/Pictures/OV_eye_small.jpg" /> <meta property="og:description" content="Ocean View Masonic Lodge No. 335 A. F. & A. M. Norfolk, Virginia" /> 

Based on suggestions I found in stackoverflow and elsewhere, I added this line:

<link rel="image_src" type="image/jpeg" href="http://www.oceanview335.com/Pictures/OV_eye_small.jpg" /> 

Using the Object Debugger for Facebook, https://developers.facebook.com/tools/debug I get the following results:

og:image was not defined, could not be downloaded or was not big enough. Please define a chosen image using the og:image metatag, and use an image that's at least 200x200px and is accessible from Facebook. Image 'http://www.oceanview335.com/Pictures/2015%20DDGMs.png' will be used instead. 

The end result is, if I create a NEW post in Facebook, the image from my home page “2015%20DDGMs.png” is displayed. If I COMMENT on an existing post, the correct image “OV_eye_small.jpg” is displayed. I have tried various suggestions, such as resizing the image to 200×200 or a multiplication thereof. The current image is 200×200. I have tried .png and .jpg images. I have added the image_src link listed above. Nothing I found through Googling to try has removed this “image was not defined” error or given me the correct image in Facebook posts.

UPDATE: I just posted this question on StackOverflow as I have received zero responses. I think this problem is specific to SharePoint sites. Using Twitter Cards, which also use meta tags, work flawlessly: https://dev.twitter.com/cards/getting-started​

C++ Templated single value container (std::any) with meta data [on hold]

My intention is to implement a single value container which stores all possible types, like QVariant or others does. I tried to take advantage of std::any which gives a type safe container for the same purpose. Additionally I would like to store some meta data (timestamps mostly) which refer to target value.

I came up so far with two solutions which does not work properly. The class template version Value works but the interface does not fit properly in my opinion. See the first get function for an example. One need to know which type is returned on invocation. auto could help, but not in all situations.

The second solution has a pretty nice interface, like QVariant. See the access function get which returns LateValue. After calling this function one can dig deeper for the stored type and so on. Problem here is whenever I put this stuff into a library the template methods (getter and constructor) do not get instantiated. One can do this manually with the getter method but not with the constructor, it is simply not possible.

#include <any> #include <memory> #include <iostream>  class Time {     int m_a, m_b; public:     Time(int a, int b) : m_a(a), m_b(b) {}     int a() const { return m_a; }     int b() const { return m_b; }      friend std::ostream &operator<<(std::ostream &os, const Time &time) noexcept {         os << time.a() << ' ' << time.b();         return os;     } };  template<typename T> class Value {     struct Impl {         std::any value;     };     std::unique_ptr<Impl> m_p; public:     explicit Value(const T &value) : m_p(std::make_unique<Impl>()) {         m_p->value = std::make_any<T>(value);     }     T get() const {         return std::any_cast<T>(m_p->value);     } };  class LateValue {     struct Impl {         std::any value;     };     std::unique_ptr<Impl> m_p; public:     template<typename T>     LateValue(const T &value) : m_p(std::make_unique<Impl>()) {         m_p->value = std::make_any<T>(value);     }     template<typename T>     T get() const {         return std::any_cast<T>(m_p->value);     } }; 

Here is a simple test program. Note that the above code goes into the same file.

template<typename T> Value<T> get() {     return Value<T>(1.2f); }  LateValue get() {     return LateValue(1.2f); }  int main() {     Value<int>   v0(1);     Value<float> v1(1.234f);     Value<Time>  v2(Time(1, 2));      LateValue l0(1);     LateValue l1(1.234f);     LateValue l2(Time(1, 2));      std::cout << v0.get() << ' '               << v1.get() << ' '               << v2.get() << '\n'               << l0.get<int>() << ' '               << l1.get<float>() << ' '               << l2.get<Time>() << '\n';      auto value = get<float>();     std::cout << " value is " << value.get() << '\n';      // l2.get<double>(); <--- exception: bad_any_cast (ok to me)      return 0; } 

The output is simply as in code, because it is working (single file!):

1 1.234 1 2 1 1.234 1 2  value is 1.2 

So the question is: How to improve the implementation to have a nice interface with simplicity of template parameter? (I try to overcome the necessity to implement a get method for every supported type.)


To clearify: I want a single value container which holds any type which I can access later. I do not want to cast the contained type in any way (ok to me in comments). The Implementations Value and LateValue do literally the same but provide different interfaces. Value needs to know the contained type on definition (see first get function), LateValue needs the type on access. The latter interface is what I need but the provided implementation does not work when using from a library.

How to get_terms() only of terms matching an ACF meta value?

My custom taxonomy “company” has an Advanced Custom Fields field group with fields including a Checkbox, “tags“. (This adds to each “company” term fields including “tags”, which accepts multiple string values corresponding to checkbox items).

I need to gather several groups of terms whose “tags” values include particular distinct values, eg. “Publishing”, “Media”, “Advertising.

So far, I have the following method, in which I cycle through all “company” terms and, if the string is found, add that term’s ID to an array, used later to get actual term objects…

// Pick a focus tag (choose from 'Tags' ACF Checkbox values in the Organisation field) $  tag_section = "Publishing";  // First, get all organisation terms $  organisations = get_terms( 'company' );  // Initialise array we will use to store only matching organisations $  orgs_filtered = array();  // Make an array with only IDs of organisations with a matching tag foreach ($  organisations as $  organisation) {    // Construct prefixed object ref for this organisation    $  org_id_prefixed = 'company_'. $  organisation->term_id;    // If the intended value matches the target value    if(in_array($  tag_section, get_field('tags', $  org_id_prefixed))){       // add its term ID to our array - use this array to feed a WP_Query or similar       array_push($  orgs_filtered, $  organisation->term_id);    } } 

… But this only gives me an array of the IDs of matching terms – not an array **of the terms* themselves.

It feels like my method is cumbersome, and that it should be possible to make the above more efficient and get the actual term objects themselves.

I have read about using meta_query with get_posts via ACF and I am familiar with WordPress’ get_terms(). So I am hopeful it is possible to use a similar method.

But, when I try the following test in pursuit, it returns nothing from $ my_terms

$  args = array(     'taxonomy'   => 'company',     'hide_empty' => false,     'meta_query' => array(          array(             'key'       => 'tags',             'value'     => 'Publishing',             'compare'   => '='          )     ) ); $  my_terms = get_terms($  args);  echo '<pre>'; print_r($  my_terms); echo '</pre>'; 

Thinking perhaps the ‘value’ should be an array, I changed the value part to 'value' => array('Publishing'),

But then that just shows ALL “company” terms from the site, with no matching in effect.

I have also tried both variations with a compare value of in.

Do you have any ideas about this?

Thanks.