Plugin Directory

Changeset 3389293


Ignore:
Timestamp:
11/04/2025 02:43:36 AM (5 months ago)
Author:
marceljm
Message:

Auto-share on social media

Location:
featured-image-from-url/trunk
Files:
2 added
9 edited

Legend:

Unmodified
Added
Removed
  • featured-image-from-url/trunk/admin/html/js/menu.js

    r3344902 r3389293  
    4444    jQuery("#tabsAutoSet").tabs();
    4545    jQuery("#tabsAutoSetSub").tabs();
     46    jQuery("#tabsAutoShare").tabs();
     47    jQuery("#tabsAutoShareSub").tabs();
    4648    jQuery("#tabsTags").tabs();
    4749    jQuery("#tabsScreenshot").tabs();
  • featured-image-from-url/trunk/admin/html/menu.html

    r3356282 r3389293  
    329329                            <div id="tabsAutoSet-h">
    330330                                <?php $fifu['auto']['credits']['desc']() ?>
     331                            </div>
     332                        </ul>
     333                    </div>
     334                </div>
     335
     336                <div class="fifubox">
     337                    <div class="fifu-pro"><a class="fifu-pro-link" href="https://fifu.app/" target="_blank" title="<?php $fifu['unlock']() ?>"><span class="dashicons dashicons-lock fifu-pro-icon"></span></a></div>
     338                    <h2><i class="fa-solid fa-share-nodes"></i> <?php $fifu['title']['share']() ?> <span id="fifu-auto-share-info" class="dashicons dashicons-info" style="font-size: 20px; cursor: pointer; color: #9ba2a6;"></span></h2>
     339
     340                    <div class="greybox">
     341
     342                        <?php $fifu['share']['desc']() ?>
     343
     344                    </div>
     345
     346                    <br>
     347
     348                    <div id="tabsAutoShare">
     349                        <ul>
     350                            <li><a href="#tabsAutoShare-a"><?php $fifu['share']['tab']['auto']() ?></a></li>
     351                            <li><a href="#tabsAutoShare-b"><?php $fifu['share']['tab']['social']() ?></a></li>
     352                            <li><a href="#tabsAutoShare-c"><?php $fifu['share']['tab']['test']() ?></a></li>
     353                            <br>
     354                            <br>
     355                            <div id="tabsAutoShare-a">
     356                                <table style="text-align:left">
     357                                    <tr>
     358                                        <th>
     359                                            <input
     360                                                type="submit"
     361                                                href="javascript:void(0)"
     362                                                id="fifu_toggle_auto_share"
     363                                                onclick="javascript:void(0)"
     364                                                name="fifu_toggle_auto_share"
     365                                                class="toggleoff"
     366                                                value=""
     367                                                style="display:block;border:none">
     368                                        </th>
     369                                    </tr>
     370                                </table>
     371                            </div>
     372                            <div id="tabsAutoShare-b">
     373                                <div id="tabsAutoShareSub">
     374                                    <ul>
     375                                        <li><a href="#tabsAutoShareSub-b">Facebook</i></a></li>
     376                                        <li><a href="#tabsAutoShareSub-c">Instagram</a></li>
     377                                        <li><a href="#tabsAutoShareSub-g">X</a></li>
     378                                        <br>
     379                                        <br>
     380                                        <div id="tabsAutoShareSub-b">
     381                                            <table>
     382                                                <tr style="text-align:left">
     383                                                    <th>
     384                                                        <input
     385                                                            type="submit"
     386                                                            href="javascript:void(0)"
     387                                                            id="fifu_toggle_auto_share_facebook"
     388                                                            onclick="javascript:void(0)"
     389                                                            name="fifu_toggle_auto_share_facebook"
     390                                                            class="toggleoff"
     391                                                            value=""
     392                                                            style="display:block;border:none">
     393                                                    </th>
     394                                                    <th>
     395                                                    </th>
     396                                                </tr>
     397                                            </table>
     398                                        </div>
     399                                        <div id="tabsAutoShareSub-c">
     400                                            <table>
     401                                                <tr style="text-align:left">
     402                                                    <th>
     403                                                        <input
     404                                                            type="submit"
     405                                                            href="javascript:void(0)"
     406                                                            id="fifu_toggle_auto_share_instagram"
     407                                                            onclick="javascript:void(0)"
     408                                                            name="fifu_toggle_auto_share_instagram"
     409                                                            class="toggleoff"
     410                                                            value=""
     411                                                            style="display:block;border:none">
     412                                                    </th>
     413                                                    <th>
     414                                                    </th>
     415                                                </tr>
     416                                            </table>
     417                                        </div>
     418                                        <div id="tabsAutoShareSub-g">
     419                                            <table>
     420                                                <tr style="text-align:left">
     421
     422                                                </tr>
     423                                            </table>
     424
     425                                            <table>
     426                                                <tr style="text-align:left">
     427                                                    <th>
     428                                                        <input id="fifu_input_auto_share_x_clientid"
     429                                                               type="text"
     430                                                               name="fifu_input_auto_share_x_clientid"
     431                                                               style="width:320px"
     432                                                               value=""
     433                                                               placeholder="<?php $fifu['share']['label']['client']() ?>">
     434                                                    </th>
     435                                                    <th>
     436                                                        <input
     437                                                            type="submit"
     438                                                            href="javascript:void(0)"
     439                                                            id="fifu_toggle_auto_share_x"
     440                                                            onclick="javascript:void(0)"
     441                                                            name="fifu_toggle_auto_share_x"
     442                                                            class="toggleoff"
     443                                                            value=""
     444                                                            style="display:block;border:none">
     445                                                    </th>
     446                                                    <th>
     447                                                    </th>
     448                                                </tr>
     449                                            </table>
     450                                        </div>
     451                                    </ul>
     452                                </div>
     453                            </div>
     454                            <div id="tabsAutoShare-c">
     455                                <table style="text-align:left">
     456                                    <tr>
     457                                        <th>
     458                                            <input id="fifu_input_auto_share_postid"
     459                                                   type="text"
     460                                                   name="fifu_input_auto_share_postid"
     461                                                   style="width:100px"
     462                                                   value=""
     463                                                   placeholder="<?php $fifu['share']['label']['postid']() ?>">
     464                                            <input type="submit"
     465                                                   value="<?php $fifu['share']['button']['now']() ?>">
     466                                            <i class="fa-brands fa-square-facebook fifu-share-icon" data-provider="facebook" aria-hidden="true"></i>
     467                                            <i class="fa-brands fa-square-instagram fifu-share-icon" data-provider="instagram" aria-hidden="true"></i>
     468                                            <i class="fa-brands fa-square-x-twitter fifu-share-icon" data-provider="x" aria-hidden="true"></i>
     469                                        </th>
     470                                    </tr>
     471                                </table>
    331472                            </div>
    332473                        </ul>
  • featured-image-from-url/trunk/admin/log.php

    r3362830 r3389293  
    1919
    2020    if (is_array($entry)) {
    21         $entry = json_encode([current_time('mysql') => $entry], JSON_UNESCAPED_SLASHES);
     21        $entry = json_encode(
     22                [current_time('mysql') => $entry],
     23                JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PARTIAL_OUTPUT_ON_ERROR
     24        );
    2225    }
    2326
  • featured-image-from-url/trunk/admin/menu.php

    r3373002 r3389293  
    6262        wp_enqueue_script('jquery-ui', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js');
    6363        wp_enqueue_script('jquery-block-ui', 'https://cdnjs.cloudflare.com/ajax/libs/jquery.blockUI/2.70/jquery.blockUI.min.js');
     64
     65        wp_enqueue_style('fancy-box-css', 'https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.css');
     66        wp_enqueue_script('fancy-box-js', 'https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.js');
    6467
    6568        wp_enqueue_style('datatable-css', '//cdn.datatables.net/1.11.3/css/jquery.dataTables.min.css');
     
    271274    wp_enqueue_style('fifu-menu-css', plugins_url('/html/css/menu.css', __FILE__), array(), fifu_version_number_enq());
    272275    wp_enqueue_script('fifu-menu-js', plugins_url('/html/js/menu.js', __FILE__), array('jquery', 'jquery-ui'), fifu_version_number_enq());
     276    wp_enqueue_style('fifu-auto-share-css', plugins_url('/html/css/auto-share.css', __FILE__), array(), fifu_version_number_enq());
     277    wp_enqueue_script('fifu-auto-share-js', plugins_url('/html/js/auto-share.js', __FILE__), array('jquery', 'fifu-menu-js'), fifu_version_number_enq());
    273278
    274279    // register custom variables for the AJAX script
     
    283288        'reset' => $fifu['word']['reset'](),
    284289        'save' => $fifu['word']['save'](),
     290        'connect' => $fifu['share']['window']['connect'](),
     291        'shareInfo' => [
     292            'title' => $fifu['share']['info']['requirements'](),
     293            'facebook' => [
     294                'page' => $fifu['share']['info']['facebook']['page'](),
     295                'published' => $fifu['share']['info']['facebook']['published'](),
     296            ],
     297            'instagram' => [
     298                'professional' => $fifu['share']['info']['instagram']['professional'](),
     299                'public' => $fifu['share']['info']['instagram']['public'](),
     300            ],
     301            'x' => [
     302                'developer' => $fifu['share']['info']['x']['developer'](),
     303                'permissions' => $fifu['share']['info']['x']['permissions'](),
     304                'type' => $fifu['share']['info']['x']['type'](),
     305                'callback' => $fifu['share']['info']['x']['callback'](),
     306                'client' => $fifu['share']['info']['x']['client'](),
     307            ],
     308        ],
    285309        'pluginUrl' => plugins_url() . '/' . FIFU_SLUG,
    286310        'networkAdmin' => is_network_admin(),
  • featured-image-from-url/trunk/admin/strings.php

    r3380660 r3389293  
    331331    };
    332332    $fifu['title']['share'] = function () {
    333         _e("Auto-share to social media", FIFU_SLUG);
     333        _e("Auto-share on social media", FIFU_SLUG);
    334334    };
    335335    $fifu['title']['block'] = function () {
     
    736736    };
    737737
     738    // auto share
     739    $fifu['share']['desc'] = function () {
     740        _e("Automatically share new posts published on WordPress to social media. The rate limit is 16 posts per day for each connected social media platform.", FIFU_SLUG);
     741    };
     742    $fifu['share']['tab']['auto'] = function () {
     743        _e("Auto share", FIFU_SLUG);
     744    };
     745    $fifu['share']['tab']['social'] = function () {
     746        _e("Social media", FIFU_SLUG);
     747    };
     748    $fifu['share']['tab']['test'] = function () {
     749        _e("Test", FIFU_SLUG);
     750    };
     751    $fifu['share']['window']['connect'] = function () {
     752        return __("Connecting", FIFU_SLUG);
     753    };
     754    $fifu['share']['label']['client'] = function () {
     755        _e("OAuth 2.0 Client ID", FIFU_SLUG);
     756    };
     757    $fifu['share']['label']['postid'] = function () {
     758        _e("Post ID", FIFU_SLUG);
     759    };
     760    $fifu['share']['button']['now'] = function () {
     761        _e("Share now", FIFU_SLUG);
     762    };
     763    $fifu['share']['info']['requirements'] = function () {
     764        return __("Requirements", FIFU_SLUG);
     765    };
     766    $fifu['share']['info']['facebook']['page'] = function () {
     767        return __("You need a Facebook Page; sharing to personal profiles is not supported.", FIFU_SLUG);
     768    };
     769    $fifu['share']['info']['facebook']['published'] = function () {
     770        return __("The Page must be Published and visible to everyone.", FIFU_SLUG);
     771    };
     772    $fifu['share']['info']['instagram']['professional'] = function () {
     773        return __("Use an Instagram Professional account (Business or Creator); personal accounts won’t work.", FIFU_SLUG);
     774    };
     775    $fifu['share']['info']['instagram']['public'] = function () {
     776        return __("The Instagram account must be Public (not private).", FIFU_SLUG);
     777    };
     778    $fifu['share']['info']['x']['developer'] = function () {
     779        return __("Create an app in the Developer Portal", FIFU_SLUG);
     780    };
     781    $fifu['share']['info']['x']['permissions'] = function () {
     782        return __("Set permissions to \"Read and write\".", FIFU_SLUG);
     783    };
     784    $fifu['share']['info']['x']['type'] = function () {
     785        return __("Choose the type of app: \"Native App\".", FIFU_SLUG);
     786    };
     787    $fifu['share']['info']['x']['callback'] = function () {
     788        return __("Add the callback URI", FIFU_SLUG);
     789    };
     790    $fifu['share']['info']['x']['client'] = function () {
     791        return __("Copy the \"Client ID\" from the \"Keys and tokens\" section.", FIFU_SLUG);
     792    };
     793
    738794    // isbn
    739795    $fifu['isbn']['desc'] = function () {
  • featured-image-from-url/trunk/featured-image-from-url.php

    r3380660 r3389293  
    55 * Plugin URI: https://fifu.app/
    66 * Description: Use remote media as the featured image and beyond.
    7  * Version: 5.3.0
     7 * Version: 5.3.1
    88 * Author: fifu.app
    99 * Author URI: https://fifu.app/
    1010 * WC requires at least: 4.0
    11  * WC tested up to: 10.2.2
     11 * WC tested up to: 10.3.4
    1212 * Text Domain: featured-image-from-url
    1313 * License: GPLv3
  • featured-image-from-url/trunk/includes/html/twitter-image.html

    r3362830 r3389293  
    11<!-- FIFU:meta:begin:twitter -->
     2<meta name="twitter:card" content="summary_large_image" />
     3<meta name="twitter:title" content="<?php echo $title ?>" />
     4<meta name="twitter:description" content="<?php echo $description ?>" />
    25<meta name="twitter:image" content="<?php echo esc_attr(esc_url($url)) ?>" />
    36<!-- FIFU:meta:end:twitter -->
  • featured-image-from-url/trunk/includes/util.php

    r3362830 r3389293  
    309309
    310310function fifu_is_elementor_active() {
    311     return is_plugin_active('elementor/elementor.php') || is_plugin_active('elementor-pro/elementor-pro.php');
     311    return is_plugin_active('elementor/elementor.php') || fifu_is_elementor_pro_active();
     312}
     313
     314function fifu_is_elementor_pro_active() {
     315    return is_plugin_active('elementor-pro/elementor-pro.php');
    312316}
    313317
  • featured-image-from-url/trunk/readme.txt

    r3380660 r3389293  
    55Requires at least: 5.6
    66Tested up to: 6.8.3
    7 Stable tag: 5.3.0
     7Stable tag: 5.3.1
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    4949* **[PRO]** Auto set screenshot as featured image
    5050* **[PRO]** Auto set featured image from Unsplash using tags
     51* **[PRO]** Auto-share on social media
    5152
    5253#### Automation
     
    247248== Changelog ==
    248249
     250= 5.3.1 =
     251* New feature: Auto-share on social media; Fix: Featured image might not be displaying on X.
     252
    249253= 5.3.0 =
    250254* Enhancement: Quick Edit column (PRO feature) not displayed initially for new users to avoid confusion; Enhancement: bbPress and BuddyBoss Platform (can now add images to activities).
     
    274278* New: WordPress block for remote featured images; Enhancement: Alternative Text field added to the Elementor widget; Enhancement: Registers are no longer listed in the Custom Fields box; Enhancements and fixes: Input fields for posts, products, and categories; Fix: Images were being cropped unnecessarily in WooCommerce.
    275279
    276 = 5.2.1 =
    277 * Fix: possible fatal error when activating or upgrading the plugin; Fix: potential undefined index/property notices.
    278 
    279280= others =
    280281* [more](https://fifu.app/changelog)
     
    283284== Upgrade Notice ==
    284285
    285 = 5.3.0 =
    286 * Enhancement: Quick Edit column (PRO feature) not displayed initially for new users to avoid confusion; Enhancement: bbPress and BuddyBoss Platform (can now add images to activities).
     286= 5.3.1 =
     287* New feature: Auto-share on social media; Fix: Featured image might not be displaying on X.
Note: See TracChangeset for help on using the changeset viewer.