Changeset 2548933
- Timestamp:
- 06/16/2021 12:52:29 PM (5 years ago)
- Location:
- resoc/trunk
- Files:
-
- 4 edited
-
README.txt (modified) (2 diffs)
-
admin/class-resoc-admin.php (modified) (3 diffs)
-
includes/class-resoc-utils.php (modified) (1 diff)
-
resoc.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
resoc/trunk/README.txt
r2548896 r2548933 5 5 Requires at least: 5.0 6 6 Tested up to: 5.7.2 7 Stable tag: 1.0. 37 Stable tag: 1.0.4 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 81 81 == Changelog == 82 82 83 = 1.0.4 = 84 * Notice to guide user on activation 85 83 86 = 1.0.3 = 84 87 * Fix issue in the previous release -
resoc/trunk/admin/class-resoc-admin.php
r2548884 r2548933 55 55 add_action( 'save_post', 56 56 array( $this, 'save_social_image' ) ); 57 58 add_action( 'admin_notices', array( $this, 'finish_setup_notice' )); 57 59 } 58 60 … … 75 77 if ( !$featured_image ) { 76 78 Resoc_Utils::log( "Cannot turn featured image URL (" . $feature_image_url . ") to Base64" ); 79 return; 80 } 81 82 if ( !Resoc_Utils::plugin_configured() ) { 83 Resoc_Utils::log( "Plugin is not configured" ); 77 84 return; 78 85 } … … 118 125 119 126 Resoc_Utils::log( "OpenGraph image " . $social_image_id . " attached to post " . $post_ID ); 127 } 128 129 public function finish_setup_notice() { 130 if ( Resoc_Utils::plugin_configured() ) { 131 return; 132 } 133 134 $settings_page_url = admin_url( '/themes.php?page=resoc_social_images_appearance_menu' ); 135 if ( Resoc_Utils::current_url() == $settings_page_url ) { 136 return; 137 } 138 139 ?> 140 <div class="notice notice-warning is-dismissible"> 141 <p> 142 <strong>Resoc Social Images</strong> is almost ready! 143 <a href="<?php echo $settings_page_url ?>">Choose your template</a> 144 to complete the setup. 145 </p> 146 </div> 147 <?php 120 148 } 121 149 -
resoc/trunk/includes/class-resoc-utils.php
r2548884 r2548933 118 118 } 119 119 120 public static function plugin_configured() { 121 $plugin_options = get_option( Resoc_Settings::OPTIONS ); 122 if ( !$plugin_options ) { 123 return false; 124 } 125 126 return ( 127 $plugin_options[ Resoc_Settings::TEMPLATE ] && 128 $plugin_options[ Resoc_Settings::BACKGROUND_COLOR ] && 129 $plugin_options[ Resoc_Settings::TEXT_COLOR ] && 130 $plugin_options[ Resoc_Settings::BRAND_NAME ] 131 ); 132 } 133 134 public static function current_url() { 135 if ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] === 'on' ) { 136 $prefix = "https://"; 137 } 138 else { 139 $prefix = "http://"; 140 } 141 142 return $prefix . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; 143 } 144 120 145 public static function log( $value ) { 121 146 if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) { -
resoc/trunk/resoc.php
r2548896 r2548933 17 17 * Plugin URI: https://resoc.io/resoc-uri/ 18 18 * Description: This is a short description of what the plugin does. It's displayed in the WordPress admin area. 19 * Version: 1.0. 319 * Version: 1.0.4 20 20 * Author: Resoc 21 21 * Author URI: https://resoc.io/ … … 36 36 * Rename this for your plugin and update it as you release new versions. 37 37 */ 38 define( 'RESOC_VERSION', '1.0. 3' );38 define( 'RESOC_VERSION', '1.0.4' ); 39 39 40 40 /**
Note: See TracChangeset
for help on using the changeset viewer.